3 ms·
Posted elsewhere but will copy here. Been doing this for a while. - - - get tailscale (free) and join on both devices install tmux get an ios/android termin
by jasonjmcghee 8mo ago
Posted elsewhere but will copy here. Been doing this for a while.
- - -
get tailscale (free) and join on both devices
install tmux
get an ios/android terminal (echo / termius)
enable "remote login" if on mac (disable on public wifi)
mosh/ssh into computer
now you can do tmux then claude / codex / w/e on either device and reconnect freely via tmux ls and tmux attach -t <id>
- - -
You can name tmux and resume by name via tmux new -s <feature> and tmux attach -t <feature>
- lukebechtel 8mo agoI also do this!
- zeppelin101 8mo agoI think everyone started out with this
- canadiantim 8mo agoI'm still doing this. Is there a better setup? It's already very convenient and secure.
- zeppelin101 8mo agoI'm still doing this, too! The only thing I added was setting up notifications on my local machine using hooks in Claude Code (using a reverse ssh tunnel from my local machine to a VPS). As for fancier setups, I keep bookmarking them, but haven't gotten around to trying any of them, yet.
- canadiantim 8mo agoNice. What other fancier setups have you seen? I haven’t even come across any potential better alternative. Been playing around with tailscale’s new aperture service too which is awesome as well.
- zeppelin101 8mo agoHere are 2 that I found in my bookmarks that I haven't tried: * https://github.com/laurentenhoor/devclaw https://github.com/laurentenhoor/devclaw * https://www.workforest.space/ https://www.workforest.space/ I see these kinds of repos and projects being posted on Reddit all the time. I just never get around to trying them :(
- zeppelin101 8mo agoHere are a few more I saw just now: * https://www.reddit.com/r/ClaudeCode/comments/1rg4wdy/i_got_tired_of_tabswitching_between_10_claude/ https://www.reddit.com/r/ClaudeCode/comments/1rg4wdy/i_got_t... * https://github.com/siteboon/claudecodeui https://github.com/siteboon/claudecodeui
- jasonjmcghee 8mo agoI think people familiar with tmux/screen and tailscale or how to setup their own VPN might have. Based on my experience many people don't know this is a thing you can do.
- fittingopposite 8mo agoYes. Doing the same. What is the advantage of this new feature? Tmux/Tailscale/Termius give you full control of your terminal. Or mainly to save the end user the hassle to set it up correctly?
- dbmikus 8mo ago> Or mainly to save the end user the hassle to set it up correctly It's this. Don't have a Dropbox moment ;) [1] [1]: https://news.ycombinator.com/item?id=9224 https://news.ycombinator.com/item?id=9224
- jasonjmcghee 8mo agoOh lots of people will not be comfortable with tmux approach. The anthropic feature makes sense. But it's Max only and doesn't work well according to other comments. What I posted "just works".
- mlinsey 8mo agoEase of setup is the biggest reason. I use this setup as well, but there are other UX niceties that would be a lot better with a dedicated mobile app: push notifications when Claude needs your input (I use a hook for this that connects to Pushover, but that's another service and extra setup), voice input, autocorrect that's right for this context, etc.
- fittingopposite 8mo agoVery interesting. Tell me more about your push notification setup!
- mlinsey 8mo agoI have a hook in my claude.json that fires on "Stop", it calls a shell script (written by Claude, of course) that calls the Pushover API: https://pushover.net/ https://pushover.net/, which lets you send push notifications to your device. It's paid, but just a one-time fee when you install the app on your phone. The shell script takes a message which includes Claude's message, but unfortunately there's no deeplinking back to my ssh app (for obvious reasons, the notification just routes you to the pushover app), so instead of tapping the message, I know to just open my Blink shell app to respond to Claude. This is also quite noisy when I'm just sitting at my desk working, but I usually turn off phone notifications while working anyway.
- fudged71 8mo agoDo you have an alias or something so that every time you open CC, tmux is running? How do you deal with multiple concurrent sessions of CC with this setup? How important is mosh? I wasn't able to get it set up the last time I tried... ran into a bunch of issues.
- jasonjmcghee 8mo ago"tmux ls" shows you all the open tmux sessions Could even use cc to check in on and/or "send-keys" What wasn't working about mosh? Just install mosh and use mosh to connect
- simlevesque 8mo agoI recommend Eternal Terminal instead of mosh for this.
- olalonde 8mo agoI always setup my terminals to open a tmux session by default (or attach to any existing one). For example, in my ~/.config/alacritty/alacritty.toml: [terminal.shell] args = ["-l", "-c", "tmux attach || tmux"] program = "/opt/homebrew/bin/zsh" tmux supports tabs so you can have multiple Claude Code sessions running concurrently. You do need to learn a few tmux keyboard shortcuts to use it effectively (e.g. opening/closing/switching tab).
- jasonjmcghee 8mo agoSorry didn't answer "how important is mosh?" Depends- how good is your signal? Mosh has a great property that it buffers everything locally so there's no lag even if your connection sucks. On ssh, every keystroke is a roundtrip
- madjam002 8mo agoI have just today discovered zmx [1] which is like tmux but I always hated the tmux terminal emulation and how it hijacks scrolling, especially on Termius on my phone. It does session persistence but I think without the terminal emulator side of things, so scrolling works normally. Been testing it today with Claude Code and it seems to work quite well switching between my laptop and phone. [1] https://github.com/neurosnap/zmx https://github.com/neurosnap/zmx
- jacob019 8mo agoI also hate how tmux uses alt mode and can never remember all the shortcuts, copy paste is a PITA and just today I had to look up how to dump the scrollback buffer to a file. Named sessions without window management makes a lot more sense these days. Similarly, I'm not a fan of all the ANSI escape codes that CC uses to jump the cursor around and rewrite the display to look like a GUI. I prefer a TUI that doesn't mutate rows after writing them, that's what alt mode is for. CC often clears whatever was in the scrollback buffer before you opened it, it hides bracketed paste, and goes crazy sometimes when content overflows the window and I have to resize the terminal or get blasted with a wall of glitching characters--extra annoying if I'm working from a low bandwidth link. I develop my own agent framework and code agent, and while some features aren't as polished as CC, one of my explicit goals is to preserve the traditional CLI feel, like the python REPL (that's what it's based around). I'll give zmx a try tonight :)
- xpe 8mo agoIt can help to recognize that tmux combines three kinds of functionality: 1. process persistence; 2. client attachment; 3. view layout. If you don't like how tmux works, there are alternatives. I prefer Zellij [1]. (It also can be informative to take a peek at dtach [2] and abduco [3].) [1]: https://zellij.dev https://zellij.dev and https://github.com/zellij-org/zellij https://github.com/zellij-org/zellij [2]: https://github.com/crigler/dtach https://github.com/crigler/dtach and https://dtach.sourceforge.net https://dtach.sourceforge.net [3]: https://github.com/martanne/abduco/issues/70 https://github.com/martanne/abduco/issues/70
- oakashes 8mo agoI do this and it is powerful, but I find that not being able to swipe/autocorrect my mobile typing in Termius makes things pretty painful.
- nebben64 8mo agoThanks for the tip. Other ppl are saying "most of us started out like this" but if you haven't played with tailscale etc. (like me). Then this is new and good for learning imo