Skip to content

CLI

pyt3

Drive T3 Code environments (local or remote) over their MCP endpoint.

pyt3 [OPTIONS] COMMAND [ARGS]...

--env

Environment variablePYT3_ENV Saved environment alias (see pyt3 envs).

--help

:mdi-flag: Flag Show this message and exit.

login

Sign in with a one-time pairing code and save the token.

pyt3 login [OPTIONS] {url} {pairing_code}

url

"REQUIRED" Environment address, e.g. https://host:3773.

pairing_code

"REQUIRED" Code from t3 auth pairing create.

--access

Default: auto What this CLI may do. App approval codes (AUTO-…) set their own.

--name

Alias to save it as (default: its label).

--client-name

Default: pyt3 Label the environment shows for this sign-in.

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

login-native

Sign in to the native WebSocket RPC (live streaming, approvals) and save the token.

The native surface rejects MCP tokens, so this is a second sign-in, kept under the same alias as the environment's MCP one.

pyt3 login-native [OPTIONS] {url} {pairing_token}

url

"REQUIRED" Environment address, e.g. https://host:3773.

pairing_token

"REQUIRED" Token from t3 auth pairing create (not an MCP code).

--name

Alias to save it as (default: the MCP sign-in of this URL, or its label).

--client-name

Default: pyt3 Label the environment shows for this sign-in.

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

logout

Forget a saved sign-in. Revoke it in T3 Code under Settings -> Sharing & access.

pyt3 logout [OPTIONS] [alias]

alias

Environment to forget (default: --env or the only one).

--help

:mdi-flag: Flag Show this message and exit.

envs

List saved environments (never prints tokens).

pyt3 envs [OPTIONS]

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

models

List providers and their models.

pyt3 models [OPTIONS]

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

projects

List projects.

pyt3 projects [OPTIONS]

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

threads

List threads, newest first, or search them.

pyt3 threads [OPTIONS]

--project

Project id or folder (default: all projects).

--all

:mdi-flag: Flag Include subagent threads.

--status

Multiple values allowed. Only threads in this status (repeatable).

Search titles, branches, PRs and messages instead.

--limit

Default: 50

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

show

Show a thread's state and its latest messages.

pyt3 show [OPTIONS] {thread}

thread

"REQUIRED" Thread id.

--activity

:mdi-flag: Flag Include tool calls, reasoning and runtime requests.

--limit

Default: 10 Latest items to show.

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

start

Start a thread and print its id (or, with --wait, the agent's reply).

pyt3 start [OPTIONS] {project} {message}

project

"REQUIRED" Project id, or a folder inside a project.

message

"REQUIRED" First prompt; - reads stdin.

--title

Thread title (default: the message's first line).

--provider

Provider instance id (see pyt3 models).

--model

Model slug of that provider.

--option

Multiple values allowed. Model option id=value (repeatable).

--mode

Runtime mode (default: the project's).

--plan

:mdi-flag: Flag Start in plan mode.

--worktree

Run in a new worktree from this branch, tag or commit.

--branch

Branch name for the new worktree.

--wait

:mdi-flag: Flag Wait for the run and print the reply.

--timeout

Stop waiting after this many seconds (exit 3).

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

send

Send a message to a thread.

pyt3 send [OPTIONS] {thread} {message}

thread

"REQUIRED" Thread id.

message

"REQUIRED" Message; - reads stdin.

--mode

auto (default): start an idle thread, steer or queue a busy one; queue: run after active work; steer: into the running turn; restart: interrupt and restart with this message.

--wait

:mdi-flag: Flag Wait for the run and print the reply.

--timeout

Stop waiting after this many seconds (exit 3).

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

wait

Wait until a thread's run ends; the exit code tells how it ended.

pyt3 wait [OPTIONS] {thread}

thread

"REQUIRED" Thread id.

--run

Run to wait for (default: the latest).

--timeout

Stop waiting after this many seconds (exit 3).

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

interrupt

Interrupt a thread's running turn.

pyt3 interrupt [OPTIONS] {thread}

thread

"REQUIRED" Thread id.

--run

Run to interrupt (default: the newest running).

--reason

Why; shown in the thread.

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

pending

List the questions a thread's agent waits on (approvals are not listed).

pyt3 pending [OPTIONS] {thread}

thread

"REQUIRED" Thread id.

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.

answer

Answer an agent's pending question. Cannot approve permission requests.

pyt3 answer [OPTIONS] {thread} {request_id} {answers}...

thread

"REQUIRED" Thread id.

request_id

"REQUIRED" Request id from pyt3 pending.

answers

"REQUIRED" question-id=answer, where the answer is an option value or label, or free text. Repeat a question id to select several options.

--json

:mdi-flag: Flag Print JSON instead of text.

--help

:mdi-flag: Flag Show this message and exit.