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
PATHwhen 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.jsonis 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_fileignore_dirsignore_filesplugins_enabledauto_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a8eb2909f661606ccd55e461dae1e80767e83f00b75b06f77d15a60cd313e9c
|
|
| MD5 |
81dedcb94ca0291588fbfb9c888639b8
|
|
| BLAKE2b-256 |
4fecfc2e25707724da90e48bc6dc4ac3cccc5b00dff68d311aabbd5aad8562fb
|
Provenance
The following attestation bundles were made for pycodectx-1.0.2.tar.gz:
Publisher:
release.yml on prathmesh284/codectx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycodectx-1.0.2.tar.gz -
Subject digest:
7a8eb2909f661606ccd55e461dae1e80767e83f00b75b06f77d15a60cd313e9c - Sigstore transparency entry: 1440633943
- Sigstore integration time:
-
Permalink:
prathmesh284/codectx@770906142686e01893b39342fb890a847bc7dbd8 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/prathmesh284
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@770906142686e01893b39342fb890a847bc7dbd8 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf2a4f184ece000ebd896d8f9b7b32c082735172d19f588bf2af881d9b4a19e3
|
|
| MD5 |
de504d77eb789433d1b38e702c85e2d7
|
|
| BLAKE2b-256 |
65ede85685e3db373e6cdfb400fc1818a0bc60064e2da7ed9d6a916c87b9e148
|
Provenance
The following attestation bundles were made for pycodectx-1.0.2-py3-none-any.whl:
Publisher:
release.yml on prathmesh284/codectx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycodectx-1.0.2-py3-none-any.whl -
Subject digest:
bf2a4f184ece000ebd896d8f9b7b32c082735172d19f588bf2af881d9b4a19e3 - Sigstore transparency entry: 1440634030
- Sigstore integration time:
-
Permalink:
prathmesh284/codectx@770906142686e01893b39342fb890a847bc7dbd8 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/prathmesh284
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@770906142686e01893b39342fb890a847bc7dbd8 -
Trigger Event:
push
-
Statement type: