Open tmccormi opened 10 months ago
Hi @tmccormi The best feature for this use case may be Launch Configurations, you can configure a set of tabs to open and then run any commands in those tabs, including ssh
. Please see an example of this in our docs. https://docs.warp.dev/features/sessions/launch-configurations#commands
Then, to open Launch configurations with a script, please take a look at Warps URI scheme as there is one for opening them with warp://launch/<launch_configuration_path>
. https://docs.warp.dev/features/uri-scheme
Hope this helps with your use case, if not, then let us know what we can do differently.
Hey @tmccormi , I also have the same test case. In my case I created a launch configuration to ssh into the server. It works that's great. But I want to run commands on few of the server (on the servers after ssh) and not on my local machine. And in on of the tab after I ssh into a server, I want to ssh again to a different server from current one (SSH Tunneling) and execute some commands over there.
For example my launch configuration
name: Open Machines
windows:
- tabs:
- title: SSH Forward
layout:
cwd: /Users/vinit
commands:
- exec: ssh -i ~/mdoa ec2-user@111.111.111.111
- exec: ssh -i "mdoa.pem" ubuntu@192.168.1.10
- exec: sudo su
color: blue
- tabs:
- title: SSH Forward
layout:
cwd: /Users/vinit
commands:
- exec: ssh -i ~/mdoa ec2-user@111.111.111.111
- exec: ssh -i "mdoa.pem" ubuntu@192.168.1.11
- exec: sudo su
color: blue
I see, but I can't find anything that shows how you create these? There is "save new" in Launch Configs, but nothing about how to create it to begin with.
On Thu, Dec 21, 2023 at 9:30 AM Vinit Maniyar @.***> wrote:
Hey @tmccormi https://github.com/tmccormi , I also have the same test case. In my case I created a launch configuration to ssh into the server. It works that's great. But I want to run commands on few of the server (on the servers after ssh) and not on my local machine. And in on of the tab after I ssh into a server, I want to ssh again to a different server from current one (SSH Tunneling) and execute some commands over there.
For example my launch configuration
name: Open Machines windows:
- tabs:
- title: SSH Forward layout: cwd: /Users/vinit commands:
- exec: ssh -i ~/mdoa @.***
- exec: ssh -i "mdoa.pem" @.***
- exec: sudo su color: blue
- tabs:
- title: SSH Forward layout: cwd: /Users/vinit commands:
- exec: ssh -i ~/mdoa @.***
- exec: ssh -i "mdoa.pem" @.***
- exec: sudo su color: blue
— Reply to this email directly, view it on GitHub https://github.com/warpdotdev/Warp/issues/3959#issuecomment-1866687111, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFZC34N5NB7JBFATDNLMDYKRW3PAVCNFSM6AAAAABASLN2LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWGY4DOMJRGE . You are receiving this because you were mentioned.Message ID: @.***>
I see, but I can't find anything that shows how you create these? There is "save new" in Launch Configs, but nothing about how to create it to begin with. … On Thu, Dec 21, 2023 at 9:30 AM Vinit Maniyar @.> wrote: Hey @tmccormi https://github.com/tmccormi , I also have the same test case. In my case I created a launch configuration to ssh into the server. It works that's great. But I want to run commands on few of the server (on the servers after ssh) and not on my local machine. And in on of the tab after I ssh into a server, I want to ssh again to a different server from current one (SSH Tunneling) and execute some commands over there. For example my launch configuration name: Open Machines windows: - tabs: - title: SSH Forward layout: cwd: /Users/vinit commands: - exec: ssh -i ~/mdoa @. - exec: ssh -i "mdoa.pem" @. - exec: sudo su color: blue - tabs: - title: SSH Forward layout: cwd: /Users/vinit commands: - exec: ssh -i ~/mdoa @. - exec: ssh -i "mdoa.pem" @. - exec: sudo su color: blue — Reply to this email directly, view it on GitHub <#3959 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFZC34N5NB7JBFATDNLMDYKRW3PAVCNFSM6AAAAABASLN2LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWGY4DOMJRGE . You are receiving this because you were mentioned.Message ID: @.>
You need to create a file directly/manually. Warp will load it automatically. I'm using mac my save location is ~/.warp/launch_configurations/config.yaml
If a directory does not exists, create it. If a file does not exists, create it.
Ah, I see. Got it to work, thanks!
On Fri, Dec 22, 2023 at 3:36 AM Vinit Maniyar @.***> wrote:
I see, but I can't find anything that shows how you create these? There is "save new" in Launch Configs, but nothing about how to create it to begin with. … <#m6077327715731205955> On Thu, Dec 21, 2023 at 9:30 AM Vinit Maniyar @.> wrote: Hey @tmccormi https://github.com/tmccormi https://github.com/tmccormi https://github.com/tmccormi , I also have the same test case. In my case I created a launch configuration to ssh into the server. It works that's great. But I want to run commands on few of the server (on the servers after ssh) and not on my local machine. And in on of the tab after I ssh into a server, I want to ssh again to a different server from current one (SSH Tunneling) and execute some commands over there. For example my launch configuration name: Open Machines windows: - tabs: - title: SSH Forward layout: cwd: /Users/vinit commands: - exec: ssh -i ~/mdoa @. - exec: ssh -i "mdoa.pem" @. - exec: sudo su color: blue - tabs: - title: SSH Forward layout: cwd: /Users/vinit commands: - exec: ssh -i ~/mdoa @.
- exec: ssh -i "mdoa.pem" @. - exec: sudo su color: blue — Reply to this email directly, view it on GitHub <#3959 (comment) https://github.com/warpdotdev/Warp/issues/3959#issuecomment-1866687111>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFZC34N5NB7JBFATDNLMDYKRW3PAVCNFSM6AAAAABASLN2LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWGY4DOMJRGE . You are receiving this because you were mentioned.Message ID: @.>
You need to create a file directly/manually. Warp will load it automatically. I'm using mac my save location is ~/.warp/launch_configurations/config.yaml
If a directory does not exists, create it. If a file does not exists, create it.
— Reply to this email directly, view it on GitHub https://github.com/warpdotdev/Warp/issues/3959#issuecomment-1867583012, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFZC5NW3L7YAXHQLZ67FLYKVWETAVCNFSM6AAAAABASLN2LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRXGU4DGMBRGI . You are receiving this because you were mentioned.Message ID: @.***>
The current solution is acceptable. It would be better if you put this solution to workflow section in Warp doc.
On MacOS, the open
command works to run commands in new tabs:
open -a warp "/path/script.sh"
open -a warp "/bin/ls" --args "~/Downloads"
On MacOS, the
open
command works to run commands in new tabs:open -a warp "/path/script.sh" open -a warp "/bin/ls" --args "~/Downloads"
Works!!
Can I use open to run a zsh script?
I tried like
open -a warp "/bin/zsh" --args "-i -c test"
But it's not working (opening a subshell)
Is there a solution to open many tabs, but all in a split view? Like a tab in right side and another in left side.
On MacOS, the
open
command works to run commands in new tabs:open -a warp "/bin/ls" --args "~/Downloads"
Works!!
Does it really? For me it brings up Warp and executes the command /bin/ls
(without arguments) in the directory /bin
. Could you please verify? I'm running Warp v0.2024.09.10.08.02.stable_01 on macOS Sonoma 14.6.1 (23G93).
Discord username (optional)
No response
Describe the solution you'd like?
Is your feature request related to a problem? Please describe.
Additional context
I was able to configure my OS to open a shell script from the file browser using Warp, but not as Tabbed sessions, alos having to use to UI to click in each shell script was icky.
How important is this feature to you?
3
Warp Internal (ignore) - linear-label:770f6576-d6c0-4e4f-a259-fc64b5156087
None