cmd

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

index_amp.go indexes Amp CLI sessions from ~/.local/share/amp/. Supports threads/ directory containing individual JSON conversation files.

index_antigravity.go indexes Antigravity IDE sessions stored as JSONL files. Sessions live under ~/.gemini/antigravity/code_tracker/<project>/*.jsonl.

index_claude.go indexes Claude Code sessions stored as JSONL files. Session data lives under ~/.claude/projects/<project-hash>/<session>.jsonl.

index_cline.go indexes Cline, Roo Code, and Kilo Code sessions. These VS Code extensions share the same task-based JSON format, stored under each extension's globalStorage directory per IDE.

index_codex.go indexes OpenAI Codex CLI sessions from ~/.codex/. Supports two sources: history.jsonl (grouped by session) and individual JSONL files in sessions/ and archived_sessions/ directories.

index_crush.go indexes Crush CLI sessions from its SQLite database. Crush stores conversations in ~/.crush/crush.db with proper sessions/messages tables. Also scans per-project crush.db files in enabled project directories.

index_cursor.go indexes Cursor IDE sessions from its SQLite state database. Cursor stores composer conversations in state.vscdb under the globalStorage directory. Each composer session is indexed atomically using a closure pattern.

index_gemini.go indexes Gemini CLI sessions stored as JSON files. Supports both old format (flat message arrays) and new format (structured with metadata, exchanges, and token usage). Sessions live under ~/.gemini/sessions/.

index_helpers.go provides shared utility functions used across all indexer adapters: incremental skip logic, string truncation, project name extraction, and provider inference from model names.

index_kiro.go indexes Kiro IDE sessions stored as JSON files. Sessions live under ~/Library/Application Support/Kiro/workspace-sessions/.

index_opencode.go indexes OpenCode sessions stored as JSON files. Sessions live under ~/.local/share/opencode/sessions/<session-id>/.

index_vscode.go indexes VS Code AI chat sessions from state.vscdb databases. Scans workspaceStorage directories across multiple IDEs (Code, Cursor, Windsurf, VSCodium, Antigravity, Kiro, Trae) for AI extension conversations.

onboarding.go provides the first-run setup experience for new mnemo users.

recent.go displays the most recent AI coding sessions with optional day-range filtering.

Package cmd implements all mnemo CLI commands using cobra.

Command tree:

mnemo index       — Scan and index AI tool session history
mnemo search      — Full-text search across all indexed sessions
mnemo recent      — List recent sessions
mnemo context     — Generate markdown context summary for a project
mnemo blocks      — Show 5-hour usage windows (Claude rate limit tracking)
mnemo projects    — Manage tracked project directories
mnemo add         — Index documentation/notes as a knowledge source
mnemo tools       — Detect installed AI coding tools
mnemo serve       — Start MCP server for Claude Desktop/Code integration
mnemo install     — Install plugins for Claude Code/Desktop and OpenCode
mnemo onboarding  — Run the interactive first-run experience
mnemo configure   — Set context injection mode (off/helper/assistant)
mnemo version     — Print version info

search.go implements the CLI search command with three output formats: human (terminal-friendly), context (token-efficient for AI), and json (structured).

status.go displays system status including database stats, tool detection, and token usage summaries.

tools.go detects installed AI coding tools on the local system and provides path helper functions for locating tool-specific session directories.

version.go prints build-time version information. Variables are overridden via -ldflags during goreleaser builds.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "1.3.0"
	BuildDate = "2026-02-08"
	GitCommit = "dev"
)

Build-time variables, overridden via -ldflags during goreleaser builds.

Functions

func Execute

func Execute()

Types

type AITool

type AITool struct {
	Name     string
	Path     string
	Format   string
	Detected bool
}

AITool describes a supported AI coding assistant and the filesystem path where it stores conversation history.

type OpenCodeSessionMeta

type OpenCodeSessionMeta struct {
	Title     string
	Directory string
	Version   string
}

OpenCodeSessionMeta holds resolved metadata for an OpenCode session file.

type Tool

type Tool struct {
	Name      string
	Path      string
	Installed bool
}

Tool represents a detected AI coding tool for the MCP tools endpoint.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL