kbcode Commands
Every slash command available inside the kbcode chat — type /help to see them there too. Terminal flags are shown at the bottom.
Session & Chat
/statusshow provider, model, mode and context size
/contextshow where the context tokens go — system prompt, per-role totals, biggest messages
/compactsummarize earlier chat to free up context
/costone-line cost summary — model · tokens · $ (see /insights for detail)
/usageshow current session token usage (model, tokens in/out, est. cost)
/insightsshow tokens used and estimated cost (this chat + all saved sessions)
/sessions [query]list past chat sessions for this project, or full-text search them; /sessions name <title> renames the current one
/export [id]export a session (current, or by id) as a markdown file
/resume [id]resume a past session (no id = pick from a list)
/resetforget this chat (memory + kb are kept; starts a fresh saved session)
/exitquit
/viewopen the last reply in your browser (terminals draw Telugu/Hindi/Arabic etc. broken)
/copy [n]copy the last reply's code block (or block n; no blocks = whole reply) to the clipboard
/outputshow the last run_command result again without re-running it
/rerunre-run the last shell command (like !!) — no model turn, no retyping
/retryre-send your last message as a fresh turn (after an error or interrupt) — no retyping
/bannerreprint the startup banner panel
/versionshow the kbcode version
/wipshow git work-in-progress — staged, unstaged, and untracked file counts
/open <folder>switch to working on another project folder
/loginsign in with Google (activate kbcode) — same as kb login
/logoutsign out — forget the stored sign-in
Models & Providers
/model [id]switch model (no id = list this provider's models)
/provider [name] [model]switch provider (no name = list them)
/mode [name]switch mode: code / architect / ask / debug / driven / pilot / orchestrator (no name = list)
/temperature <val>|noneset sampling temperature (0, 0.01 … 1.00) or 'none' for default; applies to next turn
/thinking <level>set thinking level: off | minimal | low | medium | normal | high | max | xhigh
/maxtokens <n>|autoset max output tokens, or 'auto' to let it follow the current model automatically
/fallback [vision] <provider> [model]set an optional failover / image-fallback model (no args = show; 'off' to clear)
/apimanage API keys — view/replace key, add rotation reserves, or set a key for another provider
/autotoggle auto mode: agent works without permission prompts or questions (also Shift+Tab)
/thoughtsshow the model's full reasoning from the last turn (collapsed by default)
/config [knob] [value]show or live-toggle advanced knobs: strict_tools, subagent_verbose, image_input_mode
/llmLLM Test Center — test, allow, block, remove, custom prompts (gate ledger)
/repetition [freq|pres|rep|off]manage anti-repetition penalties (-2.0..2.0; OpenAI-compat providers only)
Knowledge & Memory
/kblist knowledge-base notes
/initscan this project's code and build (or refresh) the kb/ knowledge base
/memoryshow recent long-term memory
/memory-prune [days]remove duplicate memories (and, if given, anything older than [days])
/skillslist saved skills (.kbcode/skills/ + ~/.kbcode/skills/; run one with /<name>)
/skill [action] [name]manage skills: run / view / improve / delete / undo (bare = picker; undo restores)
/learn [topic]save what we just did as a reusable skill
/kb-check [--fix]check (or auto-fix) kb/ path:line pointers
/kb-refreshbatch-scan and auto-fix stale kb/ path:line pointers
/kb-undo <note>restore a kb/ note from its last pre-overwrite backup (kb/.history)
/curatereview the knowledge base: stale notes, oversized notes, broken pointers, and summary stats
/todoshow the agent's current task checklist
/worklogshow this session's work diary (goal / rules / state / doubts / history)
/mistakes [clear]show (or wipe) the active mistake notes the model is currently bound by
Work & Git
/commit [message]stage all changes and commit — bare /commit drafts the message (one model call); --amend; --push (-p) pushes after
/pr [title]push the branch and open a GitHub PR via gh — bare /pr drafts the title+body; /pr comments pulls review feedback
/bg <task>run a whole agent task in the background (own git worktree; result = reviewable branch)
/taskslist background agent tasks and their status
/task <id> [merge|discard|log|diff]review a background task — see its diff, then merge or discard
/gaterun the release gate — pytest, ruff --fix, git-status guard, compileall
/undo [file]revert the last turn's edits in one step — or just one file
/rollbackundo AI edits — pick a checkpoint from a menu (auto-saved before every edit)
/diff [n]show what the AI changed since a checkpoint (no n = newest; list them with /rollback)
/search <pattern> [--path <dir>] [--limit <n>]search the project with a regex — instant, no model cost (alias: /grep)
/deadcode [dir]sweep project (or subdir) for symbols defined but referenced nowhere — heuristic candidate list
/review [<file>|<range>]structured code review — bare /review reviews uncommitted changes; or a file, or @HEAD~3..HEAD
/explain <file> [func]explain what a file or function does — file:line-range, or file function-name
/json <question>one-shot structured answer: a single tool-less model call whose output is guaranteed valid JSON
/doctorrun a full health check (PATH, install, KB, provider, self-tests)
/toolslist every tool available in the current mode (the model's view of what it can do)
/pluginslist loaded plugin tools (.kbcode/tools/*.py) and any load failures
/agentslist available subagents (.kbcode/agents/)
/mcp [reload]list connected MCP servers & their tools (reload = re-read settings.json + reconnect)
/debug [on|off]toggle debug mode: kbcode records its own errors + usage, runs self-tests in background
/feedback [on|off]opt in/out of sharing debug-mode feedback files with the kbcode team (OFF by default)
/benchmark [args]run the model benchmark suite (benchmarks/model_benchmark.py) — makes real API calls
/pingquick connectivity/auth check for the current provider
/help [command]show this help, or details for one command (e.g. /help bg)
/image [path]attach an image (clipboard, or a file) for your next message — also Alt+V
/video <path> [question]describe a local video (via an auxiliary vision model) for your next message
/transcribe <url> [language]fetch a YouTube video's transcript (captions) — no API key needed
Terminal Flags
kbstart chat in current folder
kb "task"run one task and exit
kb -y "task"auto-approve all edits
kb -ccontinue last session
kb --resumepick an older session
kb modelprovider & model wizard
kb doctorhealth check & diagnostics
kb updateself-update binary
git diff | kb "review"pipe stdin to the agent