External scripting support

Open
#4,679 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
api, cli

Research direction

Start by locating Warp's existing launch-argument handling and custom URI-scheme support. Compare those entry points with the proposed HTTP REST interface, then define how tab and pane selection, command output, and long-running commands should behave; done means external applications can reliably execute commands in the requested location.

Written by the indexing model from the issue text.

Description

enhancement triaged
Discord username (optional)

No response

Describe the solution you'd like?

Introduce external scripting support in Warp Terminal to allow execution of terminal commands triggered by external applications. This feature aims to increase workflow automation and flexibility for users.

Implementation Suggestions:
  1. Launch Arguments Support:

    Allow execution with specific arguments to direct the command to a particular tab or pane.
    Examples:

    • Execute in default tab:

        Warp.app "brew upgrade"
      
    • Target a specific tab by index or name:

        Warp.app "brew upgrade" --tab 0
        Warp.app "brew upgrade" --tab "My named tab"
      
    • Specify pane in the format column:row:

        Warp.app "brew upgrade" --tab 0 --pane 1:2
      
  2. Add additional URI Schemes:

    Support for command execution through custom URI schemes is already supported by Warp, but is limited to opening new tabs, windows, and launching configurations. Examples:

    • Execute in default tab:

        warp://command/brew%20upgrade
      
    • Target a specific tab by index or name:

        warp://command/brew%20upgrade?tab=0
        warp://command/brew%20upgrade?tab=My%20named%20tab
      
    • Specify pane in the format column:row:

        warp://command/brew%20upgrade?tab=0&pane=1:0
      
  3. HTTP REST Interface:

    Provide an HTTP interface for command execution with options to select tabs and panes via headers. Examples:

    • Simple command, using default tab:

        curl -X "POST" "http://localhost:8000/brew%20upgrade"
      
    • With tab specification:

        curl -X "POST" "http://localhost:8000/brew%20upgrade" -H 'tab: 0'
      
    • Specifying tab and pane:

        curl -X "POST" "http://localhost:8000/brew%20upgrade" -H 'tab: My named tab' -H 'pane: 0:1'
      
Specific Use-Case:

Integration with Stream Deck: The primary motivation for this feature is to enable users to execute commands in Warp Terminal directly from a Stream Deck, enhancing productivity and efficiency by bridging physical interface control with software commands.

Preferred Implementation: HTTP REST Interface

Using HTTP, warp could return the command output as part of the response body. The inclusion of the response could be controlled using an additional header, for example: ignores_output or include_output. The possibility to ignore the command output can be useful for long running commands or for commands that launch into another program or scope like for example ssh.

Is your feature request related to a problem? Please describe.

No response

Additional context

If done, I will write a StreamDeck plugin (for MacOS) and publish

How important is this feature to you?

4

Warp Internal (ignore) - linear-label:39cc6478-1249-4ee7-950b-c428edfeecd1

None

Dominant language
Rust
Stars
65.1k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from warpdotdev/warp

All issues in warpdotdev/warp

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.