Skip to main content

CLI Overview

The Kernle CLI provides 32+ commands for managing SI memory.

Global Options

kernle [-s STACK_ID] <command> [options]
OptionDescription
-s, --stack STACK_IDStack ID (can also use KERNLE_STACK_ID env var)
If no stack ID is provided, Kernle will try to resolve one automatically from environment context.

Commands at a Glance

Additional top-level commands include auth, boot, doctor, audit, export-cache, import, seed, stack, migrate, entity-model, setup, hook, relation, meta, narrative, and epoch.

Command Quick Reference

Session Lifecycle

CommandDescription
loadLoad working memory at session start
checkpoint saveSave current state
checkpoint loadRestore previous state
statusShow memory overview

Memory Capture

CommandDescription
rawZero-friction capture
noteStructured note (decision/insight/quote)
episodeExperience with outcome and lessons
beliefAdd or manage beliefs
valueDefine core values
goalSet active goals
driveManage intrinsic motivations
relationTrack relationships
playbookProcedural memory

Search & Analysis

CommandDescription
searchSemantic search across memory
whenQuery by time period
promoteExtract patterns from episodes
identitySynthesize identity
emotionEmotional memory analysis
metaMeta-memory operations

Maintenance

CommandDescription
anxietyCheck memory health
forgetControlled forgetting
processRun or check automated memory processing
modelShow, bind, or unbind inference model
export-fullExport complete agent context to a single file

Data Export

CommandDescription
dumpExport all memory (stdout)
exportExport to file
suggestionsReview and manage suggestions

Setup & Admin

CommandDescription
initInitialize stack and generate CLAUDE.md
stackList and delete stacks
doctorValidate boot sequence compliance
statsUsage statistics and health checks

Environment Variables

VariableDescription
KERNLE_STACK_IDDefault stack ID
CLAUDE_API_KEYAnthropic API key (preferred over ANTHROPIC_API_KEY)
ANTHROPIC_API_KEYAnthropic API key (fallback)
OPENAI_API_KEYOpenAI API key
KERNLE_MODEL_PROVIDERForce a specific model provider (anthropic, openai, ollama)
KERNLE_MODELOverride the default model name for the chosen provider

Common Workflows

Session Start

kernle -s mystack load

During Work

# Quick capture
kernle -s mystack raw "interesting observation"

# Record experience
kernle -s mystack episode "what I did" "outcome" --lesson "what I learned"

# Note a decision
kernle -s mystack note "chose X" --type decision --reason "because Y"

Session End

kernle -s mystack checkpoint save "where I left off" --pending "next task"

Maintenance

# Check health
kernle -s mystack anxiety --detailed --actions

# Bind a model for processing
kernle -s mystack model set claude

# Promote learnings to beliefs
kernle -s mystack promote

# Export backup
kernle -s mystack export backup.md