CLI & SDK guideThe CLI
Skills for coding agents
Two skills that let a coding agent deploy and write Toft apps on its own — what they cover and how to install them.
Toft publishes two agent skills: the instructions a coding agent loads before
it touches Toft. They live beside the client, in
larchway-labs/toft-cli, and are
updated with every toft release.
| Skill | Load it to | Source |
|---|---|---|
| toft-cli | Ship an app: sign in without a browser, the deploy loop, exit codes and --json shapes, jobs and their runs, what toft refuses and why |
SKILL.md |
| toft-sdk | Write the app: PORT, HOST and BASE_PATH, how the build detects a framework, toft.toml, and the SDK for Python, Node, R and Go |
SKILL.md |
Install them
Section titled “Install them”toft carries both skills, matched to the commands that binary has. Write each
into the folder your agent reads skills from:
| Agent | Folder |
|---|---|
| Claude Code | ~/.claude/skills |
| Codex, Cursor, and other agents that read the Agent Skills format | ~/.agents/skills |
dir=~/.claude/skills # or ~/.agents/skillsfor s in toft-cli toft-sdk; do mkdir -p $dir/$s toft skill $s > $dir/$s/SKILL.mddoneFor one project only, use .claude/skills or .agents/skills in that
repository instead. toft skill with no name lists the skills, and it needs no
sign-in. Run the loop again after upgrading toft.
To fetch them without toft installed, download them from the repository:
for s in toft-cli toft-sdk; do mkdir -p $dir/$s curl -fsSL -o $dir/$s/SKILL.md \ https://raw.githubusercontent.com/larchway-labs/toft-cli/main/skills/$s/SKILL.mddoneA copy from the repository describes the latest release, which may be newer
than your toft; toft skill is the copy that matches.
Give the agent a key, not a browser
Section titled “Give the agent a key, not a browser”toft login opens a browser and waits for a person. An agent signs in with a
key instead:
printf '%s' "$TOFT_KEY" | toft login --token-stdin https://toft.example.comUse a personal key (toftu_, Your account → Credentials) for an agent
working on your behalf, or a deploy key (toftd_, Admin → Deploy keys) for
one running unattended. See Signing in.
Have the agent run toft whoami first. It says what the key may do and what the
install allows, so the agent learns its limits before trying a deploy.
What an agent gets back
Section titled “What an agent gets back”toft checksays whether a deploy would be refused, without one.toft deploy --verify /pathfails unless the page answers.toft fetch /pathshows what the app returns, with the body capped at 8 KB so a large page does not flood the agent’s context.- Flags go anywhere on the line, so an agent does not have to reorder a command it composed.
- With
--json, every refusal carriescode,retryableand often ahint. An agent should retry only whenretryableis true, and pass thehinton to a person when the next step is theirs. See Errors as JSON.