Skip to main content

AI-powered skill & memory generator for codebases - fully local, no API keys needed

Project description

Engram CLI

AI-powered skill & memory generator for codebases. Fully local, no API keys needed.

What it does

Point Engram at any codebase and it generates structured skills (architectural knowledge) and memories (exploration sessions) using a local AI model. Zero API cost, fully air-gapped.

$ engram analyze fastapi/fastapi

╭────────────────────────────────────────╮
│ Engram v2.1.3 - Local AI Code Analyzer │
╰────────────────────────────────────────╯

Phase 1: Heuristic Analysis
  Languages: Python (89%), Markdown (6%), Shell (3%)
  Frameworks: FastAPI, Starlette, Pydantic, Uvicorn, pytest
  Patterns: REST API, Middleware, Documentation site

Phase 2: Local Model Inference (qwen2.5-coder:7b)
  [1/5] Generating architecture skill...
  [2/5] Generating patterns skill...
  [3/5] Generating testing skill...
  [4/5] Generating project overview...
  [5/5] Generating activity analysis...

╭───────── Results for fastapi/fastapi ──────────╮
│ Generated 3 skills + 2 memories                │
│ Model: qwen2.5-coder:7b | Time: 42s | Cost: $0 │
╰────────────────────────────────────────────────╯

Install

# 1. Install Ollama (one-time)
brew install ollama          # macOS
# or: curl -fsSL https://ollama.com/install.sh | sh  # Linux

# 2. Install Engram CLI
brew install pipx && pipx install engram-cli   # macOS (recommended)
# or: pip install engram-cli                   # Linux / virtualenv

The first run will automatically download the Qwen2.5-Coder 7B model (~4.5GB, one-time).

Usage

# Analyze current directory
engram analyze .

# Analyze a GitHub repo
engram analyze https://github.com/pallets/flask

# Shorthand
engram analyze pallets/flask

# Specify org name for output
engram analyze . --org mycompany/myrepo

# Use a larger model for better quality
engram analyze . --model qwen2.5-coder:14b

# Heuristic-only (no model, instant)
engram analyze . --skip-model

# JSON output for piping
engram analyze . --json-only | jq '.skills | length'

# List recommended models
engram models

# Browse analysis results in a local web viewer
engram browse

# Start the viewer server without opening browser
engram serve

# Check version
engram version

Output

By default, outputs both JSON and Markdown:

engram-output/myrepo/
├── engram-analysis.json          # Combined analysis + generated content
├── skills/
│   ├── architecture/SKILL.md     # Architecture overview
│   ├── patterns/SKILL.md         # Code patterns & conventions
│   └── testing/SKILL.md          # Testing strategy (if tests detected)
└── memories/
    └── sessions/
        ├── 2026-02-13-myrepo-overview.md    # Project deep dive
        └── 2026-02-13-myrepo-activity.md    # Recent activity analysis

Visual Browser

After analyzing repos, browse results in a local web UI with 5 tabs: Skills, Timeline (3D graph), Search, Analytics, and Sync.

# Analyze a few repos first
engram analyze .
engram analyze https://github.com/fastapi/fastapi

# Open the visual browser (auto-opens in your default browser)
engram browse

# Or start the server without opening browser
engram serve
# Then open http://localhost:8420

The viewer aggregates all repos in engram-output/ into a single dashboard. Fully air-gapped - no network requests except for loading the 3D graph library.

How it works

Layer 1: Heuristic Analysis (instant, no model)

  • Walks the file tree, counts files/extensions
  • Parses package.json, Cargo.toml, go.mod, pyproject.toml for dependencies
  • Detects frameworks (React, FastAPI, Tokio, etc.) from dependency lists
  • Identifies test infrastructure, CI/CD, Docker, K8s configs
  • Extracts git metadata (commits, contributors, dates)
  • Detects architectural patterns from directory structure

Layer 2: Local Model Inference (~40s per repo)

  • Feeds heuristic context into structured prompts
  • Qwen2.5-Coder 7B generates natural language skills and memories
  • Produces architecture overviews, pattern analysis, testing guides
  • Session memories document the exploration findings

Models

Model Size RAM Quality Speed
qwen2.5-coder:7b (default) 4.5GB 8GB Good ~30 tok/s
qwen2.5-coder:14b 8.5GB 16GB Very Good ~18 tok/s
qwen2.5-coder:32b 18GB 24GB Excellent ~10 tok/s
deepseek-coder-v2:16b 9GB 16GB Very Good ~18 tok/s

Development

git clone https://github.com/engram-hq/engram-cli
cd engram-cli
python -m venv .venv && source .venv/bin/activate
pip install ".[dev]"
pytest tests/ -v

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

engram_cli-2.1.4.tar.gz (45.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

engram_cli-2.1.4-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

Details for the file engram_cli-2.1.4.tar.gz.

File metadata

  • Download URL: engram_cli-2.1.4.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for engram_cli-2.1.4.tar.gz
Algorithm Hash digest
SHA256 a094571b5bd9822a0023e1afb5ee1b89ad9e06a51910b90808a33af9b3d83933
MD5 cb26c4bfa503b67db46b9754320a6ebf
BLAKE2b-256 e75db7ba3a803c77f361bdab5e026a939d8c117df36aab34e492643dfc96c0a0

See more details on using hashes here.

File details

Details for the file engram_cli-2.1.4-py3-none-any.whl.

File metadata

  • Download URL: engram_cli-2.1.4-py3-none-any.whl
  • Upload date:
  • Size: 40.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for engram_cli-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 99316f763084e7db8ac6160278d426ff59f691321b2444ba1199b92fc9152de7
MD5 8b6a97aa41f613f1717622dbdcd7a0cb
BLAKE2b-256 4bbbecb0845577d2fca927cb1df0ad546895dac26a3d10d1117e38db7a5c4595

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page