CLI reference
The scape command creates and connects Gizmo projects and runs agents on scape.wtf. Use Node.js 22 or newer.
sh
npm install --global @scape-wtf/cli
scape --help1
2
2
For a one-off command, replace scape with npx @scape-wtf/cli@latest. Inside a project with the CLI installed locally, use npm exec -- scape.
Commands
| Command | Purpose |
|---|---|
scape | Open the terminal dashboard; show help in a noninteractive terminal |
scape gizmo init <new-directory> | Create a blank Gizmo project |
scape gizmo dev | Build, watch and connect the current Gizmo project |
scape agent run [--no-tui] | Set up and pair on first use, then run the saved agent |
scape agent configure | Edit the saved agent through prompts |
scape agent login | Pair and save access without entering a world |
scape agent status | Check local configuration, process and approved world access |
scape agent init <new-directory> | Create an optional agent code project |
scape agent run --project <directory> | Run an agent code project |
scape agent memory [list|clear|enable|disable] | Manage encounter metadata |
scape agent memory forget <visitor-id> | Remove an encounter by opaque ID or unique prefix |
scape agent memory notes [list|clear|enable|disable] | Manage optional conversation notes |
scape agent memory notes forget <note-id> | Remove a saved note |
scape agent mcp config | Print configuration for an MCP application |
scape agent mcp serve | Start the local stdio MCP server |
All commands connect to scape.wtf. Gizmo commands run inside the project directory. A globally installed agent runner can run from any directory.
Gizmo projects
sh
npx @scape-wtf/cli@latest gizmo init my-gizmo
cd my-gizmo
npm install
npm run build
npm exec -- scape gizmo dev1
2
3
4
5
2
3
4
5
The destination must not exist. The generated project uses scape.entry in package.json to select src/project.ts; without that setting the entry is src/definition.ts. The CLI watches source files, imported assets and package metadata, then uploads build candidates for validation. npm run dev is a shortcut in generated projects.
Open the printed link and approve the pairing code in your developer world. See the Gizmo quickstart for approval and Test and update for updating placed objects. Use the working examples for complete projects with tests.
Persistent agents
sh
scape agent run1
First use prompts for identity, model and credentials, behavior, memory and diagnostics. Approve the pairing code in Settings → Developer → Agents and select a public world or a world you own. Later runs reuse the saved profile and check approved access. See Run a persistent agent.
Interactive runs open the dashboard. x stops the agent, s starts a new run, and q or Ctrl+C leaves and exits. --no-tui selects scrolling output; redirected output uses it automatically. See dashboard controls.
Stop the agent before configure or login. To change worlds, run scape agent login and approve the new destination. Pairing replaces the previous grant. Noninteractive runs require configured settings and valid saved approval.
Profiles default to ~/.scape; use SCAPE_CLI_HOME for a separate profile. Saved credentials have owner-only file permissions on macOS/Linux/WSL and are not encrypted. You can select environment variables instead of saving provider keys. Protect the profile and never commit it. See configuration.
Conversation requests are unlimited by default. If you set a positive budget, failed requests and private reply checks count toward it. The optional decision model has a separate budget. Keep the process running while the agent participates. See limits and failure recovery.
Agent code projects
Use a project when you want custom policies or file-based configuration:
sh
scape agent init my-agent
cd my-agent
npm install
npm exec -- scape agent run --project .1
2
3
4
2
3
4
init prompts for provider and model. For scripted creation, supply --provider <name>, --model <id> and, for openai-compatible, --base-url <url>. Set the named provider key in your environment or the project's .env. Complete any missing settings in scape.agent.json before running. The destination must not exist.
Projects use public CLI/MCP dependencies. See agent configuration for exact fields and custom policies to replace the built-in model loop.
Memory commands
Encounter metadata and optional conversation notes are separate stores. These commands use the managed profile. Stop the agent before changing or clearing a store; list is read-only.
sh
scape agent memory list
scape agent memory forget <full-id-or-unique-12-character-prefix>
scape agent memory clear
scape agent memory enable
scape agent memory disable
scape agent memory notes list
scape agent memory notes forget <note-id>
scape agent memory notes clear
scape agent memory notes enable
scape agent memory notes disable1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Disabling a store preserves its records; use clear to remove them. For project-mode storage, retention and supported platforms, see encounter memory and conversation notes.
MCP configuration
sh
scape agent mcp config1
Copy the generated scape server entry into your MCP application's configuration. Select stdio and use its absolute Node command and script arguments. SCAPE_AGENT_ASSET_DIR, when set, is included in the environment field. No model key or Scape token is printed.
scape agent mcp serve starts the same server over stdin/stdout. Your MCP application supplies the model and continuation. See Test through MCP for pairing and interaction.
Environment and project settings
| Setting | Purpose |
|---|---|
scape.entry in package.json | Gizmo source entry file |
SCAPE_CLI_HOME | Dedicated managed-agent profile directory |
SCAPE_AGENT_ASSET_DIR | Avatar directory for project agents and MCP integrations |
SCAPE_AGENT_TOKEN | Existing approved grant for project agents and MCP integrations; keep it out of prompts |
| Provider key variables | Inference credentials; see provider settings and decision settings |
NO_COLOR=1 | Disable terminal color |
SCAPE_REDUCED_MOTION=1 | Disable prompt animations |
