cognee-cli

Operates the cognee memory platform from the terminal via remember, recall, forget, and improve commands.

30.4k|3.0k|Updated Aug 16, 2023
One-click install
npx skills add https://github.com/topoteretes/cognee --skill cognee-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cognee-cli
Source: https://github.com/topoteretes/cognee/tree/main/.claude/skills/cognee-cli
Command: npx skills add https://github.com/topoteretes/cognee --skill cognee-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing cognee's AI memory from the terminal requires knowing which CLI commands map to which SDK operations, what flags each accepts, and which defaults and gotchas (dataset targeting, session caching, .env resolution) silently change behavior.

Core Features & Use Cases

  • Memory Commands: Ingest text, files, or URLs with remember, query the knowledge graph with recall, delete data with forget, and enrich graphs with improve.
  • Session Memory Bridging: Read session Q&A history with sessions get and merge session content into the graph using improve -s.
  • Administration: Manage datasets, view and persist configuration to .env, launch the UI server, and run Alembic database migrations after upgrades.
  • Use Case: After upgrading cognee, run cognee-cli upgrade to apply migrations, then cognee-cli remember ./docs --dataset-name my_project to rebuild the knowledge graph, and cognee-cli recall "question" -d my_project to query it.

Quick Start

Use the cognee-cli skill to ingest the docs folder into a dataset named my_project and then recall an answer from it.

Frequently Asked Questions about cognee-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use cognee-cli to add and query memory?

Run `cognee-cli remember "text"` to ingest content and build the graph in one step, then `cognee-cli recall "question"` to query it. Remember accepts text, file paths, or URLs, and recall supports --datasets, --top-k, and --session-id flags.

What search types does cognee-cli recall support?

The CLI supports seven SearchType values: GRAPH_COMPLETION, RAG_COMPLETION, CHUNKS, SUMMARIES, CODE, CYPHER, and GRAPH_REPORT. Other types like TEMPORAL must be called through the SDK's cognee.recall with an explicit query_type.

Does cognee-cli forget --all ask for confirmation?

No, `forget --all` deletes every dataset immediately without prompting, even on non-interactive stdin. The legacy `delete --all` prompts first, so script forget with care.

Why does cognee-cli config set appear to do nothing?

Cognee calls dotenv.load_dotenv(override=True) resolved relative to the package location, so a .env at the repo root shadows the cwd .env and overrides exported variables. Move the repo .env aside or set values programmatically after import.

Why do cognee-cli session commands return nothing?

Session commands like `recall -s` and `sessions get` require CACHING=true, which is the default. With caching disabled, session reads return nothing and SDK session writes raise errors.