# cli-setu

Bridge your terminal to your phone. Run Claude Code, Codex, or any plain shell on your laptop, and approve prompts, type, and watch the live output from the [cli-setu](https://clisetu.com) app on your phone.

## Install

```bash
npm install -g cli-setu
```

## Usage

Pairing and starting a session are two separate steps:

```bash
cli-setu pair                 # pair this computer with your phone - does NOT start a session
cli-setu session               # bridge the current folder as a plain shell session
cli-setu session --cli claude  # same, but runs Claude Code inside the bridged session
cli-setu session --cli codex   # or Codex
```

The first time you run `cli-setu pair`, it prints a QR code (and an 8-character code) - in the CLI Setu app tap Pair, then scan the QR with the app's own Pair screen (not the phone's separate camera app) or choose "Enter code" and type the code, which is the most reliable way. Pair each computer once. Pairing alone never opens a terminal session or starts any process - run `cli-setu session` afterward, in whichever folder you want to bridge, whenever you're ready.

Once paired, `cli-setu session` in any folder just works - no QR code needed again, unless this is a device you haven't paired before. A device can only ever run a limited number of live sessions at once, and cli-setu refuses to start a second session for the same project folder while one is already running there.

## Other commands

```bash
cli-setu status              # show pairing status and any sessions currently running
cli-setu stop                # stop every session running on this computer
cli-setu stop <sessionId>    # stop just one session - see `cli-setu status` for the exact id
cli-setu unpair              # unpair this computer (asks for confirmation)
cli-setu --update            # check for and install the latest version
cli-setu --version, -v       # print the installed version
cli-setu --help, -h          # show all commands
```

## How it works

`cli-setu` spawns your real terminal (or Claude Code/Codex) inside a PTY, same as any terminal emulator. Every byte it produces streams live to the cli-setu app over a secure relay; anything you type on the phone writes back into that same PTY, exactly like a local keystroke. Permission prompts (file edits, shell commands, etc.) are detected and relayed as structured approve/reject cards instead of raw text, when the adapter for your CLI supports it.

## License

MIT
