CLI
Run single tasks from the terminal without opening the TUI.
Single Task
tfcode run "Explain this codebase"
tfcode run "Add error handling to src/api.ts"
tfcode run "Fix the failing test" --agent build
tfcode run --agent "TF Orchestrate" "Research the auth architecture and delegate the refactor"
tfcode run --agent "TF Engineer" "List all agents in my workspace"
Model Selection
tfcode run "Write a function to parse CSV" --model toothfairyai/your-model-id
See Providers for model discovery.
Profile Selection
tfcode -p prod run "Deploy to production"
TF_PROFILE=prod tfcode run "Force prod workspace"
Computer Use
Let the agent control the local OS GUI (mouse, keyboard, screen) for a single run:
tfcode run --computer "Open System Settings and turn on Dark Mode"
--computer pre-flights the machine first: if OS tools or permissions are missing, it prints the exact items to fix and exits — it will not start a session that can't capture or drive input. (Remote --attach runs control the remote machine, so the local pre-flight is skipped.)
Verify OS tools and permissions before the first run:
tfcode computer setup # install + prepare OS tools/permissions (one-time)
tfcode computer setup --install # auto-run the suggested install command
tfcode computer doctor # probe OS tools + permissions (✓/✗ report)
tfcode computer shot # capture one screenshot to verify capture works
See Computer Use for platform requirements, the full action set, and the env flag for server/non-interactive runs.
Sessions
tfcode session list
tfcode session delete <id>
tfcode session shared # list shared session documents (Knowledge Hub)
tfcode session shared --format json # machine-readable output
session shared lists every session you've shared to the Knowledge Hub, stored as documents under the tfcodeSession folder. See Sharing Sessions.
Import & Export
tfcode export [sessionID]
tfcode import <file>
import also retrieves a shared session directly from the Knowledge Hub. Pass either a share URL or a bare document ID:
tfcode import https://app.toothfairyai.com/workspaces/<workspaceid>/mrc_contents/<docId>
tfcode import <docId>
Agents
tfcode agent list # list available agents
tfcode agent create "Describe an agent" # generate a new local agent
tfcode agent share <name> # upload a local agent to the workspace
tfcode agent share <name> --dry-run # preview without making changes
tfcode agent share <name> --force # force-update a same-name workspace agent
tfcode agent share <name> --profile prod # target a specific profile
agent share uploads a local agent (and the skills it references) to your workspace as a coder agent — the upstream mirror of tfcode sync. See Workspace Sync & Share.