Skip to main content

Context Engine CLI - Compress the Chaos

Project description

Context Engine

Context Engine is a hybrid CLI that tracks development sessions, generates summaries, and bundles project context for AI handoffs. The tool ships as two packages:

After installation the Ink-based CLI launches the Python backend automatically, so a single install provides both halves.

Installation

npm (recommended)

npm install -g context-engine-cli@1.2.1-2

This installs the Node/Ink CLI, bundles the Python backend, and runs pip install -r backend/requirements.txt during postinstall (requires Python 3.8+ on PATH).

PyPI

pip install context-engine-dev==1.2.1

This provides the Python modules and console scripts. Pair it with the npm package if you prefer to manage the frontend separately.

Quick Start

# Initialise scaffolding (.context/ directory, default config)
context-engine init

# Start the session tracker in the background
context-engine start-session --auto

# Inspect tracker status
context-engine session status

# Capture a summary snapshot (AI if configured, static otherwise)
context-engine session save "Wrapped up dashboard wiring"

# Stop tracking when finished
context-engine stop-session

# Launch the interactive chat palette
context-engine chat

During a session the tracker writes to .context/:

File Purpose
session.md Log of file events and CLI commands.
session_summary.md Markdown summary produced by context-engine session save.
session.pid PID of the watchdog process.
session_state.json Cache for rapid context-engine session status responses.

Project Structure

Context-Engine/
|-- backend/                # Python package
|   |-- main.py             # CLI bridge invoked by Node
|   `-- context_engine/
|       |-- cli.py          # Click command definitions
|       |-- core/session_tracker.py
|       |-- core/ai_summary.py
|       `-- commands/       # Command modules (baseline, bundle, session, etc.)
|-- ui/                     # Node + Ink frontend
|   |-- index.js            # CLI entry and palette bootstrapper
|   |-- components/ChatApp.tsx
|   `-- lib/backend-bridge.js
`-- docs/                   # Authoring guides for contributors

Development Workflow

Frontend (Node) tests & lint

npm install --prefix ui
npm test --prefix ui
npm run lint --prefix ui

Run the install command when dependencies change. Alternatively cd ui first and omit --prefix.

Backend (Python) tests

python -m pytest -q

Execute from the repository root; there is no separate scripts/run_test helper.

Publishing

  1. Bump versions
    cd ui
    npm version <new-version> --no-git-tag-version
    cd ..
    python scripts/sync_versions.py <new-version>
    npm install --prefix ui          # refresh lockfile
    
  2. Commit, tag, and push
    git add .
    git commit -m "chore: release <new-version>"
    git tag v<new-version>
    git push origin main
    git push origin v<new-version>
    
  3. Publish packages
    cd ui
    npm publish --access public
    cd ..
    python -m build
    twine upload dist/*
    

Documentation

Guides explaining the codebase live in docs/. Start with docs/README.md for the index and authoring principles.

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

context_engine_dev-1.2.1.tar.gz (122.7 kB view details)

Uploaded Source

Built Distribution

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

context_engine_dev-1.2.1-py3-none-any.whl (130.7 kB view details)

Uploaded Python 3

File details

Details for the file context_engine_dev-1.2.1.tar.gz.

File metadata

  • Download URL: context_engine_dev-1.2.1.tar.gz
  • Upload date:
  • Size: 122.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for context_engine_dev-1.2.1.tar.gz
Algorithm Hash digest
SHA256 d4991f8cbadfcbcfcc0c1567e3fdeb42f52883336003b21b933a86e82dbcb8b4
MD5 06ec71a01a42aa7cdb76efb879083386
BLAKE2b-256 6e5ed37542fc083f567784bb8d8b2281ca52fefa1edf21c899bd072b39ce5d7f

See more details on using hashes here.

File details

Details for the file context_engine_dev-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for context_engine_dev-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6074d35c1c45e745c42ca3d54684c2681ed8a5250cb97fb72e1bced8422292c1
MD5 e31a1844ee73e55429f9f1b35ec6c3dc
BLAKE2b-256 9606f9d876ff70a314a27592574b7e3eec198851f46239ffcef35a18e94b5fdb

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