KCode CLIBuilt-in Tools

Built-in Tools

KCode ships with 48 built-in tools for code exploration, modification, and automation.

File Operations

ToolDescription
ReadRead file contents (supports images, PDFs, notebooks)
WriteCreate new files
EditExact string replacement in existing files
MultiEditMultiple edits in a single tool call
GlobFind files by pattern (e.g., **/*.tsx)
GrepSearch file contents with regex (powered by ripgrep)
GrepReplaceFind-and-replace across files with regex
RenameRename or move files/directories
LSList directory contents
DiffViewView diffs between files or commits

Execution

ToolDescription
BashExecute shell commands with safety analysis
AgentSpawn subagents (general, explore, plan, custom)
TestRunnerRun tests with framework auto-detection
NotebookEditEdit Jupyter notebook cells (.ipynb)

Git

ToolDescription
GitStatusShow working tree status
GitCommitCreate commits
GitLogView commit history

Web

ToolDescription
WebFetchFetch and extract content from URLs (SSRF-protected)
WebSearchSearch the web
BrowserHeadless browser automation (navigate, click, screenshot)

Generation & Deployment

ToolDescription
DeployDeploy web/API projects to Vercel, Netlify, Fly.io, Railway
ImageGenGenerate images via local SD or cloud providers
KulvexCall the Kulvex platform API (authenticated)
LearnStore/retrieve long-term learnings and distilled examples

Worktrees

ToolDescription
EnterWorktreeCreate an isolated git worktree for safe experimentation
ExitWorktreeLeave and optionally merge worktree changes

Planning & Tasks

ToolDescription
PlanModeEnter/exit structured multi-step task planning
TaskCreateCreate tasks with dependencies
TaskGetRead task details
TaskListList all tasks
TaskUpdateUpdate task status
TaskStopCancel a running task
TaskOutputGet task output

Scheduling

ToolDescription
CronCreateSchedule recurring commands
CronListList scheduled jobs
CronDeleteRemove scheduled jobs

Session & Memory

ToolDescription
ClipboardCopy/paste to system clipboard
UndoRevert the last file change
StashStash/restore work in progress

LSP

ToolDescription
LSPLanguage Server Protocol integration (go-to-definition, references, diagnostics)

Communication

ToolDescription
AskUserRequest clarification from the user
SendMessageInter-agent communication in swarm mode
SkillInvoke registered slash command skills
ToolSearchDiscover available deferred tools
SyntheticOutputReturn pre-computed output without an LLM call (test harness)

MCP Resources

ToolDescription
ListMcpResourcesList resources exposed by connected MCP servers
ReadMcpResourceRead a specific MCP resource by URI

MCP Tools

KCode supports the Model Context Protocol for external tool servers.

MCP tools appear alongside built-in tools. You can restrict which tools each server exposes:

// ~/.kcode/settings.json
{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["my-mcp-server"],
      "allowedTools": ["read_*", "search_*"],
      "blockedTools": ["dangerous_tool"]
    }
  }
}

Bash Safety

KCode analyzes bash commands before execution:

  • Flags destructive operations (rm -rf, git reset --hard)
  • Detects secrets in arguments
  • Warns about network-affecting commands
  • Detects command injection patterns (pipe-to-shell, quote desync)
  • Requires explicit approval for risky operations
  • Protected system directories (/etc, /usr, /bin) are blocked for writes