Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Krnl CodeNew to Visual Studio Code? Get it now.
Krnl Code

Krnl Code

Krnl Code

|
7 installs
| (0) | Free
Lightweight agentic coding assistant (Cline/OpenCode-style). Plan, edit, and run code with approvals. Works with Krnl/Krnl, OpenAI, OpenRouter, Anthropic, Ollama, or any OpenAI-compatible/self-hosted model.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Krnl Code - VS Code Extension

A lightweight agentic coding assistant that brings the power of autonomous AI coding directly to your editor. Plan, edit, and run code with approvals using your preferred AI provider.

Settings

Features

  • Universal Model Support: Works with OpenAI, Anthropic, Google Gemini, OpenRouter, Groq, Cerebras, DeepSeek, Together, Mistral, xAI, Vercel AI Gateway, Ollama, LM Studio, or any OpenAI-compatible/self-hosted model
  • Autonomous Coding: The agent plans, reads, edits, runs commands, and verifies results iteratively until your task is complete
  • Approval Workflow: Human approval required for potentially dangerous operations - you stay in control
  • Plan Mode: Research and propose changes before execution - perfect for complex refactors
  • Razor Mode: YAGNI-first coding discipline with 3 intensity levels (minimal/full/ultra) - cuts tokens by 30% and cost by 27%
  • Multi-Model Routing: Assign different models to different phases (plan/execute/subagent/verify) for optimal cost-performance
  • Memory V2: Seven structured stores for intelligent context tracking with full-text search
  • Security First: Built-in security auditing, dependency scanning, and approval workflows
  • Session Persistence: Remember conversations per workspace across reloads
  • Project Memory: Create AGENTS.md files to provide project-specific context to the agent
  • CLI Integration: Full command-line interface for headless operation and CI/CD pipelines
  • Deployment Pipeline: End-to-end: plan → build → test → scan → deploy → monitor → self-heal
  • MCP Support: Connect external tools via Model Context Protocol
  • 16+ Deployment Targets: Cloud Run, Cloudflare, Vercel, Netlify, Render, Fly, Railway, Docker, Kubernetes, AWS, Azure, Neon, Supabase

Installation

VS Code Marketplace

Install "Krnl Code" directly from the VS Code Marketplace

Open VSX (for Cursor, VSCodium, Windsurf)

Install from Open VSX

CLI Installation (Recommended for full features)

Install the standalone CLI binary (no Python required):

Windows (PowerShell):

irm https://krnl.ai/install.ps1 | iex

macOS / Linux:

curl -fsSL https://krnl.ai/install.sh | sh

Manual Installation

Download the extension directly: krnl-code.vsix

Then install from the command line:

code --install-extension krnl-code.vsix

Build from Source

npm install -g @vscode/vsce
cd extension
vsce package
code --install-extension krnl-code-*.vsix

Quick Start

  1. Install the Extension - Search for "Krnl Code" in the VS Code Extensions panel and install
  2. Authenticate - Click the account icon and select Login to authenticate with your Krnl Code account
  3. Open the Chat Panel - Click the robot icon in the activity bar or run Krnl Code: Open Chat
  4. Configure Your Provider - Click the key icon to set your API key and select your provider
  5. Start Coding - Type your task in the chat and watch the agent work!

Configuration

Authentication (Required)

Authentication is required before using the agent. Both CLI and extension share credentials via ~/.krnl/credentials.json.

  • Click the account icon in the toolbar to Login, check status, or Logout
  • You must authenticate before configuring providers or running tasks

Setting API Key

  1. Open the Krnl Code chat panel
  2. Click the key icon (Set API Key / Provider) or run Krnl Code: Set API Key / Provider
  3. Select your provider (openai, anthropic, gemini, groq, ollama, etc.)
  4. Paste your API key when prompted
  5. Your key is stored securely in ~/.krnl-code

Settings

Provider Selection

  • OpenAI: Supports GPT-4, GPT-3.5, and other OpenAI models
  • Anthropic: Native Claude support with enhanced capabilities
  • Google Gemini: Direct integration with Google's models
  • OpenRouter: Access to 200+ models through a single API
  • Groq: Ultra-fast inference with Llama and Mixtral models
  • Cerebras: Ultra-fast inference with Llama series
  • DeepSeek: DeepSeek models
  • Together AI: Multiple open-source models
  • Mistral: Mistral models
  • xAI: Grok models
  • Vercel AI Gateway: Gateway-routed models
  • Ollama: Run local models like Llama 3, Mistral, etc.
  • LM Studio: Run local models
  • Custom: Any OpenAI-compatible endpoint

Extension Settings

Configure these in VS Code Settings (Ctrl+,) under Krnl Code:

  • Model: Override the model ID for the active provider (empty = provider default)
  • Server URL: Connect to a self-hosted backend (advanced)
  • Token: Bearer token for remote/self-hosted backend
  • Persist History: Remember conversation per workspace across reloads (default: true)
  • Effort: Reasoning effort for thinking-capable models (low/medium/high)
  • Auto Diagnostics: Offer to fix new error diagnostics after tasks (default: true)
  • Temperature: LLM temperature (0 = deterministic, 2 = most random)
  • Max Tokens: Maximum tokens in LLM response
  • Max Steps: Maximum agentic loop iterations per task
  • Max Context Tokens: Compact history above this estimated token count

Commands

Chat & Task Management

Command Description
Krnl Code: Open Chat Open the main chat interface
Krnl Code: Stop Current Task Stop the currently running task
Krnl Code: Undo Last Task's Changes Revert file changes from the last task

Configuration

Command Description
Krnl Code: Set API Key / Provider Configure your API key and provider
Krnl Code: Select Provider Switch between AI providers
Krnl Code: Set Model Change the model for the active provider
Krnl Code: Select Workspace Folder Choose the working directory

Modes & Controls

Command Description
Krnl Code: Toggle Auto-Approve Enable/disable automatic approval for edits
Krnl Code: Toggle Plan Mode Switch between plan and execute modes
Krnl Code: Toggle Dangerous Mode Disable all approvals (use with caution!)
Krnl Code: Toggle Razor Mode Toggle YAGNI-first coding discipline (off/minimal/full/ultra)

Project & Memory

Command Description
Krnl Code: Create Project Memory Create AGENTS.md for project-specific context
Krnl Code: Onboard Project Scaffold .krnl/ wrapper with memory and skills

Code Quality & Security

Command Description
Krnl Code: Fix Diagnostics Automatically fix error diagnostics in changed files
Krnl Code: Review Changes Review uncommitted git changes for bugs and improvements

Backend Management

Command Description
Krnl Code: Restart Backend Restart the backend server
Krnl Code: Attach Image Attach an image to the current conversation
Krnl Code: Attach File Attach a file to the current conversation

Account

Command Description
Krnl Code: Login Authenticate with your Krnl Code account
Krnl Code: Check Authentication Status View your current authentication status
Krnl Code: Logout Sign out of your account

In-Chat Slash Commands

While in the chat interface, you can use these commands:

Setup & Configuration

  • /provider <name> - Switch the active provider
  • /key - Set the API key for the active provider
  • /model <id> - Set the model ID
  • /baseurl <url> - Set custom base URL
  • /config - Show current configuration
  • /providers - List all provider profiles
  • /models [filter] - List available models from the active provider (optional filter)
  • /multi-llm - Show multi-model routing table
  • /multi-llm auto - Auto-configure routing from known model tiers
  • /multi-llm setup - Interactive wizard to pick models for each role
  • /routing [on|off] - Toggle multi-model routing
  • /effort <low|medium|high> - Set reasoning effort

Modes

  • /plan - Enable plan mode (research first, then execute)
  • /execute - Enable execute mode (default)
  • /razor [minimal|full|ultra|off] - Toggle YAGNI-first coding discipline

Code Work

  • /review - Review uncommitted git changes
  • /security - Full security audit of the codebase
  • /scan - Fast secret + dependency vulnerability scan
  • /secfix - Autonomous security remediation
  • /test [target] - Write and run tests
  • /testall - Build comprehensive test suite
  • /ship [what] - End-to-end: plan → build → test → scan → deploy
  • /deploy [target] - Deploy to a live URL
  • /monitor - Show monitoring status
  • /heal [url] - Self-heal deployment

Project & Memory

  • /init - Create AGENTS.md project memory
  • /onboard - Scaffold .krnl/ wrapper
  • /skills - List available skills
  • /search <text> - Search past sessions
  • /attach <file> - Attach image or text file to next task

Safety & Diagnostics

  • /audit - Show tamper-evident action log
  • /doctor - Run environment self-check
  • /yes - Toggle auto-approve
  • /dangerous - Toggle dangerous mode

Session Control

  • /usage - Show token usage and costs
  • /compact - Summarize conversation to free context
  • /undo - Revert last task's changes
  • /reset - Clear conversation context
  • /help - Show help
  • /exit - Quit session

Appearance

  • /theme <name> - Set color theme (default/dracula/monokai/solarized)
  • /spinner <name> - Set spinner style (braille/dots/arrows/bounce/box/clock/wave)

CLI Installation

For headless operation or CI/CD integration, install the standalone CLI binary (no Python required):

Windows (PowerShell):

irm https://krnl.ai/install.ps1 | iex

macOS / Linux:

curl -fsSL https://krnl.ai/install.sh | sh

Or download the standalone binary directly:

Platform Download
Windows x64 krnl-code-windows-x64.exe
macOS (Apple Silicon) krnl-code-macos-arm64
Linux x64 krnl-code-linux-x64

Note: macOS Intel (x64) is not currently supported. Please use an Apple Silicon (ARM64) Mac.

# Linux / macOS
chmod +x krnl-code-*
./krnl-code-* --help

# Start interactive session
./krnl-code-*

# Run single task
./krnl-code-* run "Fix the login bug"

# Auto-approve mode
./krnl-code-* run "Add tests" --yes

# Windows (double-click or run in terminal)
krnl-code-windows-x64.exe --help

# Start interactive session
krnl-code-windows-x64.exe

# Run single task
krnl-code-windows-x64.exe run "Fix the login bug"

# Auto-approve mode
krnl-code-windows-x64.exe run "Add tests" --yes

CLI Commands

Command Description
krnl-code Start interactive session
krnl-code run "<task>" Run single task and exit
krnl-code serve Run HTTP/WebSocket server
krnl-code auth-login Authenticate via browser
krnl-code auth-status Check authentication status
krnl-code auth-logout Clear credentials
krnl-code providers List configured providers
krnl-code models List available models from the active provider
krnl-code init Scaffold config.yaml and .env
krnl-code update Update to latest version
krnl-code onboard Scaffold .krnl/ wrapper
krnl-code security Run security audit
krnl-code scan Fast risk scan
krnl-code secfix Security remediation loop
krnl-code test Write and run tests
krnl-code ship "<what>" End-to-end deployment
krnl-code deploy Deploy to live URL
krnl-code monitor Show monitoring status
krnl-code heal Self-heal deployment
krnl-code doctor Environment self-check
krnl-code audit Show action log
krnl-code init-ci Create GitHub Actions workflow
krnl-code plugin Manage plugins/skills
krnl-code sessions List saved sessions
krnl-code team List multi-agent teams
krnl-code schedule Cron-driven scheduled agents
krnl-code version Show installed version

How It Works

  1. Task Input: You describe what you want to accomplish in natural language
  2. Planning: The agent analyzes your request and creates a step-by-step plan
  3. Execution: The agent uses tools to read files, edit code, run commands, and verify results
  4. Approval: For potentially dangerous operations, the agent asks for your approval
  5. Iteration: The agent continues until the task is complete or you stop it
  6. Learning: The agent remembers context and improves with each interaction

Security & Privacy

  • Local Execution: All file operations happen on your machine
  • Approval Required: Dangerous operations require explicit approval
  • Audit Trail: All actions are logged in .krnl/audit/
  • Secure Storage: API keys stored securely in ~/.krnl-code
  • Sandbox: Tools run with appropriate permissions and restrictions
  • No Code Sending: Your code is only sent to the AI provider you choose

Requirements

  • VS Code: Version 1.85.0 or higher
  • API Key: For your chosen AI provider

The extension automatically uses the standalone CLI binary when available. No Python installation is required.

Troubleshooting

Backend won't start

  • Install the CLI binary using the one-liner install scripts (recommended)
  • Run Krnl Code: Restart Backend
  • Check the Output panel for error details

Authentication issues

  • Run Krnl Code: Login to re-authenticate
  • Check authentication status with Krnl Code: Check Authentication Status
  • Clear credentials with Krnl Code: Logout and login again

API key issues

  • Verify your key is correct for the selected provider
  • Check provider status pages for outages
  • Try /config to view current configuration

Context issues

  • Use /compact to summarize long conversations
  • Enable project memory with /init or /onboard
  • Adjust model for larger context windows

Support

  • For issues and questions, please contact us at https://krnl-code.vercel.app/support
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft