The command line

The tern CLI is one static binary (12 MB) for macOS, Linux and FreeBSD. It talks to the same daemon as the Mac app, so a session started in one shows in the other.

The terminal UI

tern                    # open the console for the repository you're in
tern ~/code/app         # or for another folder
Key What it does
F2 start an agent; name the task and it gets its own worktree (^W runs it in the current folder instead)
F5 allow the permission an agent is asking for (^B a always, ^B r reject, ^B v jump to it)
F7 the review queue: c comment to the agent, m merge, p push and open a PR
F3 · ^B / · F9 find files · search text · search symbols (^R lists references)
F6 the next session
F10 or ^B d detach: sessions keep running; run tern again to reattach

Sessions live in a background daemon. tern ls lists them; tern kill-server stops the daemon and every session.

Start and drive agents

tern new --agent claude --prompt "Fix the flaky upload test"            # here
tern new --agent codex --task ci-speedup --from main --prompt "…"      # in a new worktree
tern task new docs-refresh --agent gemini --prompt "Update the setup docs"
tern task ls
tern task rm docs-refresh --delete-branch

Scripts (and agents) can watch and steer sessions:

tern status [-json]                 # every session in this repo and what it's doing
tern read fix-login -n 40           # a session's screen as text
tern send fix-login "Also add a test for expired cookies"
tern wait fix-login --for done,needs --timeout 30m
tern approve ci-speedup allow       # allow | always | deny
tern review -json                   # every task's changes and overlaps
tern run "Rename getUser to fetchUser everywhere"   # a one-shot quick edit

Inside a session, tern status set "Waiting on the API team" sets the line Tern shows for that task.

Review pull requests

tern https://github.com/acme/web/pull/123

checks the pull request out in its own worktree and opens it for review.

Runs

A run is a plan of agent steps that the daemon carries out, each step in its own worktree, started as soon as the steps it needs are done. See Runs for the plan format.

tern orchestrate start .tern/runs/dark-mode.yaml
tern orchestrate ls
tern orchestrate status <run>
tern step approve <run> toggle      # approve | reject | retry | skip

Remote machines

tern ssh devbox ~/src/app           # run Tern on devbox (copies the binary over) and attach
tern --host devbox ls               # any command, against devbox's Tern

Your phone

tern remote on --mode tailscale     # or lan, proxy, relay, funnel
tern remote pair --control          # a QR code to scan; --control lets the phone act
tern remote status
tern remote off
tern relay --domain relay.example.com   # run your own Tern Relay

Scheduled agents

tern auto add …     # a prompt an agent runs on a schedule (see tern auto)
tern auto list
tern auto log

Keeping up to date

tern upgrade          # the latest release, checked against its checksums
tern version

tern agents lists the agent CLIs Tern knows; tern agent-context prints these commands as JSON for an agent to read.