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.7.post1.tar.gz (123.1 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.7.post1-py3-none-any.whl (131.2 kB view details)

Uploaded Python 3

File details

Details for the file context_engine_dev-1.2.7.post1.tar.gz.

File metadata

  • Download URL: context_engine_dev-1.2.7.post1.tar.gz
  • Upload date:
  • Size: 123.1 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.7.post1.tar.gz
Algorithm Hash digest
SHA256 c85c7e6f6ef7d6696c10ccea06b06b52daa7019aeaf598ebb224a50f0019d081
MD5 1cfa5b6d6d5b25b98a72ffc7554e90ec
BLAKE2b-256 8f4cbb5a5ea64551ef00b3d9ea81910a00f50826d8a055e16b2c74b3ca24d3a2

See more details on using hashes here.

File details

Details for the file context_engine_dev-1.2.7.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for context_engine_dev-1.2.7.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 b696fbbeb372e3afc3553e5bd7cebd37e79306bee366ddcf12a09c5e1a3ac269
MD5 12e5376dbc6eaa490afea5fedb12aa36
BLAKE2b-256 2fc798cd29e9bbac7e07356ccf757898a3a5937acdb18c29121cc40e537bad5f

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