The Cognee CLI provides the fastest way to get started with knowledge graphs - just add your data, cognify it, and start searching for insights in minutes.
CLI Status: The Cognee CLI is currently in development. Some features may be limited or unavailable. For full functionality, use the Python SDK or REST API.

Key Features

Simple Commands

Easy to UseIntuitive commands like add, cognify, search, and delete for all operations.

Multiple File Types

Flexible InputSupport for text files (.txt), PDFs (.pdf), and direct text input.

Interactive Search

Instant InsightsQuery your knowledge graphs with natural language questions.

Data Management

Complete ControlManage datasets, clear data, and organize your knowledge base.

Quick Start

1

Install Cognee

Install Cognee with CLI support using pip or your preferred package manager.
2

Add Your Data

Use the add command to include text or files in your knowledge base.
3

Create Knowledge Graph

Run cognify to process your data into a structured knowledge graph.
4

Search for Insights

Use search to query your knowledge graph with natural language.

Core Commands

Add Data

Add text or files to your knowledge base:
Add Text Directly
# Add text directly from command line
cognee add "Natural language processing (NLP) is an interdisciplinary subfield of computer science and information retrieval. It is primarily concerned with giving computers the ability to support and manipulate human language. It involves processing natural language datasets, such as text corpora or speech corpora, using either rule-based or probabilistic machine learning approaches."
Perfect for quick experiments and short text snippets.

Process Data

Transform your data into a knowledge graph:
# Process all added data into knowledge graph
cognee cognify

Search Knowledge

Query your knowledge graph with natural language:
# Search for information
cognee search "Tell me about NLP"

# Search with specific query
cognee search "What are the challenges in natural language processing?"

Manage Data

Clean up and organize your knowledge base:
# Delete all data
cognee delete --all

# Delete specific dataset
cognee delete --dataset-name my_research

# Delete with confirmation
cognee delete --all --confirm

Complete Workflow Example

1

Add Research Data

Upload Academic Content
# Add research papers and notes
cognee add research_paper.pdf
cognee add "Additional notes about machine learning and NLP research findings..."
cognee add lecture_notes.txt
2

Create Knowledge Graph

Process into Graph
# Transform data into knowledge graph
cognee cognify

# Wait for processing to complete
# You'll see progress updates
3

Explore Your Knowledge

Query for Insights
# Ask questions about your data
cognee search "What are the main concepts in NLP?"
cognee search "How does machine learning relate to natural language processing?"
cognee search "What are the biggest challenges in this field?"
4

Manage Your Data

Clean Up When Done
# List what you have
cognee list --datasets

# Clean up when finished
cognee delete --dataset-name research_data
# Or delete everything
cognee delete --all

Command Reference

cognee add

Help System

Get help for any command or general usage:
# General Cognee help
cognee --help

# Shows all available commands and global options
Pro Tip: Use cognee <command> --help to see detailed information about any command, including additional arguments, options, and usage examples.

Use Cases

Academic Research
# Add research papers
cognee add paper1.pdf paper2.pdf research_notes.txt

# Create knowledge graph
cognee cognify

# Query for insights
cognee search "What are the key findings?"
cognee search "How do these papers relate to each other?"
cognee search "What methodologies were used?"

Best Practices

Data Organization

Structure Your Data
  • Use descriptive dataset names
  • Group related documents together
  • Add meaningful metadata
  • Keep datasets focused on specific topics

Efficient Workflows

Optimize Your Process
  • Add all related data before cognifying
  • Use batch operations for multiple files
  • Test with small datasets first
  • Use help commands to explore options

Troubleshooting

Common Issues

Next Steps

New to Cognee? The CLI is the fastest way to get started! Try adding some text, running cognee cognify, and then searching for insights to see the power of knowledge graphs in action.