Manage local Codex and OpenCode repo config from .ai-opencodex.json
Project description
augint-opencodex
augint-opencodex manages local Codex and OpenCode repository configuration from a
single tracked manifest, .ai-opencodex.json.
The current tool ships a real CLI with:
ai-opencodex initto create.ai-opencodex.jsonwhen needed and create any missing managed files without overwriting existing onesai-opencodex updateto merge rendered config into managed files, refresh generated docs and skills, and remove stale managed filesai-opencodex doctorto inspect manifest resolution, generated files, local ignore setup, and staged generated artifacts- a first-pass profile model with
augintandgov - local-only ignore handling through
.git/info/exclude
ai-opencodex is the preferred executable name. The published package still keeps
ai-codex as a compatibility alias.
The old sync workflow is now split into init and update.
Installation
For local development:
uv sync --group dev
Once the package is published, the intended install flows are:
uvx --from augint-opencodex ai-opencodex init
uv tool install augint-opencodex
ai-opencodex init
Manifest
This tool expects a tracked .ai-opencodex.json file in the target repository.
ai-opencodex initcreates the manifest from a bundled template when it is missing.ai-opencodex initnever overwrites an existing manifest; it warns and skips it.ai-opencodex updaterequires the manifest to already exist.
A generated starter manifest looks like this:
{
"$schema": "https://svange.github.io/augint-opencodex/ai-opencodex.schema.json",
"version": 1,
"profile": "augint",
"references": [],
"blocked_paths": [],
"content_policy": {
"no_emojis": true,
"no_ai_mentions": true
},
"shell_guardrails": {
"ask": [],
"deny": []
},
"patterns": {
"org_python_library": false
},
"opencode": {
"enabled": true,
"default_model": null,
"local_provider": {
"kind": "openai-compatible",
"name": "ollama",
"base_url": "http://host.docker.internal:11434/v1"
},
"models": [],
"bedrock": {
"enabled": false,
"models": []
}
},
"codex": {
"provider": "openai",
"model": null,
"approval_policy": null,
"sandbox_mode": null,
"web_search": null
}
}
The primary schema lives in
schemas/ai-opencodex.schema.json.
OpenCode and Codex manifest fields
The opencode and codex sections let the manifest fully express non-secret
local tool configuration:
opencode.local_provider- OpenAI-compatible local endpoint (for example Ollama) rendered asprovider.<name>.options.baseURLinopencode.jsonopencode.default_model- top-levelmodelinopencode.jsonopencode.models- curated catalog attached to the local provideropencode.bedrock.enabled/opencode.bedrock.models- toggles theamazon-bedrockprovider entry with the listed model IDscodex.provider-openaioraws; emitted as a runtime hint in.codex/config.tomlcodex.model,codex.approval_policy,codex.sandbox_mode,codex.web_search- override the defaults carried by the active profile
Commands
Initialize a repository:
uv run ai-opencodex init
Preview initialization without writing:
uv run ai-opencodex init --dry-run
Update managed files from the manifest:
uv run ai-opencodex update
Preview pending updates without writing:
uv run ai-opencodex update --dry-run
Fail if managed files are out of date:
uv run ai-opencodex update --check
Inspect the current repository state:
uv run ai-opencodex doctor
Update semantics
init is create-only:
- creates
.ai-opencodex.jsonif it is missing - creates any missing managed files
- skips existing files with a warning instead of overwriting them
update is merge-oriented:
- reads
.ai-opencodex.json - merges structured config files such as
opencode.jsonand.codex/config.toml - refreshes generated markdown and skill files from bundled templates
- lets new managed values win conflicts
- removes stale managed files that are no longer expected
Templates and generated skills
Bundled template assets now live under src/augint_opencodex/templates/ instead
of being embedded inline in renderer code.
That includes:
- the manifest starter template
- generated
.codex/config.tomland.ai-opencodex.mdtemplates - the generated
opencode.jsontemplate shell - the shared skills README template
- the org Python tooling skill file, including valid YAML frontmatter
Generated files
The current tool manages:
.ai-opencodex.md.codex/config.tomlopencode.json.agents/skills/README.md.agents/skills/org-python-tooling/SKILL.mdwhenpatterns.org_python_libraryis enabled
Managed outputs are added to .git/info/exclude by default so target
repositories do not need to commit them.
Canonical ownership
There is one source of truth for each managed file and one tool responsible for runtime-only behavior.
| File | Owner | Notes |
|---|---|---|
.ai-opencodex.json |
user (tracked) | Source of truth for managed files |
opencode.json |
augint-opencodex |
Repo root; managed |
.codex/config.toml |
augint-opencodex |
Repo root; managed |
.ai-opencodex.md |
augint-opencodex |
Repo root; managed |
.agents/skills/** |
augint-opencodex |
Managed |
Managed files should not be hand-edited unless you intend those edits to be
merged or replaced on the next ai-opencodex update.
Runtime ownership (augint-shell)
augint-shell is responsible only for runtime and container behavior:
- bind-mounting
.codex/andopencode.jsoninto the container - injecting secrets (
OPENAI_API_KEY, AWS credentials) at launch time - selecting Bedrock vs OpenAI auth paths based on the manifest's
codex.provider/opencode.bedrock.enabledsignals - CLI launch flags (
ai-shell opencode,ai-shell codex)
augint-shell should not ship duplicate template copies of opencode.json or
.codex/config.toml, and .ai-shell.yaml should not duplicate the shape of
.ai-opencodex.json.
Dogfooding this repo
This repository is set up to dogfood the generated instructions flow without a
root AGENTS.md.
- Keep
.ai-opencodex.jsontracked in the repo root. - Run
uv run ai-opencodex updateto generate.ai-opencodex.md,.codex/config.toml, and the other local-only artifacts. - Start Codex with
CODEX_HOME=$(pwd)/.codex codexso Codex uses the generated.codex/config.tomlas its home config and discovers.ai-opencodex.mdviaproject_doc_fallback_filenames.
Avoid creating a root AGENTS.md here. Codex checks AGENTS.md before fallback
filenames in the same directory, so a root AGENTS.md would shadow
.ai-opencodex.md and split Codex from the generated OpenCode instructions.
Development
make install
make test
make format
make typecheck
make build
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 augint_opencodex-0.10.0.tar.gz.
File metadata
- Download URL: augint_opencodex-0.10.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72a86b7285e4472c8a54215a1620d835325f268ea68d4d7f2be1e80a85d64b03
|
|
| MD5 |
5123cf9209924703130116e93a4252b4
|
|
| BLAKE2b-256 |
1384294468f14eb245de2eb3076287b0a5e13c612fae741087d6cfc975c723ae
|
Provenance
The following attestation bundles were made for augint_opencodex-0.10.0.tar.gz:
Publisher:
pipeline.yaml on svange/augint-opencodex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
augint_opencodex-0.10.0.tar.gz -
Subject digest:
72a86b7285e4472c8a54215a1620d835325f268ea68d4d7f2be1e80a85d64b03 - Sigstore transparency entry: 1316771834
- Sigstore integration time:
-
Permalink:
svange/augint-opencodex@45fdfe4e6d776c7ec8d595ac679f63370878bdf2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/svange
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pipeline.yaml@45fdfe4e6d776c7ec8d595ac679f63370878bdf2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file augint_opencodex-0.10.0-py3-none-any.whl.
File metadata
- Download URL: augint_opencodex-0.10.0-py3-none-any.whl
- Upload date:
- Size: 29.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d5565642551b536bb06200388ec705e2685a3534bb92fa8a06989c9c899d8fc
|
|
| MD5 |
31b387a51d6170691f94e044ea710abd
|
|
| BLAKE2b-256 |
0ab34f567f5d35650b3583d8dfff64e9d5fa420fdbc95e1f853392fa67f9e370
|
Provenance
The following attestation bundles were made for augint_opencodex-0.10.0-py3-none-any.whl:
Publisher:
pipeline.yaml on svange/augint-opencodex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
augint_opencodex-0.10.0-py3-none-any.whl -
Subject digest:
2d5565642551b536bb06200388ec705e2685a3534bb92fa8a06989c9c899d8fc - Sigstore transparency entry: 1316771909
- Sigstore integration time:
-
Permalink:
svange/augint-opencodex@45fdfe4e6d776c7ec8d595ac679f63370878bdf2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/svange
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pipeline.yaml@45fdfe4e6d776c7ec8d595ac679f63370878bdf2 -
Trigger Event:
push
-
Statement type: