Slash commands
Type / in KnightCode's terminal editor to search the commands available in the current session. This page lists the built-in commands in the current KnightCode release.
Type / in KnightCode's terminal editor to search the commands available in the current session. This page lists the built-in commands in the current KnightCode release.
Extensions, prompt templates, and skills can add commands. The command menu in KnightCode is therefore the exact reference for the resources loaded in your session.
Models and settings
| Command | Description |
|---|---|
/settings | Open settings |
/model [provider/model] | Select a model |
/thinking [level] | Set the thinking level |
/scoped-models | Configure the models used by interactive cycling |
/login [provider] | Add provider authentication |
/logout | Remove provider authentication |
/usage | Show remaining subscription allowance and reset times for Claude, Codex and Grok sign-ins; see Subscription usage |
/tools | Turn webfetch, websearch, ask_user, the scratchpad, and the classifier gate off, on for this session, or on by default; pick the search provider, its key, and the gate's model |
/llama | Manage models on the configured llama.cpp router |
Sessions and context
| Command | Description |
|---|---|
/new | Start a new session |
/resume | Switch to another saved session |
/name [name] | Set the session display name, or show the current name when omitted |
/session | Show current session information and statistics |
/tree | Navigate the session tree |
/fork | Create a new session from an earlier user message |
/clone | Duplicate the current session at its current position |
/undo | Go back to an earlier user message; optionally restore the files edited after it |
/compact [instructions] | Compact the current context, optionally with custom instructions |
/import <path> | Import and resume a JSONL session |
Planning
| Command | Description |
|---|---|
/plan [task] | Enter enforced planning, send a planning task, or review an existing draft |
/plan off | Exit planning and retain the draft |
/plan approve [N [note]] | Explicitly approve and implement the latest revision, or revision N, with an optional note |
/plan approve fresh [N [note]] | Implement in a fresh session |
Commands require an idle session with no pending input. Without a draft,
/plan reports “No plan submitted yet; send a task to continue planning.” and
opens no dialog. See Plan mode for tool restrictions, headless
output, and restoration.
Export and share
| Command | Description |
|---|---|
/copy | Copy the last assistant message |
/export [path] | Export the session as HTML or JSONL |
/share | Upload the session and return a viewer link |
/remote | Publish this session to a live web link; see Remote sessions |
/bug [description] | Prepare a private bug report for the KnightCode developers |
Review a session before exporting or sharing it. Sessions can contain prompts, tool arguments, command output, file contents, and credentials exposed during the conversation.
Runtime and project
| Command | Description |
|---|---|
/trust | Save a project trust decision for future KnightCode processes |
/mcp | Manage MCP servers: sign in, reconnect, enable or disable, and change exposure |
/reload | Reload keybindings, extensions, skills, templates, themes, and context files |
/hotkeys | Show active keyboard shortcuts |
/changelog | Show changelog entries |
/quit | Quit KnightCode |
Commands added by resources
- Extensions can register commands with their own arguments and completion behavior.
- Each prompt template is available under its template name.
- Skills are available as
/skill:namewhen skill commands are enabled.
Use /reload after adding or changing a discovered command resource. See Extensions, Prompt Templates, and Skills for their loading and naming rules.
Codemode
The codemode tool lets the model write a JavaScript script that calls KnightCode's other tools and runs non-LLM models, such as classifiers and image models. Only the script's...
Settings Reference
This reference lists user-configurable settings, their types, defaults, and purposes. Project settings override agent-directory settings. Resource lists are combined. See...