Skip to content

Configuration

Setup options, local settings and scripting conventions for the Theseus CLI.

This page covers the CLI settings you can change and how to call the CLI from scripts. Each command has its own page in the CLI reference, such as theseus generate; theseus help <command> shows the help for your installed version.

Advanced setup

Link to this section

Run theseus setup --help for the options your installed version supports.

Local configuration

Link to this section

By default, the CLI stores its login and local state in ~/.theseus. THESEUS_HOME moves that state to another directory; keep it private and writable by the agent. Choosing an empty directory also means there is no saved login there: sign in using the same THESEUS_HOME. Switch workspaces with theseus workspace rather than editing the state files.

THESEUS_TOKEN, when set, takes precedence over the saved login. THESEUS_API selects the API for that environment credential (default https://app.theseus.dev). A full CLI login works for agent notes and other CLI commands. Never commit login files or token values.

With an environment login, theseus login asks you to unset THESEUS_TOKEN and THESEUS_API before signing in, and workspace switching is unavailable. To repair a wrong account or workspace, update the personal credential at its source, or remove those variables and run theseus login followed by theseus workspace. Check theseus status for a full CLI login, or theseus note list for a personal token, in the agent's environment. theseus logout --revoke revokes an environment login for every instance using that credential; ordinary theseus logout does not remove it from the parent environment.

Set THESEUS_NO_UPDATE_NOTICES=1 to hide update reminders.

theseus generate with no target compares the current branch against the remote's default branch. If your main branch is a different one, set it:

git config theseus.mainBranch refs/heads/main

Push the base and head commits first: theseus generate reads the code from GitHub, not from your checkout.

Commands that take --json print structured results on stdout and progress on stderr. Check the exit code as well as the JSON:

Exit codeMeaning
0Success
1Failure; with --json, an {"event":"error","code":…} line says why
2Invalid arguments
8A --timeout passed first; the run keeps going on the server
130Stopped with Ctrl-C (143 for SIGTERM); a run you were waiting on keeps going

To wait for a guide from a script:

theseus wait example/project#42 --for ready --timeout 60 --json

It prints one line whose outcome is ready, failed or pending, with the changeset. To check whether the latest guide covers the PR's head, read behind_head from theseus changeset status example/project#42 --json.