Skip to main content

Project context extraction tool for code analysis and AI workflows

Project description

CodeCtx

CodeCtx scans a project directory and writes a project.ctx.json file with high-signal context that is useful for AI workflows, code reviews, onboarding, and lightweight documentation.

What it does

  • Scans a target directory and builds a project context snapshot.
  • Extracts file structure, functions, APIs, dependencies, environment hints, summaries, and plugin output.
  • Writes the result into the directory where you run the command.
  • Keeps a single rolling backup in project.ctx.json.backup.
  • Auto-initializes its config directory on first run.

Installation

Setup

Use the single supported setup command:

codectx-setup

It:

  • deploys or refreshes the app under the standard tool directory
  • creates venv/ if needed
  • installs runtime dependencies from requirements.txt
  • generates launchers in bin/
  • prefers a user launcher directory already on PATH, such as ~/.local/bin
  • attempts to update PATH when necessary

Default deployment targets:

  • Windows: C:\tools\codectx
  • macOS / Linux: ~/tools/codectx

You can override the destination:

codectx-setup --target /custom/path/codectx

Option 2: standard Python install

pip install .

After publishing to PyPI:

pip install pycodectx

For local development:

pip install -e .

The published package name is pycodectx, but the installed CLI command remains codectx, and setup remains codectx-setup.

Publishing

Build locally:

python -m pip install --upgrade pip build
python -m build

The repository includes a GitHub Actions workflow at .github/workflows/release.yml that:

  • builds the source distribution and wheel
  • publishes to PyPI using Trusted Publishing
  • runs when you push a tag like v1.0.0

Typical release flow:

git tag vX.Y.Z
git push origin vX.Y.Z

Before the first release, configure a PyPI Trusted Publisher for project pycodectx and point it at .github/workflows/release.yml.

Usage

# Analyze the current directory
codectx .

# Analyze a specific project
codectx /path/to/project

# Show extra detail
codectx . --verbose

# Plugin management
codectx plugin list
codectx plugin add /path/to/plugin.py
codectx plugin remove my_plugin

Output behavior

  • project.ctx.json is written into the directory you analyze.
  • If that file already exists, CodeCtx copies the previous version to project.ctx.json.backup.
  • Only the latest backup is kept.

Configuration

CodeCtx stores configuration in a per-user directory by default:

  • Windows: %LOCALAPPDATA%\CodeCtx
  • macOS: ~/.config/codectx
  • Linux: ~/.config/codectx

To override that location, set CODECTX_CONFIG_DIR.

Example:

CODECTX_CONFIG_DIR=/custom/path/codectx

The generated config.json controls values such as:

  • output_file
  • ignore_dirs
  • ignore_files
  • plugins_enabled
  • auto_backup

Project layout

codectx/
  src/codectx/   Python package
  bin/           generated launchers
  venv/          local virtual environment created by bootstrap
  bootstrap.py   cross-platform setup entry

License

CodeCtx is released under the MIT License. See LICENSE.

Support

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

pycodectx-1.0.2.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

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

pycodectx-1.0.2-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file pycodectx-1.0.2.tar.gz.

File metadata

  • Download URL: pycodectx-1.0.2.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pycodectx-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7a8eb2909f661606ccd55e461dae1e80767e83f00b75b06f77d15a60cd313e9c
MD5 81dedcb94ca0291588fbfb9c888639b8
BLAKE2b-256 4fecfc2e25707724da90e48bc6dc4ac3cccc5b00dff68d311aabbd5aad8562fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycodectx-1.0.2.tar.gz:

Publisher: release.yml on prathmesh284/codectx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycodectx-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pycodectx-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pycodectx-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bf2a4f184ece000ebd896d8f9b7b32c082735172d19f588bf2af881d9b4a19e3
MD5 de504d77eb789433d1b38e702c85e2d7
BLAKE2b-256 65ede85685e3db373e6cdfb400fc1818a0bc60064e2da7ed9d6a916c87b9e148

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycodectx-1.0.2-py3-none-any.whl:

Publisher: release.yml on prathmesh284/codectx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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