Scaffold agent context files into a project.
Project description
agentinit
Scaffold and maintain agent context files for modern coding assistants, with a deterministic, standard-library-only CLI.
agentinit creates a clean router-first setup around AGENTS.md, plus companion files for Claude, Cursor, Copilot, Gemini CLI, and llms.txt.
Why agentinit 🎯
- Single source of truth: keep high-level rules in
AGENTS.md. - Low drift workflow: regenerate and verify router files with
sync --check. - Lean context model: keep short entry files and push detail into
docs/. - No runtime dependencies: pure Python stdlib.
Quick Start 🚀
Requires Python 3.10+.
# Install (recommended)
pipx install agentinit
# Initialize in an existing repository
cd your-project
agentinit init --minimal
Minimal profile generates:
your-project/
├── llms.txt
├── AGENTS.md
├── CLAUDE.md
└── docs/
├── PROJECT.md
└── CONVENTIONS.md
Full profile (agentinit init) also includes GEMINI.md, docs/STATE.md, docs/TODO.md, docs/DECISIONS.md, Cursor/Copilot/Claude rule files, and .contextlintrc.json.
Core Workflow 🧭
# 1) Bootstrap context files
agentinit init --detect --purpose "AI code review assistant"
# 2) Keep llms.txt aligned with project docs
agentinit refresh-llms
# 3) Add modular resources
agentinit add skill code-reviewer
agentinit add mcp github
agentinit add security
# 4) Validate quality gates
agentinit status --check
agentinit sync --check
agentinit lint
For minimal projects, both status --check and sync --check auto-detect the generated minimal profile. status --minimal --check and sync --minimal --check remain available if you want to force that mode explicitly.
Command Reference
agentinit initadd missing context files in current directoryagentinit minimalshortcut forinit --minimalagentinit new <project>create a new project and scaffold contextagentinit refresh-llms(alias:refresh) regeneratellms.txtagentinit syncreconcile router files from templatesagentinit statusshow missing/incomplete files and line budgetsagentinit lintruncontextlintchecksagentinit add <type> <name>install resources (skill,mcp,security,soul)agentinit removeremove or archive managed files
CI Example ✅
Use both structure and drift checks:
agentinit sync --check
agentinit status --check
agentinit lint
Tool Compatibility 🤝
agentinit is designed to work with common agentic workflows by generating:
AGENTS.mdas primary routerCLAUDE.mdfor Claude Code memory/routing.cursor/rules/project.mdcfor Cursor rule routing.github/copilot-instructions.mdfor GitHub Copilot contextGEMINI.mdfor Gemini CLI context routingllms.txtas project discovery index
Troubleshooting 🛠️
If your agent cannot find context files:
- track files in git (
git add AGENTS.md CLAUDE.md GEMINI.md llms.txt docs/) - verify ignored files (
git status --ignored) - regenerate derived files (
agentinit refresh-llmsandagentinit sync) - replace managed symlinks with regular files inside the repo; unsafe managed paths are skipped by design
Documentation 📚
Wiki (full usage and examples):
Development 🧪
python3 -m venv .venv
. .venv/bin/activate
pip install -e . --group dev
python3 -m ruff check agentinit tests cli
python3 -m ruff format --check agentinit tests cli
python3 -m pytest tests/ -v
On distro-managed Python installs that enforce PEP 668, run the development commands inside a virtual environment instead of the system interpreter.
License
MIT
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 agentinit-0.3.11.tar.gz.
File metadata
- Download URL: agentinit-0.3.11.tar.gz
- Upload date:
- Size: 65.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3afc1b6d80fb12536a1b717376a5242e4ec75993cdb9bd5f8fc83fddd56be0fc
|
|
| MD5 |
5c24eb790cc50667207c037504f54ba0
|
|
| BLAKE2b-256 |
003a59fd48925136695337b387848e54b3265ab0e6923f93d56ea6e4eca56a4d
|
Provenance
The following attestation bundles were made for agentinit-0.3.11.tar.gz:
Publisher:
publish.yml on Lucenx9/agentinit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentinit-0.3.11.tar.gz -
Subject digest:
3afc1b6d80fb12536a1b717376a5242e4ec75993cdb9bd5f8fc83fddd56be0fc - Sigstore transparency entry: 1046838514
- Sigstore integration time:
-
Permalink:
Lucenx9/agentinit@874e510669710adb73d3c3dd9400b852dc79779b -
Branch / Tag:
refs/tags/v0.3.11 - Owner: https://github.com/Lucenx9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@874e510669710adb73d3c3dd9400b852dc79779b -
Trigger Event:
release
-
Statement type:
File details
Details for the file agentinit-0.3.11-py3-none-any.whl.
File metadata
- Download URL: agentinit-0.3.11-py3-none-any.whl
- Upload date:
- Size: 64.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afaac5ca0c0d25daaad45df50ba08fb0b1baf74c2eaaa792a8e55d6cd2defc59
|
|
| MD5 |
c292e988d3c4d59503cd83f30c364331
|
|
| BLAKE2b-256 |
9bee21f5d9d1d483461280844bb57be1490f1b8aacf4b138aaf09250d46053ab
|
Provenance
The following attestation bundles were made for agentinit-0.3.11-py3-none-any.whl:
Publisher:
publish.yml on Lucenx9/agentinit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentinit-0.3.11-py3-none-any.whl -
Subject digest:
afaac5ca0c0d25daaad45df50ba08fb0b1baf74c2eaaa792a8e55d6cd2defc59 - Sigstore transparency entry: 1046838520
- Sigstore integration time:
-
Permalink:
Lucenx9/agentinit@874e510669710adb73d3c3dd9400b852dc79779b -
Branch / Tag:
refs/tags/v0.3.11 - Owner: https://github.com/Lucenx9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@874e510669710adb73d3c3dd9400b852dc79779b -
Trigger Event:
release
-
Statement type: