CLI Reference
ghost daemon
Section titled “ghost daemon”Start the GHOST daemon (Discord bot + job scheduler).
ghost daemonghost init
Section titled “ghost init”Initialize workspace and config files.
ghost initCreates ~/.config/ghost/config.toml and the workspace directory with default files.
ghost config
Section titled “ghost config”Read, write, and reload configuration values.
ghost config get <key> # Get a config value (with defaults)ghost config set <key> <value> # Set a config valueghost config reload # Validate config and signal the daemon to reloadExamples:
ghost config get discord.allowed_user_idghost config set timing.heartbeat_idle_minutes 10ghost config set web.search_max_results 10ghost config reloadghost config reload
Section titled “ghost config reload”Validates config.toml and .env, then sends SIGHUP to a running daemon to apply
changes without restarting.
ghost config reloadHot-reloadable — the daemon picks up these changes immediately:
model— default chat modeltiming— heartbeat, idle, and compaction intervalscompaction— token thresholds and limitsweb— search provider, result countsdocling— document import settingscoding— coding session settingsdebug— log level and debug flagsdiscord.allowed_user_ids— who can interact with GHOSTembeddings.urlandembeddings.model— embedding endpoint and model name
Requires restart — these settings are read once at startup:
workspace— workspace directory pathembeddings.dimension— vector size (changing this invalidates stored embeddings)discord.enabled— enables or disables the Discord interface
ghost auth
Section titled “ghost auth”Manage authentication for providers.
ghost auth codex # OpenAI OAuth flow (opens browser)ghost auth status # Check authentication statusghost auth revoke # Revoke OpenAI tokensghost job
Section titled “ghost job”Manage cron jobs.
ghost job list # List jobs with next-run timesghost job validate <path> # Validate job file syntaxghost job run <name> # Execute job immediatelyghost job logs [name] # View job execution logsghost hack
Section titled “ghost hack”Manage coding sessions. See GHOST HACK for details.
ghost hack start <dir> [--prompt "task"] # Start a coding sessionghost hack resume <id> [--prompt "task"] # Resume a previous sessionghost hack list # List recent sessionsghost agent
Section titled “ghost agent”Discover, validate, and inspect agents.
ghost agent list # List all discovered agentsghost agent validate [name] # Validate agent Lua configs (all or one)ghost agent status # Running agents + recent runsghost agent show <run_id> # Details of a specific runghost agent status
Section titled “ghost agent status”Table of running agents and recent completed/failed runs.
ghost agent status # Last 20 runsghost agent status --agent my-agent # Filter by agent nameghost agent status --limit 50 # Show more runsRunning agents appear first, sorted by start time.
ghost agent show
Section titled “ghost agent show”View the result of a specific agent run. Accepts a full run ID or a unique prefix (minimum 4 characters).
ghost agent show 01JQ8A2B # Transcript onlyghost agent show 01JQ8A2B --full # Include full message historyghost agent show 01JQ8A2B --json # JSON outputghost agent show 01JQ8A2B --full --jsonFailed runs automatically include the error message. Use --json for
machine-readable output (e.g. piping to another agent).
ghost session
Section titled “ghost session”Inspect chat sessions.
ghost session list # Recent sessions (up to 50)ghost session logs <session_id> # View messagesghost session logs <session_id> --count 100 # More messagesghost session logs <session_id> --around <id> # Center on a messageghost knowledge
Section titled “ghost knowledge”Query and manage the knowledge base.
Search
Section titled “Search”ghost knowledge search <query>ghost knowledge search <query> --kind note # Filter by typeghost knowledge search <query> --limit 20 # More resultsghost knowledge get --title "Note Title" # Get by titleghost knowledge get <path> # Get by pathghost knowledge graph <target> # Show connectionsghost knowledge graph <target> --direction out # Outgoing onlyghost knowledge graph --orphans # Unconnected notesghost knowledge graph --stats # Edge/stub countsBrowse
Section titled “Browse”ghost knowledge tags # Tags with countsghost knowledge recent # Recent activityghost knowledge recent --limit 50ghost knowledge stats # Type countsghost knowledge references # All reference topicsghost knowledge references --topic rust # By topicMaintenance
Section titled “Maintenance”ghost knowledge reindex # Sync files → databaseghost knowledge reindex --skip-embeddings # Skip embedding genghost reference
Section titled “ghost reference”Import, update, and delete external reference material. See Reference Import for details.
Import
Section titled “Import”# From a git repository (preferred for doc sets)ghost reference import git --url <url> --topic <name> \ [--paths dir1,dir2] [--extensions .md,.rs] [--ref <tag-or-branch>]
# By crawling a website (fallback)ghost reference import crawl --url <url> --topic <name> \ [--max-depth 3] [--max-pages 50]Update
Section titled “Update”ghost reference update --topic <name> # Re-fetch from sourceghost reference update --topic <name> --ref v2.0 # Switch branch/tagRe-fetches from the original source and applies changes. New files are
added, changed files are updated, and files deleted upstream are removed
— unless cited by notes, in which case they are moved to _orphaned/.
Delete
Section titled “Delete”ghost reference delete --topic <name>Removes the topic, all its references, embeddings, import metadata, and workspace files.
ghost db
Section titled “ghost db”Repair the SQLite database by rebuilding file-backed state from the workspace and copying operational tables into a fresh candidate DB.
Repair
Section titled “Repair”ghost db repairghost db repair --dry-runghost db repair --dry-run is the safest default. It builds a candidate database beside
ghost.db, verifies that DB-only tables were preserved, writes a JSON repair report, and
leaves the live DB untouched.
Run it when GHOST or ghost knowledge search starts failing with SQLite corruption errors
such as database disk image is malformed.
Repair artifacts are written next to the live database:
ghost.db.repair-<timestamp>.candidateghost.db.repair-<timestamp>.report.jsonghost.db.backup-<timestamp>on a successful non-dry-run swap
ghost document
Section titled “ghost document”Import documents (PDF, DOCX, etc.) via docling-serve. See Reference Import for details.
ghost document import file --path <path> --topic <name>For URLs, download the file first (curl -L -o uploads/doc.pdf <url>), then
import with the command above.
Optional flags (use only when explicitly needed):
| Flag | Default | Purpose |
|---|---|---|
--no-ocr | OCR on | Skip OCR for digital PDFs |
--page-range "1-10" | full doc | Import specific pages only |
--timeout 900 | 600s | Extend timeout for large docs |
ghost web
Section titled “ghost web”Web search and fetch.
ghost web search <query> # Search with Braveghost web search <query> -n 10 # More resultsghost web fetch <url> # Extract contentghost web fetch <url> --readability # Article modeghost web fetch <url> --raw # Raw HTMLghost start
Section titled “ghost start”Start all registered services (top-to-bottom), then start the GHOST daemon via the OS service manager.
ghost startStops on first service failure — the daemon is not started if any service fails to come
up. Shows ghost status output at the end.
ghost stop
Section titled “ghost stop”Stop the GHOST daemon, then stop all registered services (bottom-to-top, best-effort).
ghost stopAlways attempts all service stops even if some fail. Shows ghost status output at the
end.
ghost services
Section titled “ghost services”Manage the service registry (services.toml). Generated during ghost init, editable
via these commands.
ghost services list # Show registered servicesghost services add --name <n> [--start ".."] [--stop ".."] [--update ".."] [--status ".."]ghost services remove <name> # Unregister a serviceghost services update # Run update commands (stops on first failure)ghost services status # Check process-level statusghost status
Section titled “ghost status”Show config validity, daemon status, and service health at a glance.
ghost statusChecks:
- Config — loads and validates
config.toml, reports parse errors - Daemon — checks whether
ghost-daemonis active via systemd/launchd - Services — probes each configured service URL (embeddings, search, Crawl4AI, Docling, browsers)
Complementary to ghost services status — this checks HTTP health, while
ghost services status checks process-level status.
ghost version
Section titled “ghost version”Print the GHOST version.
ghost version