codexmgr 0.1.1__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codexmgr-0.1.1 → codexmgr-0.1.3}/.gitignore +7 -0
- codexmgr-0.1.3/PKG-INFO +457 -0
- codexmgr-0.1.3/README.md +434 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/pyproject.toml +8 -3
- {codexmgr-0.1.1 → codexmgr-0.1.3}/src/codexmgr/__init__.py +1 -1
- codexmgr-0.1.3/src/codexmgr/agents/__init__.py +1 -0
- codexmgr-0.1.1/src/codexmgr/agents_file.py → codexmgr-0.1.3/src/codexmgr/agents/file.py +16 -2
- codexmgr-0.1.3/src/codexmgr/agents/manager.py +210 -0
- {codexmgr-0.1.1/src/codexmgr → codexmgr-0.1.3/src/codexmgr/agents}/renderer.py +1 -1
- codexmgr-0.1.3/src/codexmgr/commands/__init__.py +1 -0
- {codexmgr-0.1.1/src/codexmgr → codexmgr-0.1.3/src/codexmgr/commands}/codex.py +30 -3
- codexmgr-0.1.3/src/codexmgr/commands/codex_jit.py +211 -0
- codexmgr-0.1.3/src/codexmgr/commands/config_mutations.py +265 -0
- codexmgr-0.1.3/src/codexmgr/commands/health.py +236 -0
- codexmgr-0.1.3/src/codexmgr/commands/navigation.py +156 -0
- codexmgr-0.1.3/src/codexmgr/core/__init__.py +45 -0
- codexmgr-0.1.3/src/codexmgr/core/options.py +35 -0
- {codexmgr-0.1.1/src/codexmgr → codexmgr-0.1.3/src/codexmgr/core}/toml_io.py +90 -69
- codexmgr-0.1.3/src/codexmgr/hooks/__init__.py +25 -0
- codexmgr-0.1.3/src/codexmgr/hooks/config.py +167 -0
- codexmgr-0.1.3/src/codexmgr/hooks/copies.py +219 -0
- codexmgr-0.1.3/src/codexmgr/hooks/listing.py +131 -0
- codexmgr-0.1.3/src/codexmgr/hooks/merge.py +255 -0
- codexmgr-0.1.3/src/codexmgr/hooks/resolution.py +258 -0
- codexmgr-0.1.3/src/codexmgr/hooks/sources.py +127 -0
- codexmgr-0.1.3/src/codexmgr/interface/__init__.py +1 -0
- codexmgr-0.1.3/src/codexmgr/interface/cli.py +186 -0
- codexmgr-0.1.3/src/codexmgr/interface/parser.py +257 -0
- codexmgr-0.1.3/src/codexmgr/interface/parsers/__init__.py +2 -0
- codexmgr-0.1.3/src/codexmgr/interface/parsers/mcp.py +88 -0
- codexmgr-0.1.3/src/codexmgr/mcp/__init__.py +56 -0
- codexmgr-0.1.3/src/codexmgr/mcp/apply.py +69 -0
- codexmgr-0.1.3/src/codexmgr/mcp/cli.py +197 -0
- codexmgr-0.1.3/src/codexmgr/mcp/config.py +268 -0
- codexmgr-0.1.3/src/codexmgr/mcp/discovery.py +120 -0
- codexmgr-0.1.3/src/codexmgr/mcp/fields.py +150 -0
- codexmgr-0.1.3/src/codexmgr/mcp/tables.py +90 -0
- codexmgr-0.1.3/src/codexmgr/packages/__init__.py +13 -0
- codexmgr-0.1.3/src/codexmgr/packages/cli.py +109 -0
- codexmgr-0.1.3/src/codexmgr/packages/config.py +184 -0
- codexmgr-0.1.3/src/codexmgr/packages/listing.py +17 -0
- codexmgr-0.1.3/src/codexmgr/packages/mutation.py +207 -0
- codexmgr-0.1.3/src/codexmgr/packages/sources.py +80 -0
- codexmgr-0.1.3/src/codexmgr/project/__init__.py +1 -0
- codexmgr-0.1.3/src/codexmgr/project/apply.py +219 -0
- codexmgr-0.1.1/src/codexmgr/project_config.py → codexmgr-0.1.3/src/codexmgr/project/config.py +9 -10
- codexmgr-0.1.3/src/codexmgr/project/generated.py +180 -0
- codexmgr-0.1.3/src/codexmgr/project/snapshot.py +145 -0
- codexmgr-0.1.3/src/codexmgr/project/state.py +43 -0
- codexmgr-0.1.3/src/codexmgr/project/sync.py +280 -0
- codexmgr-0.1.3/src/codexmgr/skills/__init__.py +28 -0
- codexmgr-0.1.1/src/codexmgr/skills.py → codexmgr-0.1.3/src/codexmgr/skills/config.py +47 -53
- codexmgr-0.1.3/src/codexmgr/skills/copies.py +199 -0
- codexmgr-0.1.3/src/codexmgr/skills/listing.py +147 -0
- codexmgr-0.1.3/src/codexmgr/skills/resolution.py +147 -0
- codexmgr-0.1.3/src/codexmgr/skills/sources.py +274 -0
- codexmgr-0.1.3/src/codexmgr/tui/__init__.py +2 -0
- codexmgr-0.1.3/src/codexmgr/tui/app.py +297 -0
- codexmgr-0.1.3/src/codexmgr/tui/cli.py +34 -0
- codexmgr-0.1.3/src/codexmgr/tui/diff.py +27 -0
- codexmgr-0.1.3/src/codexmgr/tui/items.py +252 -0
- codexmgr-0.1.3/src/codexmgr/tui/models.py +50 -0
- codexmgr-0.1.3/src/codexmgr/tui/mutations.py +97 -0
- codexmgr-0.1.3/src/codexmgr/tui/package_refs.py +89 -0
- codexmgr-0.1.3/src/codexmgr/tui/package_selection.py +23 -0
- codexmgr-0.1.3/src/codexmgr/tui/rendering.py +92 -0
- codexmgr-0.1.3/src/codexmgr/tui/state.py +299 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/conftest.py +1 -1
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_agents_file.py +2 -2
- codexmgr-0.1.3/tests/test_agentsmd_list_cli.py +87 -0
- codexmgr-0.1.3/tests/test_agentsmd_tools_cli.py +111 -0
- codexmgr-0.1.3/tests/test_apply_check_cli.py +273 -0
- codexmgr-0.1.3/tests/test_cd_cli.py +145 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_cli.py +125 -6
- codexmgr-0.1.3/tests/test_codex_cli.py +398 -0
- codexmgr-0.1.3/tests/test_hooks_cli.py +436 -0
- codexmgr-0.1.3/tests/test_mcp_apply_cli.py +119 -0
- codexmgr-0.1.3/tests/test_mcp_cli.py +364 -0
- codexmgr-0.1.3/tests/test_packages_cli.py +601 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_paths.py +1 -1
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_renderer.py +2 -2
- codexmgr-0.1.3/tests/test_skill_copies_cli.py +179 -0
- codexmgr-0.1.3/tests/test_skill_home_sources_cli.py +58 -0
- codexmgr-0.1.3/tests/test_skill_list_cli.py +52 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_skills_cli.py +51 -0
- codexmgr-0.1.3/tests/test_status_doctor_cli.py +272 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_sync_cli.py +10 -4
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_toml_io.py +9 -2
- codexmgr-0.1.3/tests/test_tui_app.py +154 -0
- codexmgr-0.1.3/tests/test_tui_state.py +338 -0
- codexmgr-0.1.3/uv.lock +282 -0
- codexmgr-0.1.1/PKG-INFO +0 -222
- codexmgr-0.1.1/README.md +0 -203
- codexmgr-0.1.1/src/codexmgr/agentsmd.py +0 -96
- codexmgr-0.1.1/src/codexmgr/cli.py +0 -240
- codexmgr-0.1.1/src/codexmgr/project.py +0 -74
- codexmgr-0.1.1/tests/test_codex_cli.py +0 -154
- codexmgr-0.1.1/uv.lock +0 -86
- {codexmgr-0.1.1 → codexmgr-0.1.3}/.github/actions/install_package/action.yml +0 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/.github/workflows/py_test.yml +0 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/.github/workflows/version_publish_main.yml +0 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/pytest.toml +0 -0
- {codexmgr-0.1.1/src/codexmgr → codexmgr-0.1.3/src/codexmgr/core}/errors.py +0 -0
- {codexmgr-0.1.1/src/codexmgr → codexmgr-0.1.3/src/codexmgr/core}/paths.py +0 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/src/codexmgr/py.typed +0 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_empty_skill_config_cli.py +0 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_home_resolution_cli.py +0 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_package_metadata.py +0 -0
- {codexmgr-0.1.1 → codexmgr-0.1.3}/tests/test_python_compatibility.py +0 -0
codexmgr-0.1.3/PKG-INFO
ADDED
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codexmgr
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Manage project-local Codex configuration from reusable templates
|
|
5
|
+
Keywords: agents,cli,codex,configuration,skills
|
|
6
|
+
Classifier: Development Status :: 4 - Beta
|
|
7
|
+
Classifier: Environment :: Console
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Topic :: Software Development
|
|
14
|
+
Classifier: Typing :: Typed
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Requires-Dist: textual>=8.2.7
|
|
17
|
+
Requires-Dist: tomlkit>=0.15.0
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Requires-Dist: pytest-asyncio>=1.4.0; extra == 'dev'
|
|
20
|
+
Requires-Dist: pytest>=9.0.3; extra == 'dev'
|
|
21
|
+
Requires-Dist: pyyaml>=6.0.3; extra == 'dev'
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# codexmgr
|
|
25
|
+
|
|
26
|
+
`codexmgr` manages project-local Codex configuration from reusable templates.
|
|
27
|
+
It keeps hand-written project instructions in `AGENTS.md` and generated Codex
|
|
28
|
+
configuration in `.codex/` synchronized from a small declarative
|
|
29
|
+
`.codex/codexmgr.toml` file. It can also keep project-local MCP server
|
|
30
|
+
overrides in sync without editing the user Codex config.
|
|
31
|
+
|
|
32
|
+
The tool is intentionally narrow:
|
|
33
|
+
|
|
34
|
+
- compose reusable AGENTS.md instruction fragments
|
|
35
|
+
- enable or disable Codex skills per project
|
|
36
|
+
- enable or disable reusable Codex hook bundles per project
|
|
37
|
+
- enable or disable packaged sets of AGENTS.md, skill, and hook settings
|
|
38
|
+
- enable, disable, inspect, and update safe project-local MCP overrides
|
|
39
|
+
- use an interactive terminal UI for common project management tasks
|
|
40
|
+
- write reproducible lock data for the resolved project configuration
|
|
41
|
+
- run `codex` with project `.codex/config.toml` values translated into `-c`
|
|
42
|
+
overrides
|
|
43
|
+
|
|
44
|
+
## Requirements
|
|
45
|
+
|
|
46
|
+
- Python 3.11 or newer
|
|
47
|
+
- `uv` for local development
|
|
48
|
+
- `codex` on `PATH` only when using `codexmgr codex ...`
|
|
49
|
+
|
|
50
|
+
## Installation
|
|
51
|
+
|
|
52
|
+
From a checkout:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
uv sync --group dev
|
|
56
|
+
uv run codexmgr --help
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
For local command-line use from this repository:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
uv tool install .
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Quick Start
|
|
66
|
+
|
|
67
|
+
Create the project `.codex/` directory:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
codexmgr setup
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Create or install a named AGENTS.md template under
|
|
74
|
+
`$CODEXMGR_HOME/agentsmd/<name>.toml`. If `CODEXMGR_HOME` is unset,
|
|
75
|
+
`~/.codexmgr` is used.
|
|
76
|
+
|
|
77
|
+
```toml
|
|
78
|
+
[coding]
|
|
79
|
+
text = """
|
|
80
|
+
- Keep source files focused and small.
|
|
81
|
+
- Add tests for behavior changes before implementation.
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
[coding.debugging]
|
|
85
|
+
text = "Prefer lasting regression tests over temporary scripts."
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Add the template to the current project:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
codexmgr agentsmd add coding
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This updates `.codex/codexmgr.toml`, runs `apply`, writes
|
|
95
|
+
`.codex/codexmgr.lock`, and refreshes the managed block in `AGENTS.md`.
|
|
96
|
+
|
|
97
|
+
## Managed Files
|
|
98
|
+
|
|
99
|
+
`codexmgr` reads and writes these project files:
|
|
100
|
+
|
|
101
|
+
- `.codex/codexmgr.toml`: source configuration edited by CLI commands or by
|
|
102
|
+
hand
|
|
103
|
+
- `.codex/codexmgr.lock`: resolved template, skill, hook, and MCP state written by
|
|
104
|
+
`apply`
|
|
105
|
+
- `.codex/config.toml`: Codex config updated with `[[skills.config]]` entries
|
|
106
|
+
and `[mcp_servers.<id>]` overrides
|
|
107
|
+
- `.codex/hooks.json`: Codex hook config updated with enabled reusable hook
|
|
108
|
+
bundles while preserving unmanaged local hooks
|
|
109
|
+
- `.codex/hooks/<name>`: project-local copies of enabled hook bundle support
|
|
110
|
+
files
|
|
111
|
+
- `AGENTS.md`: project instructions, with only the managed block replaced
|
|
112
|
+
|
|
113
|
+
The managed AGENTS.md block is:
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
<!-- BEGIN CODEXMGR GENERATED -->
|
|
117
|
+
<!-- END CODEXMGR GENERATED -->
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Manual content outside this block is preserved. If the block is missing,
|
|
121
|
+
`codexmgr` appends it. If `AGENTS.md` is missing, `codexmgr` creates it.
|
|
122
|
+
|
|
123
|
+
## Project Configuration
|
|
124
|
+
|
|
125
|
+
`.codex/codexmgr.toml` supports AGENTS.md templates, skill state, hook state, and MCP
|
|
126
|
+
overrides:
|
|
127
|
+
|
|
128
|
+
```toml
|
|
129
|
+
[agents_md]
|
|
130
|
+
src = ["coding", "/absolute/or/project-relative/template.toml"]
|
|
131
|
+
|
|
132
|
+
[skills]
|
|
133
|
+
enabled = ["review-helper"]
|
|
134
|
+
disabled = ["experimental-skill", "skills/local-disabled"]
|
|
135
|
+
|
|
136
|
+
[hooks]
|
|
137
|
+
enabled = ["repo-rules"]
|
|
138
|
+
disabled = ["experimental-hook"]
|
|
139
|
+
|
|
140
|
+
[mcp.servers.browsermcp]
|
|
141
|
+
enabled = true
|
|
142
|
+
bearer_token_env_var = "BROWSERMCP_TOKEN"
|
|
143
|
+
env_vars = ["BROWSER_ENV"]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Named AGENTS.md templates resolve from `$CODEXMGR_HOME/agentsmd/<name>.toml`.
|
|
147
|
+
Path-like template values resolve relative to the project unless they are
|
|
148
|
+
absolute paths.
|
|
149
|
+
|
|
150
|
+
Named skills resolve from `$CODEXMGR_HOME/skills/<name>/SKILL.md` or
|
|
151
|
+
`$CODEX_HOME/skills/<name>/SKILL.md`; duplicate names across distinct homes
|
|
152
|
+
fail. Enabled CODEXMGR_HOME skills are copied into `.agents/skills/<name>` on
|
|
153
|
+
every apply by overlaying source files while preserving extra local files.
|
|
154
|
+
Path-like skill values resolve to either a `SKILL.md` file or a directory
|
|
155
|
+
containing `SKILL.md`. Missing skills are written as name-based entries so Codex
|
|
156
|
+
can resolve them later.
|
|
157
|
+
|
|
158
|
+
Named hooks resolve from `$CODEXMGR_HOME/hooks/<name>/hooks.json`. Enabled hook
|
|
159
|
+
bundles are merged into `.codex/hooks.json` on every apply with
|
|
160
|
+
`codexmanager_meta` added to each managed handler. Existing unmanaged hooks are
|
|
161
|
+
preserved. Bundle files other than the root `hooks.json` are copied into
|
|
162
|
+
`.codex/hooks/<name>`.
|
|
163
|
+
|
|
164
|
+
Packaged configurations resolve from
|
|
165
|
+
`$CODEXMGR_HOME/packages/<name>/config.toml`. A package config is a TOML
|
|
166
|
+
document that can contain root `agentsmd`, `hooks`, and `skills` string lists
|
|
167
|
+
plus optional profile tables:
|
|
168
|
+
|
|
169
|
+
```toml
|
|
170
|
+
agentsmd = []
|
|
171
|
+
hooks = ["repo-rules"]
|
|
172
|
+
skills = ["repo-rule-manager"]
|
|
173
|
+
|
|
174
|
+
[profiles.strict]
|
|
175
|
+
agentsmd = ["strict-coding"]
|
|
176
|
+
hooks = ["strict-rules"]
|
|
177
|
+
skills = ["strict-review"]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`codexmgr package enable <name>` validates package AGENTS.md and hook
|
|
181
|
+
references, then updates `.codex/codexmgr.toml` as if the corresponding
|
|
182
|
+
`agentsmd add`, `hooks enable`, and `skill enable` commands had been run.
|
|
183
|
+
`codexmgr package disable <name>` removes package AGENTS.md entries when
|
|
184
|
+
present and disables the package skills and hooks.
|
|
185
|
+
|
|
186
|
+
Package profiles are merged with the root package entries:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
codexmgr package enable repo-rules --profile strict coding --profile python
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Direct mutating commands also accept batch targets, for example:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
codexmgr agentsmd add coding python
|
|
196
|
+
codexmgr skill enable review-helper repo-rule-manager
|
|
197
|
+
codexmgr hooks enable repo-rules audit
|
|
198
|
+
codexmgr mcp enable browsermcp context7
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Mutating commands run `apply` automatically unless `--no-sync` is passed.
|
|
202
|
+
Project guidelines require `apply` whenever `.codex/codexmgr.toml` changes,
|
|
203
|
+
unless `--no-sync` was explicitly requested.
|
|
204
|
+
|
|
205
|
+
## Interactive TUI
|
|
206
|
+
|
|
207
|
+
`codexmgr tui` opens a Textual-based terminal UI for managing project-local
|
|
208
|
+
configuration. It shows AGENTS.md templates, skills, hooks, packages, and MCP
|
|
209
|
+
server enable overrides in selectable lists. Changes are staged in memory while
|
|
210
|
+
you navigate and toggle entries. Press `s` to save; the save writes
|
|
211
|
+
`.codex/codexmgr.toml` once and runs `apply` once unless `--no-sync` was used.
|
|
212
|
+
Package profiles appear as separate selectable rows under their package.
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
codexmgr tui
|
|
216
|
+
codexmgr tui --no-sync
|
|
217
|
+
codexmgr tui --show-diff
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
The dashboard shows generated-file sync state. By default it lists stale
|
|
221
|
+
generated paths; with `--show-diff`, it shows unified diffs for the staged
|
|
222
|
+
configuration. MCP editing in the TUI is intentionally limited to the
|
|
223
|
+
project-local `enabled` override. Advanced MCP fields remain available through
|
|
224
|
+
the classic `codexmgr mcp ...` commands.
|
|
225
|
+
|
|
226
|
+
## Template Format
|
|
227
|
+
|
|
228
|
+
Template files are TOML documents. Each top-level key must be a table and
|
|
229
|
+
becomes an AGENTS.md heading. A `text` value inside a table becomes the body
|
|
230
|
+
under that heading. Nested tables become nested headings.
|
|
231
|
+
|
|
232
|
+
```toml
|
|
233
|
+
[coding]
|
|
234
|
+
text = "Top-level guidance."
|
|
235
|
+
|
|
236
|
+
[coding.tests]
|
|
237
|
+
text = "Test behavior, not implementation details."
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
renders as:
|
|
241
|
+
|
|
242
|
+
```markdown
|
|
243
|
+
# coding
|
|
244
|
+
Top-level guidance.
|
|
245
|
+
|
|
246
|
+
## tests
|
|
247
|
+
Test behavior, not implementation details.
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Unsupported scalar entries fail loudly instead of being silently ignored. This
|
|
251
|
+
keeps template mistakes visible during `apply`.
|
|
252
|
+
|
|
253
|
+
## Commands
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
codexmgr setup
|
|
257
|
+
codexmgr apply
|
|
258
|
+
codexmgr apply --check
|
|
259
|
+
codexmgr apply --diff
|
|
260
|
+
codexmgr cd [--path | --explorer | --terminal]
|
|
261
|
+
codexmgr doctor
|
|
262
|
+
codexmgr status
|
|
263
|
+
codexmgr tui [--no-sync] [--show-diff]
|
|
264
|
+
codexmgr agentsmd list
|
|
265
|
+
codexmgr agentsmd show <name-or-template-path>
|
|
266
|
+
codexmgr agentsmd validate <name-or-template-path>
|
|
267
|
+
codexmgr agentsmd add [--no-sync] <name-or-template-path> [...]
|
|
268
|
+
codexmgr agentsmd remove [--no-sync] <name-or-template-path> [...]
|
|
269
|
+
codexmgr init-template agentsmd <name>
|
|
270
|
+
codexmgr skill list
|
|
271
|
+
codexmgr skill enable [--no-sync] <name-or-skill-path> [...]
|
|
272
|
+
codexmgr skill disable [--no-sync] <name-or-skill-path> [...]
|
|
273
|
+
codexmgr hooks list
|
|
274
|
+
codexmgr hooks enable [--no-sync] <hook-name> [...]
|
|
275
|
+
codexmgr hooks disable [--no-sync] <hook-name> [...]
|
|
276
|
+
codexmgr package list
|
|
277
|
+
codexmgr package enable [--no-sync] <package-name> [...] [--profile <name> [...]]
|
|
278
|
+
codexmgr package disable [--no-sync] <package-name> [...] [--profile <name> [...]]
|
|
279
|
+
codexmgr mcp list
|
|
280
|
+
codexmgr mcp show <server-id>
|
|
281
|
+
codexmgr mcp validate
|
|
282
|
+
codexmgr mcp enable [--no-sync] <server-id> [...]
|
|
283
|
+
codexmgr mcp disable [--no-sync] <server-id> [...]
|
|
284
|
+
codexmgr mcp set-token-env [--no-sync] <server-id> <ENV_VAR>
|
|
285
|
+
codexmgr mcp add-env-var [--no-sync] <server-id> <ENV_VAR>
|
|
286
|
+
codexmgr mcp remove-env-var [--no-sync] <server-id> <ENV_VAR>
|
|
287
|
+
codexmgr mcp set-env-header [--no-sync] <server-id> <HEADER> <ENV_VAR>
|
|
288
|
+
codexmgr mcp unset-env-header [--no-sync] <server-id> <HEADER>
|
|
289
|
+
codexmgr mcp set-field [--no-sync] <server-id> <field> <toml-value>
|
|
290
|
+
codexmgr codex <args...>
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
`setup` creates `.codex/` in the current project.
|
|
294
|
+
|
|
295
|
+
`apply` reads `.codex/codexmgr.toml`, resolves configured sources, writes
|
|
296
|
+
`.codex/codexmgr.lock`, updates `.codex/config.toml` skill entries when a
|
|
297
|
+
`[skills]` table is configured, writes `.codex/hooks.json` when `[hooks]` is
|
|
298
|
+
configured, writes local `[mcp_servers.<id>]` overrides when `[mcp]` is
|
|
299
|
+
configured, and refreshes the generated `AGENTS.md` block when `[agents_md]` is
|
|
300
|
+
configured.
|
|
301
|
+
|
|
302
|
+
`apply --check` exits with a failure if generated files are out of sync without
|
|
303
|
+
writing them. `apply --diff` also avoids writing and prints unified diffs for
|
|
304
|
+
the expected generated-file changes.
|
|
305
|
+
|
|
306
|
+
`cd` launches a shell in `$CODEXMGR_HOME`. Use
|
|
307
|
+
`codexmgr cd --path` to print only the path, `codexmgr cd --explorer` to open
|
|
308
|
+
the directory in a file explorer, and `codexmgr cd --terminal` to open a new
|
|
309
|
+
terminal there.
|
|
310
|
+
|
|
311
|
+
`doctor` checks project setup, home environment variables, project TOML syntax,
|
|
312
|
+
referenced snippets, enabled skills, enabled hook bundles, and stale generated
|
|
313
|
+
files.
|
|
314
|
+
|
|
315
|
+
`status` prints the resolved homes, configured snippets, skills, hooks, and
|
|
316
|
+
whether generated files are in sync.
|
|
317
|
+
|
|
318
|
+
`codexmgr codex` can run with a just-in-time package/profile overlay without
|
|
319
|
+
changing `.codex/codexmgr.toml`. Put Codex arguments after `--` when using this
|
|
320
|
+
syntax:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
codexmgr codex repo-rules --profile strict coding --profile python -- exec "review this"
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
## Project MCP Overrides
|
|
327
|
+
|
|
328
|
+
`codexmgr mcp ...` edits only project-local configuration:
|
|
329
|
+
|
|
330
|
+
- source state is stored in `.codex/codexmgr.toml` under
|
|
331
|
+
`[mcp.servers.<id>]`
|
|
332
|
+
- `apply` writes generated overrides into `.codex/config.toml` under
|
|
333
|
+
`[mcp_servers.<id>]`
|
|
334
|
+
- `$CODEX_HOME/config.toml` and `~/.codex/config.toml` are never modified
|
|
335
|
+
|
|
336
|
+
Mutating MCP commands require a project `.codex/` directory and run `apply`
|
|
337
|
+
automatically unless `--no-sync` is passed. They do not create or remove MCP
|
|
338
|
+
server definitions; use `codex mcp add` or direct Codex config editing for the
|
|
339
|
+
base server setup.
|
|
340
|
+
|
|
341
|
+
List MCP servers available from Codex and show any project override state:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
codexmgr mcp list
|
|
345
|
+
codexmgr mcp show context7
|
|
346
|
+
codexmgr mcp validate
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
`codexmgr mcp list` shells out to `codex mcp list --json` for read-only
|
|
350
|
+
discovery. It does not edit user configuration.
|
|
351
|
+
|
|
352
|
+
Enable or disable an existing server without deleting its definition:
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
codexmgr mcp disable context7
|
|
356
|
+
codexmgr mcp enable context7
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Update token and environment references without storing literal token values:
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
codexmgr mcp set-token-env figma FIGMA_TOKEN
|
|
363
|
+
codexmgr mcp add-env-var context7 CONTEXT7_TOKEN
|
|
364
|
+
codexmgr mcp remove-env-var context7 CONTEXT7_TOKEN
|
|
365
|
+
codexmgr mcp set-env-header figma Authorization FIGMA_AUTH_HEADER
|
|
366
|
+
codexmgr mcp unset-env-header figma Authorization
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Set a small allowlist of non-secret fields from TOML literals:
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
codexmgr mcp set-field context7 required true
|
|
373
|
+
codexmgr mcp set-field context7 enabled_tools '["search", "open"]'
|
|
374
|
+
codexmgr mcp set-field context7 default_tools_approval_mode '"prompt"'
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Supported `set-field` names are `required`, `startup_timeout_sec`,
|
|
378
|
+
`tool_timeout_sec`, `enabled_tools`, `disabled_tools`, and
|
|
379
|
+
`default_tools_approval_mode`. The direct `enable` and `disable` commands manage
|
|
380
|
+
the `enabled` field.
|
|
381
|
+
|
|
382
|
+
Literal API token writes are intentionally not part of this command surface;
|
|
383
|
+
prefer environment variable references such as `bearer_token_env_var`,
|
|
384
|
+
`env_vars`, and `env_http_headers`.
|
|
385
|
+
|
|
386
|
+
`agentsmd list` prints the named templates available under
|
|
387
|
+
`$CODEXMGR_HOME/agentsmd` in sorted order.
|
|
388
|
+
|
|
389
|
+
`agentsmd show` renders one template as AGENTS.md markdown without changing the
|
|
390
|
+
project configuration. `agentsmd validate` loads and renders a template to catch
|
|
391
|
+
TOML or template-shape errors before adding it.
|
|
392
|
+
|
|
393
|
+
`agentsmd add` validates that the template exists before writing config.
|
|
394
|
+
Repeated adds keep one source entry.
|
|
395
|
+
|
|
396
|
+
`agentsmd remove` removes a configured template source and fails if the source
|
|
397
|
+
is not present.
|
|
398
|
+
|
|
399
|
+
`init-template agentsmd` creates a starter template under
|
|
400
|
+
`$CODEXMGR_HOME/agentsmd` and refuses to overwrite an existing template.
|
|
401
|
+
|
|
402
|
+
`skill list` prints available `$CODEXMGR_HOME/skills/*/SKILL.md`,
|
|
403
|
+
`$CODEX_HOME/skills/*/SKILL.md`, and local `.agents/skills/*/SKILL.md` entries
|
|
404
|
+
and marks configured skills as enabled, disabled, or missing.
|
|
405
|
+
|
|
406
|
+
`skill enable` and `skill disable` keep enabled and disabled lists mutually
|
|
407
|
+
exclusive. Repeated commands keep one entry.
|
|
408
|
+
|
|
409
|
+
`hooks list` prints available `$CODEXMGR_HOME/hooks/*/hooks.json` entries and
|
|
410
|
+
marks configured hook bundles as enabled, disabled, or missing.
|
|
411
|
+
|
|
412
|
+
`hooks enable` validates that the named hook bundle exists before writing
|
|
413
|
+
config. `hooks enable` and `hooks disable` keep enabled and disabled lists
|
|
414
|
+
mutually exclusive. Repeated commands keep one entry.
|
|
415
|
+
|
|
416
|
+
`package list` prints available `$CODEXMGR_HOME/packages/*/config.toml`
|
|
417
|
+
entries in sorted order.
|
|
418
|
+
|
|
419
|
+
`package enable` and `package disable` proxy to existing AGENTS.md, skill, and
|
|
420
|
+
hook project-config mutations. Package state is not tracked separately; the
|
|
421
|
+
resulting `[agents_md]`, `[skills]`, and `[hooks]` tables remain the source of
|
|
422
|
+
truth.
|
|
423
|
+
|
|
424
|
+
`codex` forwards arguments to the real `codex` command. Values from
|
|
425
|
+
`.codex/config.toml` are flattened into `-c key=value` overrides. User-provided
|
|
426
|
+
`-c` or `--config` overrides are merged after project config: scalar values
|
|
427
|
+
replace earlier values, while list values append.
|
|
428
|
+
|
|
429
|
+
## Development
|
|
430
|
+
|
|
431
|
+
Install dependencies:
|
|
432
|
+
|
|
433
|
+
```bash
|
|
434
|
+
uv sync --group dev
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
Run tests:
|
|
438
|
+
|
|
439
|
+
```bash
|
|
440
|
+
uv run pytest
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
Build distributions:
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
uv build
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
The package is typed (`py.typed`) and the test suite covers CLI behavior,
|
|
450
|
+
template rendering, TOML writing, skill resolution, generated-file sync checks,
|
|
451
|
+
Codex command generation, home-directory resolution, and package metadata.
|
|
452
|
+
|
|
453
|
+
## Release Notes
|
|
454
|
+
|
|
455
|
+
The GitHub workflow runs the test matrix on Python 3.11, 3.12, and 3.13 across
|
|
456
|
+
Linux, Windows, and macOS. The publish workflow builds and publishes to PyPI
|
|
457
|
+
when the version in `pyproject.toml` differs from the latest published version.
|