cloudthinker binary, with its flags and exit codes. New to the CLI? Start with the CLI overview.
cloudthinker <command> --help for the exact syntax of the version you have installed.
Global options
Put global options before the command name.Sign-in commands
Details and CI patterns: CLI authentication.
Agent
cloudthinker with no command, or cloudthinker agent, starts CloudThinker Agent in the current folder. Every argument after agent goes to the agent unchanged.
The flags below need the agent command. Run cloudthinker agent --session <id> to reopen a session; the CLI rejects cloudthinker --session <id>. CLI 0.11.0 and earlier printed that rejected form on exit, so update with cloudthinker update.
Put the CLI’s own options before
agent. Everything after -- goes to the agent without the CLI reading it:
agent hands off to the agent process, so agent -p returns the agent’s own exit code, not the codes in Exit codes.
Remote agent
remote [TARGET] runs the agent on another machine over SSH and keeps it running when the connection drops or your laptop sleeps. The remote machine’s own CLI holds the agent in a background process, so you don’t need tmux. TARGET is a host from ~/.ssh/config, user@host, user@host:port, or ssh://user@host:port, and defaults to the last machine you used. The first time, name it: with no target and no earlier machine, the command exits 2 with Which machine? Run: cloudthinker remote <ssh-host>. Both machines need the CLI on macOS or Linux. When a Linux machine has no CLI, or one too old to update itself, your laptop offers to copy the matching build over the same SSH login; the machine needs only tar.
remote ls lists the saved machines, remote ls <MACHINE> [--json] lists the agents running there, and remote forget <MACHINE> removes a saved machine.
The remote agent runs the remote machine’s own cloudthinker, so it uses that machine’s login and workspace. Run cloudthinker login there first; over SSH it shows a short code.
Inside
cloudthinker remote, Ctrl+Z detaches and leaves the agent running on the remote machine. It doesn’t suspend a local job. Run cloudthinker remote again to return to it.Chat
Without
--json, stdout carries only the answer; progress and the continue_with= line go to stderr. See Headless chat.
Review
Review your local Git changes, or read a Review CloudThinker already runs on a merge request or pull request.
Every review command takes
--json. review and review watch also take --timeout <SECS> (default 2400; for a local review, the total across every part of a large diff) and --fail-on <low|medium|high|critical>, which exits 6 when a finding is at that severity or worse.
A local review reads your checkout with read-only tools and prints findings in the terminal. It doesn’t post comments, apply fixes, or change your Git index or working tree. After it finishes, it sends the findings to CloudThinker, so the first Review of the pull request for this branch credits them; --no-upload keeps them on your machine. It runs on the workspace’s Code Review model, so the diff and any file it reads go to CloudThinker’s model gateway, and it uses workspace credits. See What leaves your machine.
filtered means a repository filter skipped the merge request, so no review ran. review suggested means findings worth a look, with nothing blocking. Exit codes: a review that finishes without hitting --fail-on exits 0, and so does a filtered or stopped one. A failed review, or an MR URL with no review, exits 1. A wait that passes --timeout exits 4.
Incidents and recommendations
Incident statuses:
open, acknowledged, investigating, identified, on-hold, not-found, false-alarm, resolved, auto-resolved. not-found is a status, not a lookup error: the investigation found no root cause the evidence supports. incident status --wait exits 0 once the incident is resolved, auto-resolved, false-alarm, or not-found. If --timeout passes first, it exits 4.
Recommendation statuses: pending, in-progress, implemented, ignored.
Cyber
To run a security test, start the agent and ask for one in plain language, for example “Test http://localhost:3000 for security issues”. These commands check the results. See Cyber.
Every Cyber command takes
--json.
finding ls filter values: --severity is critical, high, medium, low, or info. --status is open, resolved, dismissed, or needs-verification. --triage is none, in-progress, or awaiting-retest.
cyber doctor --fix installs pinned versions of httpx and katana under ~/.cloudthinker/tools/, in your home folder, so it needs no sudo. It reports a missing curl but doesn’t install it.
cyber config reads .cloudthinker/config.toml in the project and ~/.cloudthinker/config.toml for your defaults (--user). A value you set wins over a derived one. cyber config show lists both.
Public API
See CLI for the Public API.
Connections, agents, and Policy
A TARGET is a connection ID, alias, or prefix fromconnections list.
Environments
worker runs this machine as an environment, so a chat or automation can work in a folder here. Full guide: Environments.
Update and shell completion
On an interactive terminal the CLI also offers an update when a newer release exists, at most every 20 hours.
update works only on an install the CLI installer created. On any other install, it refuses and prints the reinstall command: curl -fsSL https://cloudthinker.io/install.sh | sh. See the CLI overview.
${fpath[1]} isn’t writable, save the zsh file to a folder of your own and add that folder to fpath in ~/.zshrc before compinit.
Environment variables
Exit codes
Files
credentials.json is plain JSON with file mode 0600 in a 0700 folder, so only your user can read it. The CLI doesn’t use the OS keychain. Releases before 0.5.3 did, and the first run of a newer release moves those logins into the file and deletes the keychain entry. On a machine other people log in to, give each person their own OS account, and run cloudthinker logout --all when you’re done.
Uninstall
- If this machine runs an environment as a service, run
cloudthinker worker service uninstall. - Run
cloudthinker logout --allonce for each host you logged in to, using--urlfor any host other than the default. Or deletecredentials.json. - Delete the binary,
~/.local/bin/cloudthinker. - Delete the
~/.cloudthinkerfolder, and any completion script you saved, such as"${fpath[1]}/_cloudthinker". - Optional: delete
.cloudthinker/folders inside your projects.
Related
Agent CLI
Run CloudThinker Agent in your repository.
Headless Chat
Send prompts from scripts and CI jobs.