# Cognee CLI

Drives cognee memory, dataset, config and migration commands from the terminal.

- Repository: https://github.com/topoteretes/cognee (32985 stars)
- Category: Data and ML
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add topoteretes/cognee --skill cognee-cli -g -a claude-code -y`
Codex: `npx skills add topoteretes/cognee --skill cognee-cli -g -a codex -y`
Cursor: `npx skills add topoteretes/cognee --skill cognee-cli -g -a cursor -y`
Gemini CLI: `npx skills add topoteretes/cognee --skill cognee-cli -g -a gemini-cli -y`

## Description

Use when the user wants to drive cognee from the terminal with cognee-cli, remember/recall/forget/improve memory commands, managing datasets and config, or database migrations.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Use the cognee CLI

`cognee-cli` ships with the package (entry point in `cognee/cli/_cognee.py`;
each command lives in `cognee/cli/commands/`). Every command has
`--help` for its flags, but only a few (`demo`, `eval`, `serve`,
`push`, `upgrade`, `downgrade`, `stamp`, and `search` with one CODE example)
include usage examples, for the memory commands use the examples
in this file. Needs `LLM_API_KEY` configured, same as the SDK.

## Core flow

The memory commands are the primary surface as of cognee 1.x:

```bash
cognee-cli remember "Your text here"         # also accepts file paths / URLs
cognee-cli remember ./docs --dataset-name my_project
cognee-cli recall "Your question"            # query the graph
cognee-cli recall "keyword" --query-type CHUNKS
cognee-cli forget --all                      # wipe local state
```

`remember` is ingest + graph build in one step (`add` + `cognify` under the
hood); `--background`/`-b` runs the cognify stage in the background, and
`--dry-run` estimates LLM tokens/cost without ingesting. `recall` takes
`--datasets`/`-d`, `--top-k`/`-k` (default 10), and `--session-id`/`-s`.

`forget` targets `--dataset`, `--dataset-id`, `--data-id` (needs a dataset), or
`--everything`/`--all`, one unified command replacing the older `delete` and
empty-dataset paths. `--memory-only` (with a dataset) drops the graph and
vectors but keeps the raw files, so the data can be rebuilt.

> **`forget --all` does not ask for confirmation.** It deletes every dataset
> immediately, even on a non-interactive stdin. The legacy `delete --all`
> prompts `Delete ALL data from cognee? [y/N]` first, so switching to `forget`
> silently drops that safety net, script it with care.

The rest: https://github.com/topoteretes/cognee/blob/HEAD/.agents/skills/cognee-cli/SKILL.md
