codecontext learn

Ask questions about your codebase in natural language

The learn command lets you ask questions about your codebase and get intelligent answers. It understands your code structure, patterns, and relationships to provide accurate, context-aware responses.

Natural Language

Ask questions the way you think, get answers that make sense

Deep Understanding

Analyzes code relationships and dependencies

Code References

Provides specific file and line references in answers

$ codecontext learn "how does the authentication flow work?"

Interactive Demo

Terminal

Example Questions

Architecture & Design

  • "What's the overall architecture?"
  • "How is the database structured?"
  • "What design patterns are used?"

Features & Functionality

  • "How does user registration work?"
  • "Where is email sending handled?"
  • "What APIs are exposed?"

Dependencies & Integration

  • "What external services are used?"
  • "How is Redis integrated?"
  • "Which payment processor is used?"

Code Organization

  • "Where are utility functions?"
  • "How are routes organized?"
  • "What's the folder structure for?"

Options

--code, -c

Include code snippets in the answer

$ codecontext learn "how to validate user input?" --code

--depth, -d

Set analysis depth (shallow, normal, deep)

$ codecontext learn "explain the data flow" --depth deep

How It Works

1

Parse Question

Understands your natural language query and intent

2

Search Codebase

Finds relevant files, functions, and patterns

3

Analyze Context

Understands relationships and dependencies

4

Generate Answer

Provides clear explanation with file references

Usage Limits

Daily Question Limits

Free Plan10 questions/day
STARTER Plan ($9/mo)100 questions/day
PRO Plan ($29/mo)Unlimited questions

Check your usage with codecontext status

Pro Features

Advanced Learning Capabilities

Pro users get enhanced learning features:

  • • Cross-repository knowledge (answer questions across all your repos)
  • • Team knowledge sharing (learn from team's questions)
  • • Visual diagrams for architecture questions
  • • Export answers to documentation
  • • Follow-up questions and conversations

Tips for Better Answers

Be specific

Instead of "how does it work?", ask "how does user authentication work?"

Ask about relationships

Questions like "how does X interact with Y?" get detailed flow explanations

Use domain terms

If your code uses specific terms (e.g., "workflow", "pipeline"), use them in questions

See Also