Skip to main content

CLI Overview

The Kernle CLI provides 23 commands for managing agent memory.

Global Options

kernle [-a AGENT_ID] <command> [options]
OptionDescription
-a, --agent AGENT_IDAgent ID (can also use KERNLE_AGENT_ID env var)
If no agent ID is provided, Kernle will try to resolve one automatically from environment context.

Commands at a Glance

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
relationshipTrack relationships
playbookProcedural memory

Search & Analysis

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

Maintenance

CommandDescription
anxietyCheck memory health
forgetControlled forgetting
dumpExport all memory (stdout)
exportExport to file

Cloud & Auth

CommandDescription
syncSync with cloud backend
authManage authentication

Environment Variables

VariableDescription
KERNLE_AGENT_IDDefault agent ID
KERNLE_BACKEND_URLBackend URL for sync
KERNLE_AUTH_TOKENAuth token for sync
KERNLE_USER_IDUser ID for sync
Credentials can also be stored in ~/.kernle/credentials.json (created by auth login).

Common Workflows

Session Start

kernle -a myagent load

During Work

# Quick capture
kernle -a myagent raw "interesting observation"

# Record experience
kernle -a myagent episode "what I did" "outcome" --lesson "what I learned"

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

Session End

kernle -a myagent checkpoint save "where I left off" --pending "next task"

Maintenance

# Check health
kernle -a myagent anxiety --detailed --actions

# Consolidate learnings
kernle -a myagent consolidate

# Export backup
kernle -a myagent export backup.md