CLI (keepgoing / kg)

The terminal interface for KeepGoing. It owns the SQLite database, runs the setup wizard, and is the primary write surface for checkpoints and decisions.

What it is

The CLI is published as @keepgoingdev/cli on npm. Running keepgoing setup is how you onboard to the full ecosystem. Every other tool (MCP server, extensions, hooks) writes data that the CLI can read - and vice versa.

The kg alias is a short form of keepgoing. Both work identically.

When to use the CLI

Most checkpoint saving happens automatically through the MCP server, VS Code extension, and hooks. Use the CLI directly when you want to:

  • Save a checkpoint with custom context before a long break
  • Browse your session history or search old checkpoints
  • Get a re-entry briefing when the MCP server isn't available
  • Check cross-project momentum with keepgoing hot
  • Run keepgoing doctor to diagnose storage issues

Key commands

keepgoing glance

Single-line context snapshot. Designed for shell prompts and scripts - completes in under 50ms.

keepgoing save [-m "summary"] [-n "next step"]

Save a checkpoint. Auto-generates summary and next step from recent git activity. Override with -m and -n flags.

keepgoing briefing

Full re-entry briefing from checkpoint history and recent commits. Same data the MCP server returns to Claude Code.

keepgoing log

Browse checkpoints with filtering. Supports --since, --branch, --search, --sessions grouping, and more.

keepgoing hot

Cross-project activity summary sorted by momentum. Reads from the global database, shows all registered projects.

keepgoing setup [preset]

Interactive setup wizard. Run once per device. Accepts presets: claude, copilot, cursor, windsurf, vscode, jetbrains.

keepgoing init

Non-interactive setup replay. Applies your saved setup profile to the current project.

keepgoing doctor

Storage health check. Verifies the database schema, detects orphaned sessions, runs SQLite integrity check.

For the full command reference including all flags, see the CLI setup page.

Storage

The CLI is the only component that owns the SQLite schema and performs migrations. It uses sql.js (WebAssembly SQLite) so there are no native binary dependencies - the CLI works anywhere Node runs.

.keepgoing/keepgoing.db - per-project SQLite (checkpoints, decisions, sessions)

~/.keepgoing/keepgoing-global.db - cross-project registry and nudge state

If you have legacy JSON data from an older version, run keepgoing migrate to import it into SQLite.