Skip to main content

Scaffold agent context files into a project.

Project description

agentinit

CI PyPI Python Versions

agentinit preview

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 init add missing context files in current directory
  • agentinit minimal shortcut for init --minimal
  • agentinit new <project> create a new project and scaffold context
  • agentinit refresh-llms (alias: refresh) regenerate llms.txt
  • agentinit sync reconcile router files from templates
  • agentinit status show missing/incomplete files and line budgets
  • agentinit lint run contextlint checks
  • agentinit add <type> <name> install resources (skill, mcp, security, soul)
  • agentinit remove remove 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.md as primary router
  • CLAUDE.md for Claude Code memory/routing
  • .cursor/rules/project.mdc for Cursor rule routing
  • .github/copilot-instructions.md for GitHub Copilot context
  • GEMINI.md for Gemini CLI context routing
  • llms.txt as 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-llms and agentinit sync)
  • replace managed symlinks with regular files inside the repo; unsafe managed paths are skipped by design

Documentation 📚

Wiki (full usage and examples):

Development 🧪

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

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

agentinit-0.3.10.tar.gz (62.7 kB view details)

Uploaded Source

Built Distribution

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

agentinit-0.3.10-py3-none-any.whl (60.7 kB view details)

Uploaded Python 3

File details

Details for the file agentinit-0.3.10.tar.gz.

File metadata

  • Download URL: agentinit-0.3.10.tar.gz
  • Upload date:
  • Size: 62.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentinit-0.3.10.tar.gz
Algorithm Hash digest
SHA256 0a4d5acb7095402f31e88b5f78a794b15b932a11e5ec12ad1d502918f0d3e5a8
MD5 010f73f0cbc621cc1962ed77549501d5
BLAKE2b-256 b2e6502e7ea9f470fde4ce48ad06ff121985a1ba7d408a6283937b3a378ef170

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentinit-0.3.10.tar.gz:

Publisher: publish.yml on Lucenx9/agentinit

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

File details

Details for the file agentinit-0.3.10-py3-none-any.whl.

File metadata

  • Download URL: agentinit-0.3.10-py3-none-any.whl
  • Upload date:
  • Size: 60.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentinit-0.3.10-py3-none-any.whl
Algorithm Hash digest
SHA256 74fc79652aa5cdeee380a9b33f53209acc47f35f7b11db8aa3dea075d073b5b1
MD5 23e26442fd2b5bc43fb28e6d028ab64e
BLAKE2b-256 bd75c6845e4c7c3f08922e2e2ecee0b35551f7d91cfc9f9edfa9f0751adb82be

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentinit-0.3.10-py3-none-any.whl:

Publisher: publish.yml on Lucenx9/agentinit

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