The dotagents CLI: install and manage a portable ~/.agents config for AI coding agents
pip install dotagents-cli==0.9.1 Copy PIP instructions
Like dotfiles, but for AI coding agents: a portable, token-budgeted ~/.agents configuration that works across agent runners (Claude Code, Antigravity, Copilot, Codex, pi, ...). dotagents is the mechanism — install a neutral base, then layer in opt-in overlays that carry your standards (repo structure, CI/release discipline, whatever workflows you want) — so you record them once instead of restating them every session.
The config is a base overlay plus opt-in overlays; the dotagents CLI applies them. Everything else is repo infrastructure.
The example overlays — engineering (the planning/execution/review workflow set, its rules, repo templates and helper tools), the per-language python / node / rust, release, private-sync, net and recovery — live on a separate repo branch, not in main's tree: they are swappable payloads, not part of the tool. Name that branch as a repo (--repo, see below) to install them. See the docs for what each ships.
This repo's own working material (decisions, findings, plans) lives privately in its untracked .agents/ — like every project, .agents/ is never tracked or pushed.
Overlays follow the Agent Overlay Specification (AOS): each may carry an overlay.cfg manifest (name/description/requires/routing, and what it needs that is not a default: environment, path additions, setup, runtime), read by the dotagents overlays subcommand, which manages overlays by name (add/remove/list/sync/show) — see Managing overlays below.
pip install dotagents-cli # gives you `import dotagents` and the `dotagents` command Or skip pip entirely with the self-contained downloadable .pyz (see below).
dotagents init -g # the base config in ~/.agents, plus the Claude Code include and hooks export AGENTS_OVERLAYS_REPO="https://github.com/jose-pr/dotagents.git@repo#overlays" dotagents overlays add engineering python -g # cloned with git, so git must be on PATH dotagents overlays list -g ls ~/.agents/overlays/engineering/flows/PLAN.md AGENTS_OVERLAYS_REPO names where overlays come from; set it in your shell profile, or pass --repo to each overlays command instead. CI runs this block as written.
init lays down the neutral base config. It writes the store's AGENTS.md managed block, points Claude Code at it (an include in ~/.claude/CLAUDE.md for the user store, /.claude/CLAUDE.md for a project), and wires each supporting agent's hooks so dotagents env and dotagents context reach it at session start (--no-hooks opts out) — but imposes no opinions (those come from overlays add). The block is marker-delimited, so re-running init never clobbers what you've added around it. Scope: the user store with -g/--global (~/.agents, or $AGENTS_HOME); without it, the current directory's .agents — run it from the project root. When a session has pinned $AGENTS_PROJECT_ROOT (or $CLAUDE_PROJECT_DIR) and you are inside that directory, the pinned root is used; outside it, the nearest directory up with a .git or its own .agents, with a warning.
dotagents init # project: ./.agents dotagents init -g # user store: ~/.agents dotagents init --bin-dir ~/.local/bin # also write a `dotagents` command on PATH dotagents init --dry-run # show what would happen dotagents init --force # replace AGENTS.md's content wholesale (backed up) --from selects another base: a base overlay directory, a dotagents checkout (its src/dotagents/_overlay), a file:, http(s):, zip:, sftp: or s3: URI (pip install "dotagents-cli[uri]" for all but file:, plus [sftp] or [s3] for those schemes), or a git repository (repo[@ref][#path]). A remote one is fetched into /.cache/overlays/. The bundled base ships inside the package, so --from is only for a base of your own. init records it (without any credentials in the URL), and later init and overlays runs compose over it.
init wires Claude Code plus any harness it is running inside (detected from its environment); --agents a,b replaces that set, so include claude to keep it.
Overlays beyond the base are managed by name with dotagents overlays add — it installs into /overlays/ / (discoverable) and publishes the overlay's skills into the store's shared skills/ dir. See below.
dotagents overlays manages opt-in overlays by name. add resolves each name against repos in order — the first that offers the name wins. A repo is always a collection of overlays: a directory (each subdirectory an overlay, e.g. a checkout of the repo branch, whose overlays sit under overlays/ ) or a JSON/TOML/YAML registry file mapping names to sources. It lives at a local path, an http(s):// URL (a registry file, fetched), or inside a git repository named [@ ][# ], where the path picks the directory or registry file in the checkout (no path: the checkout root). A source names one overlay: a local directory, or a git spec whose path is the overlay's root directory (no path: the repository root is the overlay); a relative path is relative to the registry file, and inside a git checkout stays in the same repository at the same ref. Name repos with --repo, $AGENTS_OVERLAYS_REPO_ / $AGENTS_OVERLAYS_REPO, or a dotagents.{json,toml,yaml} in the project or user store. Installed overlays are discovered by their presence under /overlays/, and each records the repo it was installed from.
dotagents overlays add python engineering # install into the scope, publish skills, merge rules/routing dotagents overlays list # installed (discovered) + available (from the repos) dotagents overlays sync 'py*' # refresh installed overlays matching a glob, resync their skills dotagents overlays remove python # delete the overlay dir + unpublish its skills dotagents overlays show python # manifest, requires, setup, skills, where it came from Scope is project by default (the current directory's .agents/, resolved as for init) or user with -g/--global (~/.agents/, the configurable store). Each overlay installs as a directory (kept, discoverable), what its manifest requires is installed first, its routing/rules merge into AGENTS.md's managed block, and its skills/ / are symlinked (or --copy'd, for Windows / no-symlink) into the store's shared skills/ so every agent sees the same skills.
Overlay setup. An overlay is activated only for the digest its last preparation (dependencies, then setup) succeeded for on this machine; overlays sync prepares it. An overlay's setup is the [[setup]] variant its overlay.cfg declares for this OS (interpreter, args, timeout, network), else one setup. at its root, the first this machine can run (.py, .js, .mjs, .cjs, then .ps1 on Windows, .bash, .sh elsewhere), taken to need the network. dotagents runs it after add/sync copies the overlay in and before remove deletes it, telling it the phase as its first argument and $AOS_SETUP_PHASE: install the first time, sync on every add or sync after that, remove on removal. --no-setup skips it. The contract for authors:
A self-contained zipapp with duho, pathapi and tomli bundled in (pure Python, so one file runs on any OS and on Python 3.9+), so it needs no pip install. Each release attaches one: https://github.com/jose-pr/dotagents/releases/latest/download/dotagents.pyz.
python dotagents.pyz init -g --bin-dir ~/.local/bin # lay down the base + a `dotagents` command python -m dotagents build-pyz --out dist/dotagents.pyz # or build it yourself (needs this repo checkout) Or let your agent do it: point it at this repo and say —
Read README.md, install dotagents-cli (into a virtual environment, or with pipx), run the Quick start block, and confirm ~/.agents/overlays/engineering/flows/PLAN.md exists.
python tools/audit.py --root . # validate THIS REPO's layout (CI tooling) python tools/audit.py --check-templates --root . # + template checks (needs 3.11+) Customize Fork it — that's the point. Keep the base AGENTS.md small (the audit warns past ~2.5KB); put opinionated content in overlays. dotagents installs no design log: a config miss is a finding — dotagents findings add -g for the user store (~/.agents/findings/), no -g for a project ( /.agents/findings/) — and triage closes each with its resolution, which is the record. How you keep any decisions beyond that is up to you. A store's dotagents/ directory exists only for your own command modules (dotagents/cmds/), which you create when you add your first one, and for dotagents/config.toml, which records an init --from base and, if you set it, git_ssl_revoke (how git checks certificate revocation on Windows). This repo follows the same rule: its working material lives in an untracked .agents/, never committed — so what's public here is only the CLI, the base overlay, and the opt-in overlays. If you fork, keep the tracked surface free of personal paths and private project names. tools/audit.py validates this repo's structure only; personal-leak scanning (machine paths, private plan names, session trailers) is a separate, personal tool you run locally before a push — keep it as a command module in your private .agents/dotagents/cmds/, not in the repo.
Full docs — install modes, the overlay model, the CLI command surface, private sync, authoring your own overlays and commands, and the API reference — are at jose-pr.github.io/dotagents.
Both files in this release have provenance metadata.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




