Repository navigation
Warp CLI + General Scriptability + Open Warp with a directory URL #612
Replies: 33 comments 15 replies
|
From discord:
|
|
|
|
|
From @ianwalter via: Describe the solution you'd like?I just used iTerm2's Python API to create a python script in my monorepo that creates a bunch of tabs to run different services (e.g. docker compose, API server, Next.js dev server, iOS simulator, etc). It's great because I can easily start my whole dev environment with one command and have a meaningful tab name set for each tab. I would have preferred to use Node.js instead of Python, but not a big deal. Really liking Warp so far but this is what I am still using iTerm2 for. Is your feature request related to a problem? Please describe.No response Additional contextHere's an example of a tab I create in the script: # Create a new tab and run the Docker Compose services.
tab = await window.async_create_tab()
await tab.async_set_title('Docker')
command = f'cd {root}/packages/web; yarn docker\n'
await tab.current_session.async_send_text(command) |
|
From @kieran-osgood via: Describe the solution you'd like?Possibly related to #102 but in the default mac terminal and iTerm you can use a command like: Is your feature request related to a problem? Please describe.Currently running Additional contextNo response |
|
|
|
I wanted to configure warp as an external tool to be launched from my IDE. It would be very convenient if I could pass my project's directory (which is available in tool launch config) to warp so it would start from that directory. |
|
From Tominabox vi Discord: https://discord.com/channels/851854972600451112/906269689116770304/929810244157194371
|
|
Was looking for a way to send a command to Warp from AppleScript or from another bash. Something like the following that I use for iTerm: |
|
From @solvip via
|
|
The ability to run Warp with a startup directory argument (or pass it to a running instance) would be very valuable for such use cases as running terminal from some other software like file managers and IDEs. I'd be happy to see this supported. |
|
I'm trying to login after proxied by |
|
It seems like Warp has added exactly what I was looking for with "Launch Configurations" as described in the docs: https://docs.warp.dev/features/session-management/launch-configurations |
|
This command works for me: |
|
It only works in terminal such as by But it still gives an error if we try to use the Foundation API of NSWorkspace in ObjectiveC or Swift. do {
let application = try await NSWorkspace.shared.open(urls, withApplicationAt: url, configuration: config)
} catch {
// Error handling
}I have a Finder-Sync extension app (Open Sourced at https://github.com/Kyle-Ye/MenuHelper) and will use such API to try to open with Warp. Other standard apps which is able to open url are all OK with such API call. (Git Tower/Xcode/VS Code/Terminal/IntelliJ IDEA etc.) |
|
Didn't know this already worked !!! Thank you so much for sharing |
|
From the NSWorkspace header it looks like this could be the issue when trying to open from Cocoa: The path to the application instance is always automatically inserted as the first argument. In that case only the Warp developers can fix things for us. |
|
From @sd-godaddy on #2215
|
|
A huge use case in my workflows is having scripts launch iTerm windows with profiles set with single TUI application running, with the window automatically closing afterwards: It's painfully slow, though, and I would love to have a more responsive application start things up. This does require a "start with profile x running" feature from the CLI interface. |
|
Hey Folks, Warp has released a public URI Scheme which has been used to create a Raycast extension to open folders with Warp (among other things). Learn more about it here: https://docs.warp.dev/features/uri-scheme We'll update that document as new features are added. |
|
Here's how an AppleScript for Raycast can look like: Thanks to @flaxton for the inspiration. It's not perfect, but better than nothing. |
|
For Linux users (Specifically arch based distros) using #!/bin/bash
# Make sure to run the following
# sudo chmod +x $HOME/.config/warp-terminal/warp.sh
# sudo ln -s $HOME/.config/warp-terminal/warp.sh /usr/bin/warp
usage() {
echo "Usage: $0 <path_to_folder>"
echo " $0 [-r | --reuse] <path_to_folder>"
exit 1
}
if [[ $# -eq 0 ]]; then
warp-terminal # Opens warp normally
fi
# https://docs.warp.dev/features/uri-scheme
if [[ "$1" == "-r" || "$1" == "--reuse" ]]; then
if [[ $# -ne 2 ]]; then
usage
fi
path="$2"
xdg-open "warp://action/new_window?path=$path"
else
path="$1"
xdg-open "warp://action/new_tab?path=$path"
fi |
|
Here is little modification to @artrixdotdev script for Linux and VS Code users. In
#!/bin/bash
# Make sure to run the following
# sudo chmod +x $HOME/.config/warp-terminal/warp.sh
# sudo ln -s $HOME/.config/warp-terminal/warp.sh /usr/bin/warp
usage() {
echo "Usage: $0"
echo "Usage: $0 <path_to_folder>"
echo " $0 [-r | --reuse] <path_to_folder>"
exit 1
}
if [[ $# -eq 0 ]]; then
WD="$(pwd)"
if [[ "$WD" != "" ]]; then
xdg-open "warp://action/new_tab?path=${WD}"
else
warp-terminal # Opens warp normally
fi
exit 0
fi
# https://docs.warp.dev/features/uri-scheme
if [[ "$1" == "-r" || "$1" == "--reuse" ]]; then
if [[ $# -ne 2 ]]; then
usage
fi
path="$2"
xdg-open "warp://action/new_window?path=$path"
else
path="$1"
xdg-open "warp://action/new_tab?path=$path"
fi |
|
On MacOS to open warp via a command line which I added to my ### Function to open a new Warp terminal tab at the specified path
#### Usage: warp [path] - Opens a new Warp tab at the given path or current directory if no path is provided
warp() {
local target_path="${1:-.}"
open "warp://action/new_tab?path=$(cd "$target_path" && pwd)"
} |
|
Warp Preview now has a cli. |
|
Great! Is there any way to have split pane similar to Wezterm or good old tmux? |
|
Hi, just following up on this issue, being able to open panes and splits via bash or AppleScript would greatly improve my Claude Code experience, as I could have it show me text or image files! |
|
just wanted to add aside from the agent it would be nice to change user settings from the cli as well |


Uh oh!
There was an error while loading. Please reload this page.
Describe the solution you'd like?
Having support to use Warp instead of iTerm in this script would be awesome.
All reactions