Skip to main content
The command-line binary, built from the cognee-cli crate. It drives the full pipeline and is also the on-device (Android) runner. Run cognee-cli <command> --help for the authoritative flag list; the clap definitions are in crates/cli/src/cli.rs.

Subcommands

The memory API verbs (remember / recall / improve / forget) are the primary surface; the add / cognify / memify / search commands below them are the lower-level pipeline they compose. All of these are always built (not feature-gated). The feature-gated commands are enabled in the default build of cognee-cli (except platform-specific ones). See Architecture: feature strategy. Cloud serve / disconnect are not part of OSS — they ship in the closed-source cognee-cli-cloud binary (cognee-cli-cloud serve --url … / cognee-cli-cloud disconnect).

Memory API

The four primary verbs cover the common workflow end-to-end:
remember with a --session-id records session memory; without one it persists permanent, graph-backed memory. recall is session-aware and graph-backed; with no -t/--query-type it auto-routes to a suitable retrieval strategy.

Lower-level pipeline

The memory verbs compose add → cognify → search, which you can also drive directly for fine-grained control (remember ≈ add + cognify + improve; recall ≈ auto-routed search):

config subcommand

Reads/writes ~/.config/cognee-rust/config.json. Keys are the snake_case Settings field names. See Configuration: CLI config.

LLM retries

--llm-max-retries N (accepted by cognify, add-and-cognify, search) overrides the retry count for structured-output LLM calls for that run; the persistent default is the llm_max_retries config key (default 2, minimum 1). The CLI flag wins over the config value. It is passed to OpenAIAdapter and governs the strict-schema, function-call, and JSON-fallback parsing paths.

Logging

The CLI calls cognee_logging::init_logging at startup. The env-var surface (COGNEE_LOG_*, RUST_LOG/LOG_LEVEL, LOG_FILE_NAME) is shared with the HTTP server and bindings and documented canonically in Configuration: logging. Example — JSON logs to a custom directory: