Quick Start
Get running with Krnl in minutes. Krnl is an AI coding agent that reads your codebase, reasons through tasks, and writes code with full context of your project conventions.
What is Krnl?
Krnl is a coding agent that works in your terminal, VS Code, or as a desktop app. Unlike simple code completion tools, Krnl understands your entire codebase through a Code Knowledge Graph, remembers your conventions across sessions, and follows a minimalist coding philosophy called Razor Mode that avoids over-engineering.
Parses your codebase into a graph of imports, calls, and inheritance — so the agent knows what connects to what without reading every file.
YAGNI-first coding discipline. The agent writes minimal, surgical code — no boilerplate, no unnecessary abstractions, no wasted lines.
All file edits require approval. Destructive operations are blocked. Full audit log of every action. Rollback anytime.
Prerequisites
Step 1: Install Krnl
Choose your preferred installation method and platform:
Select Platform
CLI for Windows
irm /install.ps1 | iex
- 1Open PowerShell as Administrator
- 2Run the one-liner command above
- 3Verify installation: krnl-code --help
Step 2: Authenticate
Krnl requires authentication to access the agent service. Run the login command:
This opens your browser for OAuth login. Credentials are saved to ~/.krnl/credentials.json and shared between CLI and VS Code extension.
krnl.ai during the OAuth flow.Step 3: Configure Your LLM Provider
Krnl works with 14+ LLM providers. You can configure them via environment variables or interactive slash commands.
Option A: Interactive Setup (Recommended)
Launch Krnl and use slash commands:
$ krnl-code ✦ Krnl Agent · Configuring... you ❯ /provider openai ✓ Provider set to: openai you ❯ /key Paste your API key: **** ✓ API key saved you ❯ /model gpt-4o ✓ Model set to: gpt-4o you ❯ /config provider : openai model : gpt-4o api key : set ✓
Option B: Environment Variables
Set environment variables before launching:
# OpenAI export KRNL_PROVIDER=openai export KRNL_API_KEY=sk-your-key-here export KRNL_MODEL=gpt-4o # Or Anthropic export KRNL_PROVIDER=anthropic export KRNL_API_KEY=sk-ant-your-key-here export KRNL_MODEL=claude-sonnet-4-6
Supported Providers
Step 4: Run Your First Task
Navigate to your project directory and launch Krnl. Give it a coding task in natural language:
Core Concepts
Understanding these concepts will help you get the most out of Krnl:
A markdown file in your project root that stores conventions, build commands, and coding standards. Loaded every session automatically.
By default, Krnl shows proposed changes as diffs and asks for approval before writing. Use --safe for dry-run or --apply to auto-execute.
Each conversation is a session. Use --resume to continue the latest session or --session <id> for a specific one.
Krnl can use different models for different phases (planning vs execution). Run /multi-llm to see the routing table.
Essential Commands
Here are the most important commands to know as a new user:
Session Commands
Code Work Commands
Safety Commands
CLI Quick Reference
krnl-code # Start interactive session krnl-code --resume # Resume latest session krnl-code --session <id> # Resume specific session krnl-code run "add a /health route" # One-shot task (non-interactive) krnl-code run "fix bug" --yes # Auto-approve all actions krnl-code run "review PR" --json # Output structured JSON krnl-code providers # List configured providers krnl-code models # List available models from provider krnl-code doctor # Environment self-check krnl-code auth-login # Authenticate via browser OAuth krnl-code auth-status # Check auth status krnl-code update # Update to latest version
Tips for New Users
/init to scaffold project memory. Add your build commands, lint rules, and coding conventions./plan before complex tasks. The agent will research and propose a plan before making changes./compact to summarize and free up context.