Core logic for AI-driven development context management
Project description
AI Context Core
The central nervous system for your AI-assisted coding workflow.
Features
- Project Analysis: Deep AST analysis for Python projects.
- Context Management: Keeps
.ai-contextfiles updated. - Profiles:
python-generic: Standard Python support.qgis-plugin: Specialized rules for QGIS plugin development.
- Workflow Automation: Standardized scripts for session management.
- Advanced Analysis:
- Entry Point Detection: Supports QGIS plugins, Click CLIs, Flask, and FastAPI apps.
- Anti-Pattern Detection: Identifies God Objects, Spaghetti Code, Magic Numbers, and Dead Code.
- Security Audit: Scans for vulnerabilities like SQL Injection,
eval/exec, and insecure assertions.
Installation
Globally (as a tool)
uv tool install .
In a Virtual Environment
This is the recommended way to install and use ai-context-core.
-
Create and activate the environment:
uv venv source .venv/bin/activate
-
Install the package:
uv pip install .
The
ai-ctxcommand will be available within the virtual environment.
For Development
If you want to contribute to the project, you need to install it in editable mode with the development dependencies.
-
Create and activate the environment:
uv venv source .venv/bin/activate
-
Install the package with development dependencies:
uv sync --all-extras
This will install the project in editable mode and all the dependencies, including the ones for testing and documentation.
Using in Another Project
If you want to use ai-ctx within the context of another project's virtual environment:
Option A: One-off execution (No installation required)
You can run it directly using the path to this repository:
uv run --with /path/to/ai-context-core ai-ctx analyze
Option B: Install in an existing environment
Activate your project's environment and run:
uv pip install /path/to/ai-context-core
Option C: Add as a development dependency
If the other project also uses uv:
uv add --dev --path /path/to/ai-context-core
## Docker Support
The project includes Docker support for reproducible development, testing, and CI/CD.
### Quick Start with Docker
```bash
# Build all images
make docker-build
# Run tests in Docker
make docker-test
# Interactive development shell
make docker-shell
# Run linter
make docker-lint
Docker Images
- Development (
ai-ctx:dev) - Full environment with dev dependencies - Test (
ai-ctx:test) - Runs test suite with coverage - Production (
ai-ctx:prod) - Minimal runtime image
Manual Docker Commands
# Build specific stage
docker build --target test -t ai-ctx:test .
# Run tests
docker run --rm ai-ctx:test
# Run CLI from production image
docker run --rm ai-ctx:prod analyze
# Interactive shell
docker run --rm -it ai-ctx:dev /bin/bash
Usage
# Initialize in a new project
ai-ctx init --profile qgis-plugin
# Update context manually
ai-ctx analyze
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 ai_context_core-2.0.0.tar.gz.
File metadata
- Download URL: ai_context_core-2.0.0.tar.gz
- Upload date:
- Size: 56.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eed78412f5af66e8a9309409342715ed39b30de5c98a06b06f65ce9079b09ebc
|
|
| MD5 |
3118fc7d43c2efd74ded36d146e8fe40
|
|
| BLAKE2b-256 |
fe1dd15bf145ae2c7813f9e5982c69c74b08492f4203f011a296544a5ad4f604
|
File details
Details for the file ai_context_core-2.0.0-py3-none-any.whl.
File metadata
- Download URL: ai_context_core-2.0.0-py3-none-any.whl
- Upload date:
- Size: 55.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f81cc027198efdb4db318fdee061856b31e2281ea2e8c7b44a6659c6d0467ff3
|
|
| MD5 |
f0832c3923b9fc883a35b50915886406
|
|
| BLAKE2b-256 |
013a5aa3f3a0d305e4a47d62abd524b8fa1d75b45c20262b04768e21ee267893
|