top | item 46472772

Show HN: uvx ptn, scan a QR, get a terminal in your phone

101 points| yxl448 | 1 month ago |github.com

Scan QR → web terminal → vibe coding in bed. Mobile-first terminal via Cloudflare Quick Tunnel. No port forwarding. Feedback welcome.

43 comments

order

simonw|1 month ago

"Warning: The URL is the only authentication. Anyone with the link has full terminal access."

Could you make it so the URL is one-use only, such that once you've scanned it with your phone you can stop worrying because anyone else who uses it won't be able to start a session?

yxl448|1 month ago

it is indeed disposable and the prefix is like your secure key. it is safe unless someone has access to your screen. I can add an option to permit a single session.

sa-code|1 month ago

I can recommend tailscale for creating private networks. It has a generous free tier and would reduce the attack surface considerably compared to ngrok

Better yet would be setting up your own wireguard instance and not relying on free lunches. But as far as free lunches go tailscale would be my preferred option

bonsai_spool|1 month ago

Head scale is a good middle option - it uses Tailscale’s DNS system but you are able to control your network as you would with Wireguard

baq|1 month ago

tailscale has a much better chance to work when you need it most. WireGuard is blocked by too much stuff.

smithclay|1 month ago

This is great. If you’re skeptical, vibe coding in the go is great because of how async the agentic coding workflows can be. Nothing like fixing a bug in the dentist office.

Lots of different technical solutions for how to do this, including the Claude and ChatGPT mobile apps nowadays. I use Tailscale. Choose what works best for you and enjoy.

kosolam|1 month ago

I’m also vibing from the iphone. Termius connects via ssh to remote server where I run claude code. Ssh connects also over a wireguard connection. So ports are not an issue because they are all available via wg in a secure way. Additionally I have code server running there automatically port forwards and giving me ssl. So when I run “pnpm dev” in tmux in ssh then I access it via https://3000.dev.mydomain.com which works great for development.

hrimfaxi|1 month ago

Can you speak more to the code server and domain set up? How do you get it to auto provision subdomains?

reimuwu|1 month ago

> I wanted to vibe code from bed.

In this case, I think using Termux + SSH would be more convenient and compatible with all devices running sshd.

stoneforger|1 month ago

Yes but that's boring. Look at this it has cool ASCII and a QR. At this point no typing, just vibe-voice ask to build the thing and fix the error. Then we can have some tea, earl grey, hot.

yukinon|1 month ago

I don't know if "more convenient" would be the words I would use. Setup on this project is very easy, it has very straightforward instructions. Meanwhile, I did a quick 5 minute pressure test of what you suggested and found myself with more questions than answers. I am not saying one way is better than the other, I am just thinking that for those that don't breathe SSH/VPN/Wireguard/Terminal Emulators/etc.. this project is actually far easier to understand.

Also, funny enough on compatibility, but "Termux" is not on iOS, so it fails that basic check. But there's alternatives, of course. Just an observation.

arisylafeta|1 month ago

Love it, I've been looking for something like this for a while now. But please add a password to it if you have the time. I might chip in by next if you're open to contributions.

yxl448|1 month ago

I actually thought about it. will be added in a future release.

yxl448|1 month ago

uvx ptn -p for a one-time disposable pwd!

MarsIronPI|1 month ago

Genuine question here: How is this better than a mobile SSH client + something like Tailscale or Yggdrasil?

yxl448|1 month ago

fast and disposable? (btw it also works like a tmux with UI)

gschizas|1 month ago

This command:

  lsb_release -cs
Doesn't work for Linux Mint 22.2

What you want is UBUNTU_CODENAME from /etc/os-release (in the case of Linux Mint 22.2, it's "noble")

EDIT: Actually, I'm not even sure you can do $(command) inside /etc/apt/sources.list.d/*

yxl448|1 month ago

Try again. I don't have mint instance to test, but should work now.

brap|1 month ago

I like this but I hate how everything has to be tied to AI now to get attention. “I wanted to vibe code-“ who cares? It’s a neat tool, do we have to force AI into it?

solarkraft|1 month ago

It’s the tool‘s use case, which provides valuable background information about its technical choices.

viraptor|1 month ago

Normally we get a few "but why would you make this?" comments. Maybe let's not discourage people who actually give us the answer upfront.

mark_l_watson|1 month ago

Very cool, indeed.

One nit-pick: Terminus requiring a lot of setup work:

Terminus is trivial to use with a rented VPS. But, ptn solves a different problem

phs318u|1 month ago

Love it.

Laziness - the mother of (most) invention.