agentinit 0.2.5__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.
- agentinit-0.2.5/LICENSE +21 -0
- agentinit-0.2.5/PKG-INFO +265 -0
- agentinit-0.2.5/README.md +255 -0
- agentinit-0.2.5/agentinit/__init__.py +1 -0
- agentinit-0.2.5/agentinit/__main__.py +6 -0
- agentinit-0.2.5/agentinit/cli.py +568 -0
- agentinit-0.2.5/agentinit/template/.cursor/rules/project.mdc +7 -0
- agentinit-0.2.5/agentinit/template/.github/copilot-instructions.md +13 -0
- agentinit-0.2.5/agentinit/template/.gitignore +6 -0
- agentinit-0.2.5/agentinit/template/AGENTS.md +27 -0
- agentinit-0.2.5/agentinit/template/CLAUDE.md +3 -0
- agentinit-0.2.5/agentinit/template/GEMINI.md +8 -0
- agentinit-0.2.5/agentinit/template/docs/CONVENTIONS.md +25 -0
- agentinit-0.2.5/agentinit/template/docs/DECISIONS.md +12 -0
- agentinit-0.2.5/agentinit/template/docs/PROJECT.md +33 -0
- agentinit-0.2.5/agentinit/template/docs/TODO.md +18 -0
- agentinit-0.2.5/agentinit.egg-info/PKG-INFO +265 -0
- agentinit-0.2.5/agentinit.egg-info/SOURCES.txt +22 -0
- agentinit-0.2.5/agentinit.egg-info/dependency_links.txt +1 -0
- agentinit-0.2.5/agentinit.egg-info/entry_points.txt +2 -0
- agentinit-0.2.5/agentinit.egg-info/top_level.txt +1 -0
- agentinit-0.2.5/pyproject.toml +32 -0
- agentinit-0.2.5/setup.cfg +4 -0
- agentinit-0.2.5/tests/test_cli.py +586 -0
agentinit-0.2.5/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 agentinit contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
agentinit-0.2.5/PKG-INFO
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentinit
|
|
3
|
+
Version: 0.2.5
|
|
4
|
+
Summary: Scaffold agent context files into a project.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Dynamic: license-file
|
|
10
|
+
|
|
11
|
+
# agentinit
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
Scaffold tiny context files so your AI coding agents stop guessing your setup.
|
|
16
|
+
Pure Python stdlib, no runtime dependencies, nothing touches your source code.
|
|
17
|
+
|
|
18
|
+
Works with Claude Code, Codex, Cursor, Copilot, and Gemini CLI.
|
|
19
|
+
|
|
20
|
+
If you've ever had an agent guess your test command, ignore your style rules,
|
|
21
|
+
or forget what the project does — `agentinit` creates a small set of Markdown
|
|
22
|
+
files that give every agent the same starting context, every session.
|
|
23
|
+
|
|
24
|
+
## Save tokens fast (Minimal mode, 2 minutes)
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
# Existing repo/folder:
|
|
28
|
+
agentinit init --minimal
|
|
29
|
+
|
|
30
|
+
# New project:
|
|
31
|
+
agentinit new myproject --yes --minimal
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Then fill only `docs/PROJECT.md` and `docs/CONVENTIONS.md`.
|
|
35
|
+
|
|
36
|
+
Next time, tell your agent: follow `CLAUDE.md` / `AGENTS.md`.
|
|
37
|
+
|
|
38
|
+
What you get:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
your-project/
|
|
42
|
+
├── AGENTS.md # entry point for all agents
|
|
43
|
+
├── CLAUDE.md # Claude Code router
|
|
44
|
+
└── docs/
|
|
45
|
+
├── PROJECT.md # what this project is (fill this)
|
|
46
|
+
└── CONVENTIONS.md # how to work in it (fill this)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- On a terminal, a short interactive wizard runs automatically — use `--yes` to skip it.
|
|
50
|
+
- Use `--purpose "..."` to prefill Purpose non-interactively (e.g. in CI).
|
|
51
|
+
- Keep reading only if you want full mode or advanced usage.
|
|
52
|
+
|
|
53
|
+
### Token savings (rough estimate)
|
|
54
|
+
|
|
55
|
+
- Tokens saved ≈ tokens you usually re-type per session × number of sessions.
|
|
56
|
+
- If you re-type ~200–400 tokens and do 10–20 sessions/month: ~2k–8k tokens/month.
|
|
57
|
+
- Actual savings depend on your workflow and which tool loads which files.
|
|
58
|
+
|
|
59
|
+
## Quickstart (60 seconds)
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
# 1. Install (stable)
|
|
63
|
+
pipx install agentinit
|
|
64
|
+
|
|
65
|
+
# Or bleeding edge:
|
|
66
|
+
# pipx install git+https://github.com/Lucenx9/agentinit.git@main
|
|
67
|
+
|
|
68
|
+
# 2. Scaffold a new project
|
|
69
|
+
agentinit new myproject --yes
|
|
70
|
+
cd myproject
|
|
71
|
+
|
|
72
|
+
# 3. Open these files in your code editor (VSCode, Cursor, etc.)
|
|
73
|
+
# and fill them in with your project's real info.
|
|
74
|
+
# (see "Fill the docs fast" below for an AI-assisted shortcut)
|
|
75
|
+
|
|
76
|
+
# 4. Commit and you're done
|
|
77
|
+
git init && git add -A && git commit -m "init: add agent context files"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
For an existing project, run `agentinit init` in the repo root instead of `agentinit new`.
|
|
81
|
+
|
|
82
|
+
### Fill the docs fast (AI prompt)
|
|
83
|
+
|
|
84
|
+
After scaffolding, paste this into your agent to auto-populate the docs:
|
|
85
|
+
|
|
86
|
+
> Read the entire repository. Then fill in `docs/PROJECT.md` and
|
|
87
|
+
> `docs/CONVENTIONS.md` using **only** information you find in the repo
|
|
88
|
+
> (package files, existing configs, source code, CI workflows, etc.).
|
|
89
|
+
> Do not invent commands or assumptions. Where information is missing
|
|
90
|
+
> or ambiguous, write `TODO: <what's needed>` so the developer can fill
|
|
91
|
+
> it in later. Do not modify any other files.
|
|
92
|
+
|
|
93
|
+
Review the result, fix any TODOs, and commit.
|
|
94
|
+
|
|
95
|
+
## Install
|
|
96
|
+
|
|
97
|
+
Requires Python 3.10+.
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
# With pipx (recommended, stable)
|
|
101
|
+
pipx install agentinit
|
|
102
|
+
|
|
103
|
+
# With pip
|
|
104
|
+
pip install agentinit
|
|
105
|
+
|
|
106
|
+
# Or run one-off without installing
|
|
107
|
+
pipx run agentinit --help
|
|
108
|
+
|
|
109
|
+
# Bleeding edge (latest on main)
|
|
110
|
+
# pipx install git+https://github.com/Lucenx9/agentinit.git@main
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Usage
|
|
114
|
+
|
|
115
|
+
### Create a new project
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
agentinit new myproject
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
On a terminal, a short interactive wizard asks for purpose, environment,
|
|
122
|
+
constraints, and commands. Use `--yes` to skip it, or `--purpose "..."` to
|
|
123
|
+
prefill non-interactively.
|
|
124
|
+
|
|
125
|
+
Flags:
|
|
126
|
+
|
|
127
|
+
- `--yes` / `-y` — skip the interactive wizard
|
|
128
|
+
- `--dir <path>` — create the project under a different parent directory
|
|
129
|
+
- `--force` — overwrite agentinit files (including TODO/DECISIONS) if the directory already exists
|
|
130
|
+
- `--minimal` — create only core files (AGENTS.md, CLAUDE.md, docs/PROJECT.md, docs/CONVENTIONS.md)
|
|
131
|
+
- `--purpose "<text>"` — prefill Purpose non-interactively
|
|
132
|
+
- `--prompt` — force the interactive wizard (even if stdin is not a TTY)
|
|
133
|
+
|
|
134
|
+
### Add to an existing project
|
|
135
|
+
|
|
136
|
+
```sh
|
|
137
|
+
cd your-project
|
|
138
|
+
agentinit init
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Copies only missing template files. Safe to run multiple times (idempotent).
|
|
142
|
+
The interactive wizard runs by default on a terminal; pass `--yes` to skip it.
|
|
143
|
+
|
|
144
|
+
Flags:
|
|
145
|
+
|
|
146
|
+
- `--yes` / `-y` — skip the interactive wizard
|
|
147
|
+
- `--force` — overwrite existing agentinit files (including TODO/DECISIONS)
|
|
148
|
+
- `--minimal` — create only core files (AGENTS.md, CLAUDE.md, docs/PROJECT.md, docs/CONVENTIONS.md)
|
|
149
|
+
- `--purpose "<text>"` — prefill Purpose non-interactively
|
|
150
|
+
- `--prompt` — force the interactive wizard (even if stdin is not a TTY)
|
|
151
|
+
|
|
152
|
+
### Quick minimal scaffold
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
agentinit minimal
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Shortcut for `agentinit init --minimal`. Accepts the same flags (`--yes`, `--force`, `--purpose`, `--prompt`).
|
|
159
|
+
|
|
160
|
+
### Remove agentinit files
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
agentinit remove --dry-run # preview what would be removed
|
|
164
|
+
agentinit remove # remove with confirmation prompt
|
|
165
|
+
agentinit remove --archive # move to .agentinit-archive/ instead of deleting
|
|
166
|
+
agentinit remove --force # skip confirmation prompt
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
<details>
|
|
170
|
+
<summary>Generated files and maintenance tips</summary>
|
|
171
|
+
|
|
172
|
+
### Source of truth
|
|
173
|
+
|
|
174
|
+
| File | Purpose |
|
|
175
|
+
| ---- | ------- |
|
|
176
|
+
| `AGENTS.md` | Primary router — all agents start here |
|
|
177
|
+
| `docs/PROJECT.md` | Project purpose, stack, commands, layout, constraints |
|
|
178
|
+
| `docs/CONVENTIONS.md` | Style, naming, testing, git workflow |
|
|
179
|
+
| `docs/TODO.md` | Active work (in progress / next / blocked / done) |
|
|
180
|
+
| `docs/DECISIONS.md` | ADR-lite decision log |
|
|
181
|
+
|
|
182
|
+
### Tool-specific routers
|
|
183
|
+
|
|
184
|
+
| File | Tool |
|
|
185
|
+
| ---- | ---- |
|
|
186
|
+
| `CLAUDE.md` | Claude Code |
|
|
187
|
+
| `GEMINI.md` | Gemini CLI |
|
|
188
|
+
| `.github/copilot-instructions.md` | GitHub Copilot |
|
|
189
|
+
| `.cursor/rules/project.mdc` | Cursor |
|
|
190
|
+
|
|
191
|
+
Each router points to `AGENTS.md` → `docs/*`. Keep them short.
|
|
192
|
+
|
|
193
|
+
### Keeping it healthy
|
|
194
|
+
|
|
195
|
+
- If guidance changes: update **docs/** first, not router files.
|
|
196
|
+
- Keep router files under ~20 lines.
|
|
197
|
+
- Log durable decisions in `docs/DECISIONS.md` (date · decision · rationale · alternatives).
|
|
198
|
+
- Use `docs/TODO.md` as the "current state" so new sessions start with the right focus.
|
|
199
|
+
|
|
200
|
+
### Manual setup (no CLI)
|
|
201
|
+
|
|
202
|
+
Copy into your repo root: `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `docs/`, `.github/`, `.cursor/` — then customize `docs/*` and commit.
|
|
203
|
+
|
|
204
|
+
</details>
|
|
205
|
+
|
|
206
|
+
## Updating (pipx)
|
|
207
|
+
|
|
208
|
+
```sh
|
|
209
|
+
# From PyPI / GitHub (installed with pipx)
|
|
210
|
+
pipx upgrade agentinit
|
|
211
|
+
|
|
212
|
+
# From a Git install pinned to main
|
|
213
|
+
pipx install --force git+https://github.com/Lucenx9/agentinit.git@main
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Color output
|
|
217
|
+
|
|
218
|
+
Output is colored by default on terminals. Color is automatically disabled when
|
|
219
|
+
piping, redirecting, or in CI. You can also disable it explicitly:
|
|
220
|
+
|
|
221
|
+
```sh
|
|
222
|
+
NO_COLOR=1 agentinit init
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Respects the [NO_COLOR](https://no-color.org/) standard and `TERM=dumb`.
|
|
226
|
+
|
|
227
|
+
## Development
|
|
228
|
+
|
|
229
|
+
```sh
|
|
230
|
+
pip install -e . --group dev
|
|
231
|
+
python3 -m pytest tests/ -v
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
<details>
|
|
235
|
+
<summary>Maintainers</summary>
|
|
236
|
+
|
|
237
|
+
### Release
|
|
238
|
+
|
|
239
|
+
- Tags follow `vX.Y.Z` (e.g. `v0.2.0`).
|
|
240
|
+
- Tag a commit on `main`, then publish a GitHub Release from the Releases UI.
|
|
241
|
+
|
|
242
|
+
### Safe testing
|
|
243
|
+
|
|
244
|
+
Use `git worktree` to test changes in isolation:
|
|
245
|
+
|
|
246
|
+
```sh
|
|
247
|
+
git worktree add ../agentinit-test -b agentinit-test
|
|
248
|
+
cd ../agentinit-test
|
|
249
|
+
# test template changes
|
|
250
|
+
cd -
|
|
251
|
+
git worktree remove ../agentinit-test
|
|
252
|
+
git branch -D agentinit-test
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
</details>
|
|
256
|
+
|
|
257
|
+
## Planned
|
|
258
|
+
|
|
259
|
+
- `agentinit status` — show which files are present, missing, or still TBD; `--check` for CI
|
|
260
|
+
- `--json` output mode for scripting and CI pipelines
|
|
261
|
+
- `agentinit build` — validate pointers, enforce line limits, and sanity-check structure
|
|
262
|
+
|
|
263
|
+
## License
|
|
264
|
+
|
|
265
|
+
MIT
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# agentinit
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Scaffold tiny context files so your AI coding agents stop guessing your setup.
|
|
6
|
+
Pure Python stdlib, no runtime dependencies, nothing touches your source code.
|
|
7
|
+
|
|
8
|
+
Works with Claude Code, Codex, Cursor, Copilot, and Gemini CLI.
|
|
9
|
+
|
|
10
|
+
If you've ever had an agent guess your test command, ignore your style rules,
|
|
11
|
+
or forget what the project does — `agentinit` creates a small set of Markdown
|
|
12
|
+
files that give every agent the same starting context, every session.
|
|
13
|
+
|
|
14
|
+
## Save tokens fast (Minimal mode, 2 minutes)
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
# Existing repo/folder:
|
|
18
|
+
agentinit init --minimal
|
|
19
|
+
|
|
20
|
+
# New project:
|
|
21
|
+
agentinit new myproject --yes --minimal
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then fill only `docs/PROJECT.md` and `docs/CONVENTIONS.md`.
|
|
25
|
+
|
|
26
|
+
Next time, tell your agent: follow `CLAUDE.md` / `AGENTS.md`.
|
|
27
|
+
|
|
28
|
+
What you get:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
your-project/
|
|
32
|
+
├── AGENTS.md # entry point for all agents
|
|
33
|
+
├── CLAUDE.md # Claude Code router
|
|
34
|
+
└── docs/
|
|
35
|
+
├── PROJECT.md # what this project is (fill this)
|
|
36
|
+
└── CONVENTIONS.md # how to work in it (fill this)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- On a terminal, a short interactive wizard runs automatically — use `--yes` to skip it.
|
|
40
|
+
- Use `--purpose "..."` to prefill Purpose non-interactively (e.g. in CI).
|
|
41
|
+
- Keep reading only if you want full mode or advanced usage.
|
|
42
|
+
|
|
43
|
+
### Token savings (rough estimate)
|
|
44
|
+
|
|
45
|
+
- Tokens saved ≈ tokens you usually re-type per session × number of sessions.
|
|
46
|
+
- If you re-type ~200–400 tokens and do 10–20 sessions/month: ~2k–8k tokens/month.
|
|
47
|
+
- Actual savings depend on your workflow and which tool loads which files.
|
|
48
|
+
|
|
49
|
+
## Quickstart (60 seconds)
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
# 1. Install (stable)
|
|
53
|
+
pipx install agentinit
|
|
54
|
+
|
|
55
|
+
# Or bleeding edge:
|
|
56
|
+
# pipx install git+https://github.com/Lucenx9/agentinit.git@main
|
|
57
|
+
|
|
58
|
+
# 2. Scaffold a new project
|
|
59
|
+
agentinit new myproject --yes
|
|
60
|
+
cd myproject
|
|
61
|
+
|
|
62
|
+
# 3. Open these files in your code editor (VSCode, Cursor, etc.)
|
|
63
|
+
# and fill them in with your project's real info.
|
|
64
|
+
# (see "Fill the docs fast" below for an AI-assisted shortcut)
|
|
65
|
+
|
|
66
|
+
# 4. Commit and you're done
|
|
67
|
+
git init && git add -A && git commit -m "init: add agent context files"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
For an existing project, run `agentinit init` in the repo root instead of `agentinit new`.
|
|
71
|
+
|
|
72
|
+
### Fill the docs fast (AI prompt)
|
|
73
|
+
|
|
74
|
+
After scaffolding, paste this into your agent to auto-populate the docs:
|
|
75
|
+
|
|
76
|
+
> Read the entire repository. Then fill in `docs/PROJECT.md` and
|
|
77
|
+
> `docs/CONVENTIONS.md` using **only** information you find in the repo
|
|
78
|
+
> (package files, existing configs, source code, CI workflows, etc.).
|
|
79
|
+
> Do not invent commands or assumptions. Where information is missing
|
|
80
|
+
> or ambiguous, write `TODO: <what's needed>` so the developer can fill
|
|
81
|
+
> it in later. Do not modify any other files.
|
|
82
|
+
|
|
83
|
+
Review the result, fix any TODOs, and commit.
|
|
84
|
+
|
|
85
|
+
## Install
|
|
86
|
+
|
|
87
|
+
Requires Python 3.10+.
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
# With pipx (recommended, stable)
|
|
91
|
+
pipx install agentinit
|
|
92
|
+
|
|
93
|
+
# With pip
|
|
94
|
+
pip install agentinit
|
|
95
|
+
|
|
96
|
+
# Or run one-off without installing
|
|
97
|
+
pipx run agentinit --help
|
|
98
|
+
|
|
99
|
+
# Bleeding edge (latest on main)
|
|
100
|
+
# pipx install git+https://github.com/Lucenx9/agentinit.git@main
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Usage
|
|
104
|
+
|
|
105
|
+
### Create a new project
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
agentinit new myproject
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
On a terminal, a short interactive wizard asks for purpose, environment,
|
|
112
|
+
constraints, and commands. Use `--yes` to skip it, or `--purpose "..."` to
|
|
113
|
+
prefill non-interactively.
|
|
114
|
+
|
|
115
|
+
Flags:
|
|
116
|
+
|
|
117
|
+
- `--yes` / `-y` — skip the interactive wizard
|
|
118
|
+
- `--dir <path>` — create the project under a different parent directory
|
|
119
|
+
- `--force` — overwrite agentinit files (including TODO/DECISIONS) if the directory already exists
|
|
120
|
+
- `--minimal` — create only core files (AGENTS.md, CLAUDE.md, docs/PROJECT.md, docs/CONVENTIONS.md)
|
|
121
|
+
- `--purpose "<text>"` — prefill Purpose non-interactively
|
|
122
|
+
- `--prompt` — force the interactive wizard (even if stdin is not a TTY)
|
|
123
|
+
|
|
124
|
+
### Add to an existing project
|
|
125
|
+
|
|
126
|
+
```sh
|
|
127
|
+
cd your-project
|
|
128
|
+
agentinit init
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Copies only missing template files. Safe to run multiple times (idempotent).
|
|
132
|
+
The interactive wizard runs by default on a terminal; pass `--yes` to skip it.
|
|
133
|
+
|
|
134
|
+
Flags:
|
|
135
|
+
|
|
136
|
+
- `--yes` / `-y` — skip the interactive wizard
|
|
137
|
+
- `--force` — overwrite existing agentinit files (including TODO/DECISIONS)
|
|
138
|
+
- `--minimal` — create only core files (AGENTS.md, CLAUDE.md, docs/PROJECT.md, docs/CONVENTIONS.md)
|
|
139
|
+
- `--purpose "<text>"` — prefill Purpose non-interactively
|
|
140
|
+
- `--prompt` — force the interactive wizard (even if stdin is not a TTY)
|
|
141
|
+
|
|
142
|
+
### Quick minimal scaffold
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
agentinit minimal
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Shortcut for `agentinit init --minimal`. Accepts the same flags (`--yes`, `--force`, `--purpose`, `--prompt`).
|
|
149
|
+
|
|
150
|
+
### Remove agentinit files
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
agentinit remove --dry-run # preview what would be removed
|
|
154
|
+
agentinit remove # remove with confirmation prompt
|
|
155
|
+
agentinit remove --archive # move to .agentinit-archive/ instead of deleting
|
|
156
|
+
agentinit remove --force # skip confirmation prompt
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
<details>
|
|
160
|
+
<summary>Generated files and maintenance tips</summary>
|
|
161
|
+
|
|
162
|
+
### Source of truth
|
|
163
|
+
|
|
164
|
+
| File | Purpose |
|
|
165
|
+
| ---- | ------- |
|
|
166
|
+
| `AGENTS.md` | Primary router — all agents start here |
|
|
167
|
+
| `docs/PROJECT.md` | Project purpose, stack, commands, layout, constraints |
|
|
168
|
+
| `docs/CONVENTIONS.md` | Style, naming, testing, git workflow |
|
|
169
|
+
| `docs/TODO.md` | Active work (in progress / next / blocked / done) |
|
|
170
|
+
| `docs/DECISIONS.md` | ADR-lite decision log |
|
|
171
|
+
|
|
172
|
+
### Tool-specific routers
|
|
173
|
+
|
|
174
|
+
| File | Tool |
|
|
175
|
+
| ---- | ---- |
|
|
176
|
+
| `CLAUDE.md` | Claude Code |
|
|
177
|
+
| `GEMINI.md` | Gemini CLI |
|
|
178
|
+
| `.github/copilot-instructions.md` | GitHub Copilot |
|
|
179
|
+
| `.cursor/rules/project.mdc` | Cursor |
|
|
180
|
+
|
|
181
|
+
Each router points to `AGENTS.md` → `docs/*`. Keep them short.
|
|
182
|
+
|
|
183
|
+
### Keeping it healthy
|
|
184
|
+
|
|
185
|
+
- If guidance changes: update **docs/** first, not router files.
|
|
186
|
+
- Keep router files under ~20 lines.
|
|
187
|
+
- Log durable decisions in `docs/DECISIONS.md` (date · decision · rationale · alternatives).
|
|
188
|
+
- Use `docs/TODO.md` as the "current state" so new sessions start with the right focus.
|
|
189
|
+
|
|
190
|
+
### Manual setup (no CLI)
|
|
191
|
+
|
|
192
|
+
Copy into your repo root: `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `docs/`, `.github/`, `.cursor/` — then customize `docs/*` and commit.
|
|
193
|
+
|
|
194
|
+
</details>
|
|
195
|
+
|
|
196
|
+
## Updating (pipx)
|
|
197
|
+
|
|
198
|
+
```sh
|
|
199
|
+
# From PyPI / GitHub (installed with pipx)
|
|
200
|
+
pipx upgrade agentinit
|
|
201
|
+
|
|
202
|
+
# From a Git install pinned to main
|
|
203
|
+
pipx install --force git+https://github.com/Lucenx9/agentinit.git@main
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Color output
|
|
207
|
+
|
|
208
|
+
Output is colored by default on terminals. Color is automatically disabled when
|
|
209
|
+
piping, redirecting, or in CI. You can also disable it explicitly:
|
|
210
|
+
|
|
211
|
+
```sh
|
|
212
|
+
NO_COLOR=1 agentinit init
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Respects the [NO_COLOR](https://no-color.org/) standard and `TERM=dumb`.
|
|
216
|
+
|
|
217
|
+
## Development
|
|
218
|
+
|
|
219
|
+
```sh
|
|
220
|
+
pip install -e . --group dev
|
|
221
|
+
python3 -m pytest tests/ -v
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
<details>
|
|
225
|
+
<summary>Maintainers</summary>
|
|
226
|
+
|
|
227
|
+
### Release
|
|
228
|
+
|
|
229
|
+
- Tags follow `vX.Y.Z` (e.g. `v0.2.0`).
|
|
230
|
+
- Tag a commit on `main`, then publish a GitHub Release from the Releases UI.
|
|
231
|
+
|
|
232
|
+
### Safe testing
|
|
233
|
+
|
|
234
|
+
Use `git worktree` to test changes in isolation:
|
|
235
|
+
|
|
236
|
+
```sh
|
|
237
|
+
git worktree add ../agentinit-test -b agentinit-test
|
|
238
|
+
cd ../agentinit-test
|
|
239
|
+
# test template changes
|
|
240
|
+
cd -
|
|
241
|
+
git worktree remove ../agentinit-test
|
|
242
|
+
git branch -D agentinit-test
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
</details>
|
|
246
|
+
|
|
247
|
+
## Planned
|
|
248
|
+
|
|
249
|
+
- `agentinit status` — show which files are present, missing, or still TBD; `--check` for CI
|
|
250
|
+
- `--json` output mode for scripting and CI pipelines
|
|
251
|
+
- `agentinit build` — validate pointers, enforce line limits, and sanity-check structure
|
|
252
|
+
|
|
253
|
+
## License
|
|
254
|
+
|
|
255
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""agentinit — scaffold agent context files into a project."""
|