agentpack-cli 0.1.26__tar.gz → 0.1.27__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.
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/PKG-INFO +36 -31
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/README.md +35 -30
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/pyproject.toml +1 -1
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/__init__.py +1 -1
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/init.py +57 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/.gitignore +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/LICENSE +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/adapters/__init__.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/adapters/antigravity.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/adapters/base.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/adapters/claude.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/adapters/codex.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/adapters/cursor.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/adapters/detect.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/adapters/generic.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/adapters/windsurf.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/analysis/__init__.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/analysis/dependency_graph.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/analysis/go_imports.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/analysis/java_imports.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/analysis/js_ts_imports.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/analysis/python_imports.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/analysis/ranking.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/analysis/rust_imports.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/analysis/symbols.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/analysis/tests.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/application/__init__.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/application/pack_service.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/cli.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/__init__.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/_shared.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/benchmark.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/claude_cmd.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/diff.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/doctor.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/explain.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/hook_cmd.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/install.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/mcp_cmd.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/monitor.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/pack.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/quickstart.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/scan.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/stats.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/status.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/summarize.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/commands/watch.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/__init__.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/bootstrap.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/cache.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/config.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/context_pack.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/diff.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/git.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/git_hooks.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/global_install.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/ignore.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/merkle.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/models.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/redactor.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/scanner.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/snapshot.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/token_estimator.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/core/vscode_tasks.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/data/agentpack.md +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/installers/__init__.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/installers/antigravity.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/installers/claude.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/installers/codex.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/installers/cursor.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/installers/windsurf.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/integrations/__init__.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/integrations/git_hooks.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/integrations/global_install.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/integrations/vscode_tasks.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/mcp_server.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/renderers/__init__.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/renderers/compact.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/renderers/markdown.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/renderers/receipts.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/session/__init__.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/session/state.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/summaries/__init__.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/summaries/base.py +0 -0
- {agentpack_cli-0.1.26 → agentpack_cli-0.1.27}/src/agentpack/summaries/offline.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentpack-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.27
|
|
4
4
|
Summary: Task-aware context packing for AI coding agents — Claude, Cursor, Windsurf, Codex, and Antigravity
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -44,7 +44,7 @@ Description-Content-Type: text/markdown
|
|
|
44
44
|
[](https://opensource.org/licenses/MIT)
|
|
45
45
|
[](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml)
|
|
46
46
|
|
|
47
|
-
> **Status: alpha (v0.1.
|
|
47
|
+
> **Status: alpha (v0.1.27).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Not yet validated across a wide range of repos. API may change before 1.0.
|
|
48
48
|
>
|
|
49
49
|
> **Platform note:** macOS and Linux are fully supported. Windows support is not yet implemented (git hooks use POSIX shell; the Claude Code session hooks use `python3`/`rm -f`). Contributions welcome.
|
|
50
50
|
|
|
@@ -102,8 +102,7 @@ agentpack quickstart --task "fix auth token expiry"
|
|
|
102
102
|
|
|
103
103
|
# One-time setup per project
|
|
104
104
|
cd your-project
|
|
105
|
-
agentpack init # creates config
|
|
106
|
-
agentpack install # auto-detects your IDE (optional but recommended)
|
|
105
|
+
agentpack init # creates config/session/task.md + detected agent integration
|
|
107
106
|
|
|
108
107
|
# Every terminal session
|
|
109
108
|
agentpack watch # keeps context fresh automatically — that's it
|
|
@@ -240,7 +239,7 @@ AgentPack is not a coding assistant. It's a context preparation tool. The output
|
|
|
240
239
|
|
|
241
240
|
These tools have native file access via tool calls. Claude reads exactly the files it needs, on demand, per turn. Pre-packing context adds overhead without much benefit on small-to-medium repos.
|
|
242
241
|
|
|
243
|
-
AgentPack's value here is different: `agentpack
|
|
242
|
+
AgentPack's value here is different: `agentpack init --agent <x>` configures your agent to read or inject a ranked context pack and auto-repack when the repo changes. On large repos where tool-call exploration piles up across turns, this front-loads the cost once instead of paying per-turn.
|
|
244
243
|
|
|
245
244
|
### Where agentpack genuinely wins
|
|
246
245
|
|
|
@@ -305,8 +304,7 @@ The full workflow:
|
|
|
305
304
|
|
|
306
305
|
```bash
|
|
307
306
|
# One-time project setup
|
|
308
|
-
agentpack init # creates config
|
|
309
|
-
agentpack install # configure your agent (optional but recommended)
|
|
307
|
+
agentpack init # creates config/session/task.md + detected agent integration
|
|
310
308
|
|
|
311
309
|
# Every terminal session — just one command
|
|
312
310
|
agentpack watch # auto-resumes session, refreshes context on file/task changes
|
|
@@ -321,11 +319,11 @@ Then open Claude Code / Cursor / Codex and write your coding task normally.
|
|
|
321
319
|
|
|
322
320
|
| Agent | Automation level | Method |
|
|
323
321
|
|---|---|---|
|
|
324
|
-
| Claude Code (hook) | Highest | `
|
|
325
|
-
| Codex | Medium | `AGENTS.md` +
|
|
326
|
-
| Cursor | Medium | `.cursor/rules/agentpack.mdc
|
|
327
|
-
| Windsurf | Medium | `.windsurfrules
|
|
328
|
-
| Antigravity | Medium |
|
|
322
|
+
| Claude Code (hook) | Highest | `init` writes `CLAUDE.md`, `.claude/settings.json` hooks, and `.mcp.json` |
|
|
323
|
+
| Codex | Medium | `init` writes `AGENTS.md` + git hooks |
|
|
324
|
+
| Cursor | Medium | `init` writes `.cursorrules`, `.cursor/rules/agentpack.mdc`, VS Code task + git hooks |
|
|
325
|
+
| Windsurf | Medium | `init` writes `.windsurfrules`, VS Code task + git hooks |
|
|
326
|
+
| Antigravity | Medium | `init` writes `GEMINI.md`, VS Code task + git hooks |
|
|
329
327
|
| Generic | Basic | `watch` mode + read `context.md` |
|
|
330
328
|
|
|
331
329
|
### Honest limitations
|
|
@@ -342,8 +340,7 @@ Then open Claude Code / Cursor / Codex and write your coding task normally.
|
|
|
342
340
|
```bash
|
|
343
341
|
pip install agentpack-cli
|
|
344
342
|
cd your-project
|
|
345
|
-
agentpack init # one-time setup: config +
|
|
346
|
-
agentpack install # auto-detects your IDE (Claude Code, Cursor, Windsurf, Codex, Antigravity)
|
|
343
|
+
agentpack init # one-time setup: config/session/task.md + detected agent integration
|
|
347
344
|
agentpack watch # in another terminal — keeps context fresh automatically
|
|
348
345
|
```
|
|
349
346
|
|
|
@@ -357,20 +354,20 @@ agentpack global-install # apply
|
|
|
357
354
|
source ~/.zshrc
|
|
358
355
|
```
|
|
359
356
|
|
|
360
|
-
Then opt each project in: `cd your-project && agentpack init`. After that
|
|
357
|
+
Then opt each project in: `cd your-project && agentpack init`. After that repo hooks or shell hooks keep context fresh, and Claude Code gets prompt-time context hints — no manual steps.
|
|
361
358
|
|
|
362
359
|
---
|
|
363
360
|
|
|
364
361
|
## Agent setup
|
|
365
362
|
|
|
366
|
-
|
|
363
|
+
`agentpack init` is the normal one-command project setup. It creates `.agentpack/` state and installs the detected agent integration. Re-run it any time; integration writes are idempotent and never clobber unrelated config.
|
|
367
364
|
|
|
368
|
-
`agentpack install`
|
|
365
|
+
Use `--agent` explicitly to override detection. `agentpack install` remains available when you only want to repair or reconfigure agent files without reinitializing project state.
|
|
369
366
|
|
|
370
367
|
### Claude Code
|
|
371
368
|
|
|
372
369
|
```bash
|
|
373
|
-
agentpack
|
|
370
|
+
agentpack init --agent claude
|
|
374
371
|
```
|
|
375
372
|
|
|
376
373
|
Configures:
|
|
@@ -384,7 +381,7 @@ After this, context is injected automatically into every Claude Code session. No
|
|
|
384
381
|
### Cursor
|
|
385
382
|
|
|
386
383
|
```bash
|
|
387
|
-
agentpack
|
|
384
|
+
agentpack init --agent cursor
|
|
388
385
|
```
|
|
389
386
|
|
|
390
387
|
Configures:
|
|
@@ -396,7 +393,7 @@ Configures:
|
|
|
396
393
|
### Windsurf
|
|
397
394
|
|
|
398
395
|
```bash
|
|
399
|
-
agentpack
|
|
396
|
+
agentpack init --agent windsurf
|
|
400
397
|
```
|
|
401
398
|
|
|
402
399
|
Configures:
|
|
@@ -407,7 +404,7 @@ Configures:
|
|
|
407
404
|
### Codex
|
|
408
405
|
|
|
409
406
|
```bash
|
|
410
|
-
agentpack
|
|
407
|
+
agentpack init --agent codex
|
|
411
408
|
```
|
|
412
409
|
|
|
413
410
|
Configures:
|
|
@@ -417,22 +414,21 @@ Configures:
|
|
|
417
414
|
### Antigravity
|
|
418
415
|
|
|
419
416
|
```bash
|
|
420
|
-
agentpack
|
|
417
|
+
agentpack init --agent antigravity
|
|
421
418
|
```
|
|
422
419
|
|
|
423
420
|
Configures:
|
|
424
|
-
- `.agent/skills/agentpack/SKILL.md` — AgentPack context as a Skill; Antigravity activates it automatically for coding tasks
|
|
425
421
|
- `GEMINI.md` — registers the agentpack skill reference and task-switch protocol
|
|
426
422
|
- `.git/hooks/post-commit`, `post-merge`, `post-checkout` — background repack on tree change
|
|
427
423
|
- `.vscode/tasks.json` — "AgentPack: Repack context" in Command Palette + `runOn: folderOpen`
|
|
428
424
|
|
|
429
|
-
|
|
425
|
+
`agentpack pack` writes `.agent/skills/agentpack/SKILL.md`, which Antigravity can activate automatically for coding tasks.
|
|
430
426
|
|
|
431
427
|
### Auto-repack comparison
|
|
432
428
|
|
|
433
429
|
| Mechanism | Claude Code | Cursor | Windsurf | Codex | Antigravity |
|
|
434
430
|
|---|---|---|---|---|---|
|
|
435
|
-
| Config file patched | `CLAUDE.md` + `.claude/settings.json` | `.cursorrules` + `.cursor/rules/*.mdc` | `.windsurfrules` | `AGENTS.md` | `.agent/skills/agentpack/SKILL.md`
|
|
431
|
+
| Config file patched | `CLAUDE.md` + `.claude/settings.json` | `.cursorrules` + `.cursor/rules/*.mdc` | `.windsurfrules` | `AGENTS.md` | `GEMINI.md` + generated `.agent/skills/agentpack/SKILL.md` after pack |
|
|
436
432
|
| Auto-inject on startup | ✅ `UserPromptSubmit` hook | ✅ `alwaysApply` | ✅ rules file | ✅ `AGENTS.md` | ✅ Skill auto-activation |
|
|
437
433
|
| Auto-repack when stale | ✅ hook (content hash via `root_hash`, ~1ms when fresh) | ✅ git hooks | ✅ git hooks | ✅ git hooks | ✅ git hooks |
|
|
438
434
|
| Manual repack shortcut | ✅ `/agentpack` slash cmd | ✅ VS Code task | ✅ VS Code task | `agentpack pack` | ✅ VS Code task |
|
|
@@ -546,7 +542,7 @@ agentpack global-install --agent antigravity # Antigravity
|
|
|
546
542
|
What it does:
|
|
547
543
|
- **Git template hooks** (`~/.git-templates/hooks/`) — git copies these into every repo on `git init` / `git clone`. On `post-commit`, `post-merge`, `post-checkout`: silently repacks **only if `.agentpack/config.toml` exists** — no-op in repos that haven't opted in.
|
|
548
544
|
- **Shell cd hook** (`~/.zshrc` or `~/.bashrc`) — on `cd`, repacks if stale **only in opted-in repos**. Never touches repos without `.agentpack/config.toml`. Never auto-inits.
|
|
549
|
-
- **Agent config** — same
|
|
545
|
+
- **Agent config** — same agent-specific files that `agentpack init --agent <x>` or `agentpack install --agent <x>` writes for the current project.
|
|
550
546
|
|
|
551
547
|
All changes are idempotent, reversible, and non-destructive. Existing hooks and rc files are appended to, never overwritten. Repos you haven't explicitly run `agentpack init` in are never touched.
|
|
552
548
|
|
|
@@ -637,6 +633,7 @@ Initialize AgentPack in the current directory.
|
|
|
637
633
|
```bash
|
|
638
634
|
agentpack init # interactive mode picker
|
|
639
635
|
agentpack init --yes # non-interactive, use defaults (good for CI)
|
|
636
|
+
agentpack init --agent codex # force an agent integration
|
|
640
637
|
agentpack init --share-cache # commit cache/ to git for team sharing
|
|
641
638
|
```
|
|
642
639
|
|
|
@@ -651,11 +648,19 @@ Creates:
|
|
|
651
648
|
snapshots/ # file hash snapshots
|
|
652
649
|
```
|
|
653
650
|
|
|
651
|
+
Also installs the detected agent integration:
|
|
652
|
+
- Claude: `CLAUDE.md`, `.claude/settings.json` hooks, `.mcp.json`
|
|
653
|
+
- Cursor: `.cursorrules`, `.cursor/rules/agentpack.mdc`, git hooks, VS Code task
|
|
654
|
+
- Windsurf: `.windsurfrules`, git hooks, VS Code task
|
|
655
|
+
- Codex: `AGENTS.md`, git hooks
|
|
656
|
+
- Antigravity: `GEMINI.md`, git hooks, VS Code task
|
|
657
|
+
- Generic: no agent-specific files
|
|
658
|
+
|
|
654
659
|
---
|
|
655
660
|
|
|
656
661
|
### `agentpack install`
|
|
657
662
|
|
|
658
|
-
|
|
663
|
+
Repair or reconfigure agent-specific files without reinitializing project state.
|
|
659
664
|
|
|
660
665
|
```bash
|
|
661
666
|
agentpack install # auto-detect IDE
|
|
@@ -663,7 +668,7 @@ agentpack install --agent claude # CLAUDE.md + .claude/settings.json hooks
|
|
|
663
668
|
agentpack install --agent cursor # .cursorrules + .mdc + git hooks + VS Code tasks
|
|
664
669
|
agentpack install --agent windsurf # .windsurfrules + git hooks + VS Code tasks
|
|
665
670
|
agentpack install --agent codex # AGENTS.md + git hooks
|
|
666
|
-
agentpack install --agent antigravity #
|
|
671
|
+
agentpack install --agent antigravity # GEMINI.md + git hooks + VS Code tasks
|
|
667
672
|
```
|
|
668
673
|
|
|
669
674
|
All installs are idempotent — safe to re-run, merge with existing config, never duplicate.
|
|
@@ -1291,7 +1296,7 @@ src/agentpack/
|
|
|
1291
1296
|
cursor.py # CursorInstaller: .cursorrules + .mdc + auto-repack
|
|
1292
1297
|
windsurf.py # WindsurfInstaller: .windsurfrules + auto-repack
|
|
1293
1298
|
codex.py # CodexInstaller: AGENTS.md + git hooks
|
|
1294
|
-
antigravity.py # AntigravityInstaller: GEMINI.md +
|
|
1299
|
+
antigravity.py # AntigravityInstaller: GEMINI.md + auto-repack
|
|
1295
1300
|
|
|
1296
1301
|
integrations/ # system/tool integration (not core domain)
|
|
1297
1302
|
git_hooks.py # install/remove .git/hooks post-commit/merge/checkout
|
|
@@ -1396,7 +1401,7 @@ Add to `.github/workflows/agentpack-context.yml` — see the full example in [CI
|
|
|
1396
1401
|
|
|
1397
1402
|
```bash
|
|
1398
1403
|
# One-time project setup
|
|
1399
|
-
agentpack init # creates config
|
|
1404
|
+
agentpack init # creates config/session/task.md + detected agent integration
|
|
1400
1405
|
# Edit .agentpack/task.md to set your task
|
|
1401
1406
|
|
|
1402
1407
|
# Every terminal session — just one command
|
|
@@ -1499,7 +1504,7 @@ agentpack pack --task "fix bug" --budget 40000 # explicit token cap
|
|
|
1499
1504
|
### Watch mode for active sessions
|
|
1500
1505
|
|
|
1501
1506
|
```bash
|
|
1502
|
-
agentpack init # one-time setup (creates session +
|
|
1507
|
+
agentpack init # one-time setup (creates session/task.md + detected agent integration)
|
|
1503
1508
|
agentpack watch # in another terminal — auto-resumes each time
|
|
1504
1509
|
```
|
|
1505
1510
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
[](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml)
|
|
7
7
|
|
|
8
|
-
> **Status: alpha (v0.1.
|
|
8
|
+
> **Status: alpha (v0.1.27).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Not yet validated across a wide range of repos. API may change before 1.0.
|
|
9
9
|
>
|
|
10
10
|
> **Platform note:** macOS and Linux are fully supported. Windows support is not yet implemented (git hooks use POSIX shell; the Claude Code session hooks use `python3`/`rm -f`). Contributions welcome.
|
|
11
11
|
|
|
@@ -63,8 +63,7 @@ agentpack quickstart --task "fix auth token expiry"
|
|
|
63
63
|
|
|
64
64
|
# One-time setup per project
|
|
65
65
|
cd your-project
|
|
66
|
-
agentpack init # creates config
|
|
67
|
-
agentpack install # auto-detects your IDE (optional but recommended)
|
|
66
|
+
agentpack init # creates config/session/task.md + detected agent integration
|
|
68
67
|
|
|
69
68
|
# Every terminal session
|
|
70
69
|
agentpack watch # keeps context fresh automatically — that's it
|
|
@@ -201,7 +200,7 @@ AgentPack is not a coding assistant. It's a context preparation tool. The output
|
|
|
201
200
|
|
|
202
201
|
These tools have native file access via tool calls. Claude reads exactly the files it needs, on demand, per turn. Pre-packing context adds overhead without much benefit on small-to-medium repos.
|
|
203
202
|
|
|
204
|
-
AgentPack's value here is different: `agentpack
|
|
203
|
+
AgentPack's value here is different: `agentpack init --agent <x>` configures your agent to read or inject a ranked context pack and auto-repack when the repo changes. On large repos where tool-call exploration piles up across turns, this front-loads the cost once instead of paying per-turn.
|
|
205
204
|
|
|
206
205
|
### Where agentpack genuinely wins
|
|
207
206
|
|
|
@@ -266,8 +265,7 @@ The full workflow:
|
|
|
266
265
|
|
|
267
266
|
```bash
|
|
268
267
|
# One-time project setup
|
|
269
|
-
agentpack init # creates config
|
|
270
|
-
agentpack install # configure your agent (optional but recommended)
|
|
268
|
+
agentpack init # creates config/session/task.md + detected agent integration
|
|
271
269
|
|
|
272
270
|
# Every terminal session — just one command
|
|
273
271
|
agentpack watch # auto-resumes session, refreshes context on file/task changes
|
|
@@ -282,11 +280,11 @@ Then open Claude Code / Cursor / Codex and write your coding task normally.
|
|
|
282
280
|
|
|
283
281
|
| Agent | Automation level | Method |
|
|
284
282
|
|---|---|---|
|
|
285
|
-
| Claude Code (hook) | Highest | `
|
|
286
|
-
| Codex | Medium | `AGENTS.md` +
|
|
287
|
-
| Cursor | Medium | `.cursor/rules/agentpack.mdc
|
|
288
|
-
| Windsurf | Medium | `.windsurfrules
|
|
289
|
-
| Antigravity | Medium |
|
|
283
|
+
| Claude Code (hook) | Highest | `init` writes `CLAUDE.md`, `.claude/settings.json` hooks, and `.mcp.json` |
|
|
284
|
+
| Codex | Medium | `init` writes `AGENTS.md` + git hooks |
|
|
285
|
+
| Cursor | Medium | `init` writes `.cursorrules`, `.cursor/rules/agentpack.mdc`, VS Code task + git hooks |
|
|
286
|
+
| Windsurf | Medium | `init` writes `.windsurfrules`, VS Code task + git hooks |
|
|
287
|
+
| Antigravity | Medium | `init` writes `GEMINI.md`, VS Code task + git hooks |
|
|
290
288
|
| Generic | Basic | `watch` mode + read `context.md` |
|
|
291
289
|
|
|
292
290
|
### Honest limitations
|
|
@@ -303,8 +301,7 @@ Then open Claude Code / Cursor / Codex and write your coding task normally.
|
|
|
303
301
|
```bash
|
|
304
302
|
pip install agentpack-cli
|
|
305
303
|
cd your-project
|
|
306
|
-
agentpack init # one-time setup: config +
|
|
307
|
-
agentpack install # auto-detects your IDE (Claude Code, Cursor, Windsurf, Codex, Antigravity)
|
|
304
|
+
agentpack init # one-time setup: config/session/task.md + detected agent integration
|
|
308
305
|
agentpack watch # in another terminal — keeps context fresh automatically
|
|
309
306
|
```
|
|
310
307
|
|
|
@@ -318,20 +315,20 @@ agentpack global-install # apply
|
|
|
318
315
|
source ~/.zshrc
|
|
319
316
|
```
|
|
320
317
|
|
|
321
|
-
Then opt each project in: `cd your-project && agentpack init`. After that
|
|
318
|
+
Then opt each project in: `cd your-project && agentpack init`. After that repo hooks or shell hooks keep context fresh, and Claude Code gets prompt-time context hints — no manual steps.
|
|
322
319
|
|
|
323
320
|
---
|
|
324
321
|
|
|
325
322
|
## Agent setup
|
|
326
323
|
|
|
327
|
-
|
|
324
|
+
`agentpack init` is the normal one-command project setup. It creates `.agentpack/` state and installs the detected agent integration. Re-run it any time; integration writes are idempotent and never clobber unrelated config.
|
|
328
325
|
|
|
329
|
-
`agentpack install`
|
|
326
|
+
Use `--agent` explicitly to override detection. `agentpack install` remains available when you only want to repair or reconfigure agent files without reinitializing project state.
|
|
330
327
|
|
|
331
328
|
### Claude Code
|
|
332
329
|
|
|
333
330
|
```bash
|
|
334
|
-
agentpack
|
|
331
|
+
agentpack init --agent claude
|
|
335
332
|
```
|
|
336
333
|
|
|
337
334
|
Configures:
|
|
@@ -345,7 +342,7 @@ After this, context is injected automatically into every Claude Code session. No
|
|
|
345
342
|
### Cursor
|
|
346
343
|
|
|
347
344
|
```bash
|
|
348
|
-
agentpack
|
|
345
|
+
agentpack init --agent cursor
|
|
349
346
|
```
|
|
350
347
|
|
|
351
348
|
Configures:
|
|
@@ -357,7 +354,7 @@ Configures:
|
|
|
357
354
|
### Windsurf
|
|
358
355
|
|
|
359
356
|
```bash
|
|
360
|
-
agentpack
|
|
357
|
+
agentpack init --agent windsurf
|
|
361
358
|
```
|
|
362
359
|
|
|
363
360
|
Configures:
|
|
@@ -368,7 +365,7 @@ Configures:
|
|
|
368
365
|
### Codex
|
|
369
366
|
|
|
370
367
|
```bash
|
|
371
|
-
agentpack
|
|
368
|
+
agentpack init --agent codex
|
|
372
369
|
```
|
|
373
370
|
|
|
374
371
|
Configures:
|
|
@@ -378,22 +375,21 @@ Configures:
|
|
|
378
375
|
### Antigravity
|
|
379
376
|
|
|
380
377
|
```bash
|
|
381
|
-
agentpack
|
|
378
|
+
agentpack init --agent antigravity
|
|
382
379
|
```
|
|
383
380
|
|
|
384
381
|
Configures:
|
|
385
|
-
- `.agent/skills/agentpack/SKILL.md` — AgentPack context as a Skill; Antigravity activates it automatically for coding tasks
|
|
386
382
|
- `GEMINI.md` — registers the agentpack skill reference and task-switch protocol
|
|
387
383
|
- `.git/hooks/post-commit`, `post-merge`, `post-checkout` — background repack on tree change
|
|
388
384
|
- `.vscode/tasks.json` — "AgentPack: Repack context" in Command Palette + `runOn: folderOpen`
|
|
389
385
|
|
|
390
|
-
|
|
386
|
+
`agentpack pack` writes `.agent/skills/agentpack/SKILL.md`, which Antigravity can activate automatically for coding tasks.
|
|
391
387
|
|
|
392
388
|
### Auto-repack comparison
|
|
393
389
|
|
|
394
390
|
| Mechanism | Claude Code | Cursor | Windsurf | Codex | Antigravity |
|
|
395
391
|
|---|---|---|---|---|---|
|
|
396
|
-
| Config file patched | `CLAUDE.md` + `.claude/settings.json` | `.cursorrules` + `.cursor/rules/*.mdc` | `.windsurfrules` | `AGENTS.md` | `.agent/skills/agentpack/SKILL.md`
|
|
392
|
+
| Config file patched | `CLAUDE.md` + `.claude/settings.json` | `.cursorrules` + `.cursor/rules/*.mdc` | `.windsurfrules` | `AGENTS.md` | `GEMINI.md` + generated `.agent/skills/agentpack/SKILL.md` after pack |
|
|
397
393
|
| Auto-inject on startup | ✅ `UserPromptSubmit` hook | ✅ `alwaysApply` | ✅ rules file | ✅ `AGENTS.md` | ✅ Skill auto-activation |
|
|
398
394
|
| Auto-repack when stale | ✅ hook (content hash via `root_hash`, ~1ms when fresh) | ✅ git hooks | ✅ git hooks | ✅ git hooks | ✅ git hooks |
|
|
399
395
|
| Manual repack shortcut | ✅ `/agentpack` slash cmd | ✅ VS Code task | ✅ VS Code task | `agentpack pack` | ✅ VS Code task |
|
|
@@ -507,7 +503,7 @@ agentpack global-install --agent antigravity # Antigravity
|
|
|
507
503
|
What it does:
|
|
508
504
|
- **Git template hooks** (`~/.git-templates/hooks/`) — git copies these into every repo on `git init` / `git clone`. On `post-commit`, `post-merge`, `post-checkout`: silently repacks **only if `.agentpack/config.toml` exists** — no-op in repos that haven't opted in.
|
|
509
505
|
- **Shell cd hook** (`~/.zshrc` or `~/.bashrc`) — on `cd`, repacks if stale **only in opted-in repos**. Never touches repos without `.agentpack/config.toml`. Never auto-inits.
|
|
510
|
-
- **Agent config** — same
|
|
506
|
+
- **Agent config** — same agent-specific files that `agentpack init --agent <x>` or `agentpack install --agent <x>` writes for the current project.
|
|
511
507
|
|
|
512
508
|
All changes are idempotent, reversible, and non-destructive. Existing hooks and rc files are appended to, never overwritten. Repos you haven't explicitly run `agentpack init` in are never touched.
|
|
513
509
|
|
|
@@ -598,6 +594,7 @@ Initialize AgentPack in the current directory.
|
|
|
598
594
|
```bash
|
|
599
595
|
agentpack init # interactive mode picker
|
|
600
596
|
agentpack init --yes # non-interactive, use defaults (good for CI)
|
|
597
|
+
agentpack init --agent codex # force an agent integration
|
|
601
598
|
agentpack init --share-cache # commit cache/ to git for team sharing
|
|
602
599
|
```
|
|
603
600
|
|
|
@@ -612,11 +609,19 @@ Creates:
|
|
|
612
609
|
snapshots/ # file hash snapshots
|
|
613
610
|
```
|
|
614
611
|
|
|
612
|
+
Also installs the detected agent integration:
|
|
613
|
+
- Claude: `CLAUDE.md`, `.claude/settings.json` hooks, `.mcp.json`
|
|
614
|
+
- Cursor: `.cursorrules`, `.cursor/rules/agentpack.mdc`, git hooks, VS Code task
|
|
615
|
+
- Windsurf: `.windsurfrules`, git hooks, VS Code task
|
|
616
|
+
- Codex: `AGENTS.md`, git hooks
|
|
617
|
+
- Antigravity: `GEMINI.md`, git hooks, VS Code task
|
|
618
|
+
- Generic: no agent-specific files
|
|
619
|
+
|
|
615
620
|
---
|
|
616
621
|
|
|
617
622
|
### `agentpack install`
|
|
618
623
|
|
|
619
|
-
|
|
624
|
+
Repair or reconfigure agent-specific files without reinitializing project state.
|
|
620
625
|
|
|
621
626
|
```bash
|
|
622
627
|
agentpack install # auto-detect IDE
|
|
@@ -624,7 +629,7 @@ agentpack install --agent claude # CLAUDE.md + .claude/settings.json hooks
|
|
|
624
629
|
agentpack install --agent cursor # .cursorrules + .mdc + git hooks + VS Code tasks
|
|
625
630
|
agentpack install --agent windsurf # .windsurfrules + git hooks + VS Code tasks
|
|
626
631
|
agentpack install --agent codex # AGENTS.md + git hooks
|
|
627
|
-
agentpack install --agent antigravity #
|
|
632
|
+
agentpack install --agent antigravity # GEMINI.md + git hooks + VS Code tasks
|
|
628
633
|
```
|
|
629
634
|
|
|
630
635
|
All installs are idempotent — safe to re-run, merge with existing config, never duplicate.
|
|
@@ -1252,7 +1257,7 @@ src/agentpack/
|
|
|
1252
1257
|
cursor.py # CursorInstaller: .cursorrules + .mdc + auto-repack
|
|
1253
1258
|
windsurf.py # WindsurfInstaller: .windsurfrules + auto-repack
|
|
1254
1259
|
codex.py # CodexInstaller: AGENTS.md + git hooks
|
|
1255
|
-
antigravity.py # AntigravityInstaller: GEMINI.md +
|
|
1260
|
+
antigravity.py # AntigravityInstaller: GEMINI.md + auto-repack
|
|
1256
1261
|
|
|
1257
1262
|
integrations/ # system/tool integration (not core domain)
|
|
1258
1263
|
git_hooks.py # install/remove .git/hooks post-commit/merge/checkout
|
|
@@ -1357,7 +1362,7 @@ Add to `.github/workflows/agentpack-context.yml` — see the full example in [CI
|
|
|
1357
1362
|
|
|
1358
1363
|
```bash
|
|
1359
1364
|
# One-time project setup
|
|
1360
|
-
agentpack init # creates config
|
|
1365
|
+
agentpack init # creates config/session/task.md + detected agent integration
|
|
1361
1366
|
# Edit .agentpack/task.md to set your task
|
|
1362
1367
|
|
|
1363
1368
|
# Every terminal session — just one command
|
|
@@ -1460,7 +1465,7 @@ agentpack pack --task "fix bug" --budget 40000 # explicit token cap
|
|
|
1460
1465
|
### Watch mode for active sessions
|
|
1461
1466
|
|
|
1462
1467
|
```bash
|
|
1463
|
-
agentpack init # one-time setup (creates session +
|
|
1468
|
+
agentpack init # one-time setup (creates session/task.md + detected agent integration)
|
|
1464
1469
|
agentpack watch # in another terminal — auto-resumes each time
|
|
1465
1470
|
```
|
|
1466
1471
|
|
|
@@ -59,6 +59,58 @@ def _patch_repo_gitignore(root, share_cache: bool = False) -> str:
|
|
|
59
59
|
return "updated"
|
|
60
60
|
|
|
61
61
|
|
|
62
|
+
def _install_agent_integration(root, agent: str) -> dict[str, str]:
|
|
63
|
+
"""Install repo-local agent integration files after `agentpack init`."""
|
|
64
|
+
results: dict[str, str] = {}
|
|
65
|
+
|
|
66
|
+
if agent == "claude":
|
|
67
|
+
from agentpack.installers.claude import ClaudeInstaller
|
|
68
|
+
|
|
69
|
+
installer = ClaudeInstaller()
|
|
70
|
+
results["CLAUDE.md"] = installer.patch_claude_md(root)
|
|
71
|
+
results[".claude/settings.json"] = installer.patch_claude_settings(root, global_install=False)
|
|
72
|
+
results[".mcp.json"] = installer.patch_mcp_server(root, global_install=False)
|
|
73
|
+
elif agent == "cursor":
|
|
74
|
+
from agentpack.installers.cursor import CursorInstaller
|
|
75
|
+
|
|
76
|
+
installer = CursorInstaller()
|
|
77
|
+
results[".cursorrules"] = installer.patch_cursor_rules(root)
|
|
78
|
+
results[".cursor/rules/agentpack.mdc"] = installer.patch_cursor_mdc(root)
|
|
79
|
+
results.update(installer.install_auto_repack(root))
|
|
80
|
+
elif agent == "windsurf":
|
|
81
|
+
from agentpack.installers.windsurf import WindsurfInstaller
|
|
82
|
+
|
|
83
|
+
installer = WindsurfInstaller()
|
|
84
|
+
results[".windsurfrules"] = installer.patch_windsurfrules(root)
|
|
85
|
+
results.update(installer.install_auto_repack(root))
|
|
86
|
+
elif agent == "codex":
|
|
87
|
+
from agentpack.installers.codex import CodexInstaller
|
|
88
|
+
|
|
89
|
+
installer = CodexInstaller()
|
|
90
|
+
results["AGENTS.md"] = installer.patch_agents_md(root)
|
|
91
|
+
results.update(installer.install_auto_repack(root))
|
|
92
|
+
elif agent == "antigravity":
|
|
93
|
+
from agentpack.installers.antigravity import AntigravityInstaller
|
|
94
|
+
|
|
95
|
+
installer = AntigravityInstaller()
|
|
96
|
+
results["GEMINI.md"] = installer.patch_gemini_md(root)
|
|
97
|
+
results.update(installer.install_auto_repack(root))
|
|
98
|
+
|
|
99
|
+
return results
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def _print_agent_integration_results(results: dict[str, str]) -> None:
|
|
103
|
+
for key, action in results.items():
|
|
104
|
+
if action == "unchanged":
|
|
105
|
+
continue
|
|
106
|
+
if key.startswith("git:"):
|
|
107
|
+
console.print(f"[green].git/hooks/{key[4:]} {action}[/]")
|
|
108
|
+
elif key == "vscode:tasks":
|
|
109
|
+
console.print(f"[green].vscode/tasks.json {action}[/]")
|
|
110
|
+
else:
|
|
111
|
+
console.print(f"[green]{key} {action}[/]")
|
|
112
|
+
|
|
113
|
+
|
|
62
114
|
def register(app: typer.Typer) -> None:
|
|
63
115
|
@app.command()
|
|
64
116
|
def init(
|
|
@@ -150,6 +202,7 @@ def register(app: typer.Typer) -> None:
|
|
|
150
202
|
from agentpack.core.config import load_config
|
|
151
203
|
resolved_mode = load_config(root).context.default_mode
|
|
152
204
|
existing_session = load_session(root)
|
|
205
|
+
resolved_agent = agent
|
|
153
206
|
if existing_session is None or force:
|
|
154
207
|
from agentpack.adapters.detect import detect_agent
|
|
155
208
|
resolved_agent = agent if agent != "auto" else detect_agent(root)
|
|
@@ -158,6 +211,10 @@ def register(app: typer.Typer) -> None:
|
|
|
158
211
|
console.print(f"[green]Created[/] {TASK_FILE} [dim]edit to set your task[/]")
|
|
159
212
|
else:
|
|
160
213
|
console.print(f"[dim]Skipped[/] {SESSION_FILE} (exists)")
|
|
214
|
+
if agent == "auto":
|
|
215
|
+
resolved_agent = existing_session.agent
|
|
216
|
+
|
|
217
|
+
_print_agent_integration_results(_install_agent_integration(root, resolved_agent))
|
|
161
218
|
|
|
162
219
|
console.print("\n[bold green]AgentPack initialized.[/]")
|
|
163
220
|
console.print("Run [bold]agentpack watch[/] to start auto-refreshing context.")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|