Warp CLI + General Scriptability + Open Warp with a directory URL #612
Replies: 27 comments 13 replies
-
From discord:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
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) |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
From Tominabox vi Discord: https://discord.com/channels/851854972600451112/906269689116770304/929810244157194371
|
Beta Was this translation helpful? Give feedback.
-
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:
|
Beta Was this translation helpful? Give feedback.
-
From @solvip via
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to login after proxied by
|
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
I’ve recently been looking atBunch and would be great to have a way to tie into this for launch actions too so some form of scriptability for launch commands would be great. |
Beta Was this translation helpful? Give feedback.
-
Launch Configurations has launched and works like a charm. Y'all are amazing! |
Beta Was this translation helpful? Give feedback.
-
Last comments made me thing the actual "Open Warp with a directory URL" feature was available. But looks like not yet. |
Beta Was this translation helpful? Give feedback.
-
This command works for me: |
Beta Was this translation helpful? Give feedback.
-
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.) |
Beta Was this translation helpful? Give feedback.
-
Didn't know this already worked !!! Thank you so much for sharing |
Beta Was this translation helpful? Give feedback.
-
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.
|
Beta Was this translation helpful? Give feedback.
-
From @sd-godaddy on #2215
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Here's how an AppleScript for Raycast can look like:
Thanks to @flaxton for the inspiration. It's not perfect, but better than nothing. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Describe the solution you'd like?
Having support to use Warp instead of iTerm in this script would be awesome.
Beta Was this translation helpful? Give feedback.
All reactions