agentpack-cli 0.3.0__tar.gz → 0.3.2__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.
Files changed (94) hide show
  1. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/.gitignore +5 -1
  2. agentpack_cli-0.3.0/README.md → agentpack_cli-0.3.2/PKG-INFO +141 -17
  3. agentpack_cli-0.3.0/PKG-INFO → agentpack_cli-0.3.2/README.md +102 -56
  4. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/pyproject.toml +3 -3
  5. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/__init__.py +1 -1
  6. agentpack_cli-0.3.2/src/agentpack/analysis/naming_signals.py +140 -0
  7. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/ranking.py +17 -0
  8. agentpack_cli-0.3.2/src/agentpack/commands/init.py +408 -0
  9. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/install.py +6 -11
  10. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/pack.py +1 -1
  11. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/models.py +2 -0
  12. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/data/agentpack.md +19 -10
  13. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/mcp_server.py +1 -1
  14. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/summaries/offline.py +11 -0
  15. agentpack_cli-0.3.0/src/agentpack/commands/init.py +0 -186
  16. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/LICENSE +0 -0
  17. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/adapters/__init__.py +0 -0
  18. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/adapters/antigravity.py +0 -0
  19. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/adapters/base.py +0 -0
  20. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/adapters/claude.py +0 -0
  21. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/adapters/codex.py +0 -0
  22. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/adapters/cursor.py +0 -0
  23. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/adapters/detect.py +0 -0
  24. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/adapters/generic.py +0 -0
  25. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/adapters/windsurf.py +0 -0
  26. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/__init__.py +0 -0
  27. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/dependency_graph.py +0 -0
  28. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/go_imports.py +0 -0
  29. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/java_imports.py +0 -0
  30. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/js_ts_imports.py +0 -0
  31. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/monorepo.py +0 -0
  32. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/python_imports.py +0 -0
  33. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/repo_map.py +0 -0
  34. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/role_inference.py +0 -0
  35. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/rust_imports.py +0 -0
  36. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/symbols.py +0 -0
  37. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/task_classifier.py +0 -0
  38. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/analysis/tests.py +0 -0
  39. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/application/__init__.py +0 -0
  40. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/application/pack_service.py +0 -0
  41. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/cli.py +0 -0
  42. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/__init__.py +0 -0
  43. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/_shared.py +0 -0
  44. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/benchmark.py +0 -0
  45. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/claude_cmd.py +0 -0
  46. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/diff.py +0 -0
  47. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/doctor.py +0 -0
  48. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/explain.py +0 -0
  49. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/hook_cmd.py +0 -0
  50. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/mcp_cmd.py +0 -0
  51. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/monitor.py +0 -0
  52. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/quickstart.py +0 -0
  53. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/repair.py +0 -0
  54. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/scan.py +0 -0
  55. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/stats.py +0 -0
  56. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/status.py +0 -0
  57. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/summarize.py +0 -0
  58. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/tune.py +0 -0
  59. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/commands/watch.py +0 -0
  60. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/__init__.py +0 -0
  61. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/bootstrap.py +0 -0
  62. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/cache.py +0 -0
  63. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/config.py +0 -0
  64. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/context_pack.py +0 -0
  65. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/diff.py +0 -0
  66. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/git.py +0 -0
  67. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/git_hooks.py +0 -0
  68. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/global_install.py +0 -0
  69. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/ignore.py +0 -0
  70. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/merkle.py +0 -0
  71. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/redactor.py +0 -0
  72. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/scanner.py +0 -0
  73. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/snapshot.py +0 -0
  74. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/token_estimator.py +0 -0
  75. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/core/vscode_tasks.py +0 -0
  76. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/installers/__init__.py +0 -0
  77. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/installers/antigravity.py +0 -0
  78. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/installers/claude.py +0 -0
  79. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/installers/codex.py +0 -0
  80. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/installers/cursor.py +0 -0
  81. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/installers/windsurf.py +0 -0
  82. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/integrations/__init__.py +0 -0
  83. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/integrations/agents.py +0 -0
  84. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/integrations/git_hooks.py +0 -0
  85. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/integrations/global_install.py +0 -0
  86. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/integrations/vscode_tasks.py +0 -0
  87. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/renderers/__init__.py +0 -0
  88. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/renderers/compact.py +0 -0
  89. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/renderers/markdown.py +0 -0
  90. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/renderers/receipts.py +0 -0
  91. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/session/__init__.py +0 -0
  92. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/session/state.py +0 -0
  93. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/summaries/__init__.py +0 -0
  94. {agentpack_cli-0.3.0 → agentpack_cli-0.3.2}/src/agentpack/summaries/base.py +0 -0
@@ -12,6 +12,8 @@ env/
12
12
 
13
13
  # agentpack:start
14
14
  # AgentPack generated context/cache (safe to ignore)
15
+ .agentpack/*
16
+ !.agentpack/config.toml
15
17
  .agentpack/cache/
16
18
  .agentpack/snapshots/
17
19
  .agentpack/context*
@@ -23,9 +25,11 @@ env/
23
25
  .agentpack/session.json
24
26
  .agentpack/task.md
25
27
  .agentpack/benchmark_results.jsonl
28
+ .agentignore
26
29
  .agent/skills/agentpack/
30
+ .vscode/tasks.json
31
+ GEMINI.md
27
32
  # agentpack:end
28
-
29
33
  .pytest_cache/
30
34
  .mypy_cache/
31
35
  .ruff_cache/
@@ -1,19 +1,60 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentpack-cli
3
+ Version: 0.3.2
4
+ Summary: Local context engine for AI coding agents that ranks relevant files and builds task-focused context packs.
5
+ License: MIT
6
+ License-File: LICENSE
7
+ Keywords: ai,ai-coding-agents,antigravity,ci,claude,claude-code,codex,context,context-engine,context-packing,cursor,developer-tools,llm,mcp,packing,prompt-context,repo-analysis,windsurf
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Topic :: Software Development :: Build Tools
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: pathspec>=0.12.1
19
+ Requires-Dist: pydantic>=2.0.0
20
+ Requires-Dist: rich>=13.0.0
21
+ Requires-Dist: tiktoken>=0.7.0
22
+ Requires-Dist: tomli-w>=1.0.0
23
+ Requires-Dist: tomli>=2.0.0; python_version < '3.11'
24
+ Requires-Dist: typer>=0.12.0
25
+ Provides-Extra: all
26
+ Requires-Dist: mcp>=1.0.0; extra == 'all'
27
+ Requires-Dist: watchdog>=4.0.0; extra == 'all'
28
+ Provides-Extra: dev
29
+ Requires-Dist: mypy; extra == 'dev'
30
+ Requires-Dist: pytest; extra == 'dev'
31
+ Requires-Dist: pytest-cov; extra == 'dev'
32
+ Requires-Dist: ruff; extra == 'dev'
33
+ Requires-Dist: tomli>=2.0.0; (python_version < '3.11') and extra == 'dev'
34
+ Provides-Extra: mcp
35
+ Requires-Dist: mcp>=1.0.0; extra == 'mcp'
36
+ Provides-Extra: watch
37
+ Requires-Dist: watchdog>=4.0.0; extra == 'watch'
38
+ Description-Content-Type: text/markdown
39
+
1
40
  # AgentPack
2
41
 
3
42
  [![PyPI version](https://img.shields.io/pypi/v/agentpack-cli.svg)](https://pypi.org/project/agentpack-cli/)
43
+ [![npm version](https://img.shields.io/npm/v/@vishal2612200/agentpack.svg)](https://www.npmjs.com/package/@vishal2612200/agentpack)
44
+ [![npm downloads](https://img.shields.io/npm/dm/@vishal2612200/agentpack.svg)](https://www.npmjs.com/package/@vishal2612200/agentpack)
4
45
  [![Python versions](https://img.shields.io/pypi/pyversions/agentpack-cli.svg)](https://pypi.org/project/agentpack-cli/)
5
46
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
47
  [![CI](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml/badge.svg)](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml)
7
48
 
8
- > **Status: alpha (v0.3.0).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Public benchmark proof exists for the current suite, but broader repo coverage is still growing. API may change before 1.0.
49
+ > **Status: alpha (v0.3.2).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Public benchmark proof exists for the current suite, but broader repo coverage is still growing. API may change before 1.0.
9
50
  >
10
51
  > **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
52
 
12
53
  **Local context engine for AI coding agents.**
13
54
 
14
- AgentPack builds task-focused context packs for Claude Code, Cursor, Windsurf, Codex, Antigravity, CI jobs, and any LLM workflow that can read markdown. It scans your repo locally, ranks files for the task, compresses the result into a token budget, and keeps the pack fresh through CLI commands, MCP tools, hooks, and agent integrations.
55
+ AgentPack gives Claude Code, Codex, Cursor, Windsurf, Antigravity, CI jobs, and other agent workflows a better starting point. It analyzes your repo locally, finds the relevant files for a task, and packages them into compact task-focused context packs for CLI and MCP tool workflows.
15
56
 
16
- AgentPack is useful when a repo is too large to paste, but a blank agent session wastes time rediscovering the same code structure. It is a context preparation tool, not a coding agent.
57
+ Use AgentPack when a repo is too large to paste and you want faster, more consistent context preparation before an agent starts working. It works offline, keeps the product boundary explicit, and is a context preparation tool, not a coding agent.
17
58
 
18
59
  ## Contents
19
60
 
@@ -21,6 +62,7 @@ AgentPack is useful when a repo is too large to paste, but a blank agent session
21
62
  - [Install](#install)
22
63
  - [Quickstart](#quickstart)
23
64
  - [Quality Bar](#quality-bar)
65
+ - [Download Stats](#download-stats)
24
66
  - [Debugging Selection](#debugging-selection)
25
67
  - [Supported Integrations](#supported-integrations)
26
68
  - [Commands](#commands)
@@ -31,8 +73,9 @@ AgentPack is useful when a repo is too large to paste, but a blank agent session
31
73
 
32
74
  ## Features
33
75
 
34
- - **Task-focused packing**: ranks files from git changes, task terms, symbols, imports, related tests, configs, churn, and repo history.
76
+ - **Task-focused packing**: ranks files from git changes, task terms, symbols, imports, related tests, configs, churn, repo history, and deterministic offline summaries.
35
77
  - **Budget-aware compression**: emits `full`, `diff`, `symbols`, `skeleton`, or `summary` views instead of all-or-nothing file dumps.
78
+ - **Local code intelligence**: extracts roles, domains, entrypoints, definitions, dependencies, env reads, side effects, and external systems using static analysis.
36
79
  - **Semantic repo map**: adds a compact module-level map before file context so agents orient faster.
37
80
  - **Freshness and deltas**: records task source, git state, snapshot hashes, selected-file deltas, and stale-context warnings.
38
81
  - **Agent integrations**: installs Claude Code, Cursor, Windsurf, Codex, Antigravity, VS Code tasks, git hooks, and MCP configuration.
@@ -41,11 +84,51 @@ AgentPack is useful when a repo is too large to paste, but a blank agent session
41
84
  ## Install
42
85
 
43
86
  ```bash
44
- pip install agentpack-cli
87
+ pipx install agentpack-cli
45
88
  agentpack --version
46
89
  ```
47
90
 
48
- Requires Python 3.10+. The PyPI package is `agentpack-cli`; the command is `agentpack`.
91
+ Requires Python 3.10+. The PyPI package is `agentpack-cli`; the command is `agentpack`. Use `pipx` for normal installs because many macOS/Linux Python distributions block global `pip install` with PEP 668's `externally-managed-environment` error. If you prefer `pip`, install inside a virtual environment.
92
+
93
+ Install `pipx` with your OS package manager first if needed:
94
+
95
+ ```bash
96
+ # macOS
97
+ brew install pipx
98
+
99
+ # Ubuntu/Debian
100
+ sudo apt install pipx
101
+
102
+ # Fedora
103
+ sudo dnf install pipx
104
+
105
+ # Arch
106
+ sudo pacman -S python-pipx
107
+
108
+ # Then ensure pipx apps are on PATH
109
+ pipx ensurepath
110
+ ```
111
+
112
+ If `pipx` is not installed yet:
113
+
114
+ ```bash
115
+ # macOS
116
+ brew install pipx
117
+
118
+ # Ubuntu/Debian
119
+ sudo apt install pipx
120
+
121
+ # Fedora
122
+ sudo dnf install pipx
123
+
124
+ # Arch
125
+ sudo pacman -S python-pipx
126
+
127
+ # Then ensure pipx apps are on PATH
128
+ pipx ensurepath
129
+ ```
130
+
131
+ `pipx` is the recommended default because it keeps the CLI isolated and avoids many macOS/Linux global `pip install` issues, including PEP 668 `externally-managed-environment` errors. If you prefer `pip`, install inside a virtual environment.
49
132
 
50
133
  JavaScript-heavy teams can install the npm wrapper:
51
134
 
@@ -54,7 +137,7 @@ npm install -g @vishal2612200/agentpack
54
137
  agentpack --version
55
138
  ```
56
139
 
57
- The npm package is a Node launcher around the Python implementation. It requires Node.js 18+ and Python 3.10+, then installs the matching core `agentpack-cli` package into a per-version virtual environment on first run. The Python package remains the source of truth; npm is the convenience install path for JavaScript-heavy teams. Use the PyPI extras below when you need optional `watch` or `mcp` dependencies.
140
+ The npm package is a Node launcher around the Python implementation. It requires Node.js 18+ and Python 3.10+, then installs the matching core `agentpack-cli` package into a per-version virtual environment on first run. The Python package remains the source of truth; npm is the convenience install path for JavaScript-heavy teams. See the [npm README](https://github.com/vishal2612200/agentpack/blob/main/npm/README.md) for wrapper cache controls and troubleshooting. Use the PyPI extras below when you need optional `watch` or `mcp` dependencies.
58
141
 
59
142
  ## Quickstart
60
143
 
@@ -125,6 +208,24 @@ ItsDangerous, and MarkupSafe by checking out each commit's parent and scoring
125
208
  against files actually changed by the commit. Synthetic fixtures are useful
126
209
  regression tests, but should not be presented as market proof.
127
210
 
211
+ ## Download Stats
212
+
213
+ npm exposes official package download counts through its public registry API and the npm downloads badge above:
214
+
215
+ ```bash
216
+ curl https://api.npmjs.org/downloads/point/last-month/%40vishal2612200%2Fagentpack
217
+ curl https://api.npmjs.org/downloads/point/last-week/%40vishal2612200%2Fagentpack
218
+ ```
219
+
220
+ PyPI does not show official project download counts on package pages. For rough trend data on the Python core package, use third-party mirrors:
221
+
222
+ ```bash
223
+ curl https://pypistats.org/api/packages/agentpack-cli/recent
224
+ ```
225
+
226
+ - PyPI Stats: <https://pypistats.org/packages/agentpack-cli>
227
+ - pepy.tech: <https://pepy.tech/project/agentpack-cli>
228
+
128
229
  ## Debugging Selection
129
230
 
130
231
  When AgentPack misses a file, the next command should explain the miss:
@@ -415,7 +516,7 @@ jobs:
415
516
  with:
416
517
  python-version: "3.12"
417
518
 
418
- - run: pip install agentpack-cli
519
+ - run: python -m pip install agentpack-cli
419
520
 
420
521
  - name: Generate context pack
421
522
  run: |
@@ -728,9 +829,13 @@ Uses `watchdog` if installed, falls back to polling. Context is refreshed whenev
728
829
 
729
830
  Install watchdog for better performance:
730
831
  ```bash
731
- pip install "agentpack-cli[watch]"
832
+ pipx inject agentpack-cli watchdog
833
+ PIPX_AGENTPACK="$(pipx environment --value PIPX_BIN_DIR)/agentpack"
834
+ "$PIPX_AGENTPACK" watch
732
835
  ```
733
836
 
837
+ Use the explicit `pipx` binary path above if you also have the npm wrapper on `PATH`; otherwise `agentpack watch` may still resolve to the Node launcher.
838
+
734
839
  ---
735
840
 
736
841
  ### `agentpack claude`
@@ -750,10 +855,13 @@ Requires an initialized project (`agentpack init`). Refreshes context, prints th
750
855
  Run AgentPack as an MCP server — exposes context packing as tools that Claude Code (and any MCP-compatible agent) can call directly.
751
856
 
752
857
  ```bash
753
- pip install "agentpack-cli[mcp]"
754
- agentpack mcp
858
+ pipx inject agentpack-cli "agentpack-cli[mcp]"
859
+ PIPX_AGENTPACK="$(pipx environment --value PIPX_BIN_DIR)/agentpack"
860
+ "$PIPX_AGENTPACK" mcp
755
861
  ```
756
862
 
863
+ Use the explicit `pipx` binary path above if you also have the npm wrapper on `PATH`; otherwise `agentpack mcp` may still resolve to the Node launcher instead of the extras-enabled Python CLI.
864
+
757
865
  Register in Claude Code settings (`~/.claude/settings.json`):
758
866
 
759
867
  ```json
@@ -1172,7 +1280,8 @@ Works like `.gitignore`. Default rules exclude:
1172
1280
  │ │
1173
1281
  │ Summary cache ── role, imports, │
1174
1282
  │ (offline) symbols, side effects, │
1175
- │ public API, errors
1283
+ │ public API, naming
1284
+ │ signals, errors │
1176
1285
  │ │
1177
1286
  │ Import graph ── Python AST │
1178
1287
  │ (6 languages) ─ JS/TS regex │
@@ -1185,6 +1294,9 @@ Works like `.gitignore`. Default rules exclude:
1185
1294
  │ ast.get_source_segment) classes, │
1186
1295
  │ ── arrow fns w/ =>) │
1187
1296
  │ │
1297
+ │ Naming signals ── public files/symbols │
1298
+ │ ── env/config/test ids │
1299
+ │ ── generic-name hints │
1188
1300
  │ Test detection ── name heuristics │
1189
1301
  │ Task keywords ── stopwords + variants│
1190
1302
  │ ── concept synonyms │
@@ -1210,6 +1322,7 @@ Works like `.gitignore`. Default rules exclude:
1210
1322
  │ +70 symbol +60 content match │
1211
1323
  │ +50 dep +40 rev-dep │
1212
1324
  │ +35 test +25 config +20 recent │
1325
+ │ +20 naming -6 generic public API │
1213
1326
  │ -50 large unrelated │
1214
1327
  │ History noise penalty from metrics │
1215
1328
  └────────────────────┬────────────────────┘
@@ -1297,14 +1410,15 @@ src/agentpack/
1297
1410
  rust_imports.py # use, mod, extern crate
1298
1411
  java_imports.py # Java import + Kotlin import
1299
1412
  symbols.py # AST symbols + body via ast.get_source_segment
1413
+ naming_signals.py # public-name classification for summaries + ranking boosts
1300
1414
  tests.py # source → test file mapping heuristics
1301
- ranking.py # keyword extraction, concept synonyms, scoring
1415
+ ranking.py # keyword extraction, concept synonyms, scoring, naming receipts
1302
1416
  monorepo.py # workspace detection + workspace ownership helpers
1303
1417
  repo_map.py # compact semantic repo map reserved inside token budget
1304
1418
  task_classifier.py # coarse task class for freshness/rendering/scoring context
1305
1419
 
1306
1420
  summaries/
1307
- offline.py # zero-API: AST/regex → imports, symbols, role, side effects, API, errors
1421
+ offline.py # zero-API: AST/regex → imports, symbols, role, side effects, API, naming signals, errors
1308
1422
  base.py # cache-or-build orchestration (parallel, ThreadPool+ProcessPool)
1309
1423
 
1310
1424
  adapters/ # context rendering only — no installation logic
@@ -1425,15 +1539,25 @@ Post-0.3 release focus: broader real-repo proof, npm publish reliability, and co
1425
1539
  ## Optional dependencies
1426
1540
 
1427
1541
  ```bash
1428
- pip install "agentpack-cli[watch]" # watchdog faster file watching for agentpack watch
1429
- pip install "agentpack-cli[mcp]" # mcp — expose agentpack as MCP server tools
1430
- pip install "agentpack-cli[all]" # watch + mcp
1542
+ pipx inject agentpack-cli watchdog # faster file watching for agentpack watch
1543
+ pipx inject agentpack-cli "agentpack-cli[mcp]" # expose agentpack as MCP server tools
1544
+ pipx inject agentpack-cli "agentpack-cli[all]" # watch + mcp
1431
1545
  ```
1432
1546
 
1433
1547
  ---
1434
1548
 
1435
1549
  ## Development
1436
1550
 
1551
+ ## Public Naming And Ranking
1552
+
1553
+ AgentPack works better when public surfaces carry domain context. Prefer domain-revealing names for files, exported functions/classes, CLI commands, tests, and config/env identifiers.
1554
+
1555
+ - `verify_otp` is better than `handle`
1556
+ - `StripeWebhookHandler` is better than `Processor`
1557
+ - `session_token_expiry_test` is better than `test_flow`
1558
+
1559
+ This is guidance, not a lint rule. Local variable names are out of scope for AgentPack ranking.
1560
+
1437
1561
  Clone and run locally:
1438
1562
 
1439
1563
  ```bash
@@ -1,58 +1,21 @@
1
- Metadata-Version: 2.4
2
- Name: agentpack-cli
3
- Version: 0.3.0
4
- Summary: Task-aware context packing for AI coding agents — Claude, Cursor, Windsurf, Codex, and Antigravity
5
- License: MIT
6
- License-File: LICENSE
7
- Keywords: ai,claude,codex,coding-agent,context,cursor,llm,packing,windsurf
8
- Classifier: Development Status :: 3 - Alpha
9
- Classifier: Intended Audience :: Developers
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Programming Language :: Python :: 3.13
15
- Classifier: Topic :: Software Development :: Build Tools
16
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
- Requires-Python: >=3.10
18
- Requires-Dist: pathspec>=0.12.1
19
- Requires-Dist: pydantic>=2.0.0
20
- Requires-Dist: rich>=13.0.0
21
- Requires-Dist: tiktoken>=0.7.0
22
- Requires-Dist: tomli-w>=1.0.0
23
- Requires-Dist: tomli>=2.0.0; python_version < '3.11'
24
- Requires-Dist: typer>=0.12.0
25
- Provides-Extra: all
26
- Requires-Dist: mcp>=1.0.0; extra == 'all'
27
- Requires-Dist: watchdog>=4.0.0; extra == 'all'
28
- Provides-Extra: dev
29
- Requires-Dist: mypy; extra == 'dev'
30
- Requires-Dist: pytest; extra == 'dev'
31
- Requires-Dist: pytest-cov; extra == 'dev'
32
- Requires-Dist: ruff; extra == 'dev'
33
- Requires-Dist: tomli>=2.0.0; (python_version < '3.11') and extra == 'dev'
34
- Provides-Extra: mcp
35
- Requires-Dist: mcp>=1.0.0; extra == 'mcp'
36
- Provides-Extra: watch
37
- Requires-Dist: watchdog>=4.0.0; extra == 'watch'
38
- Description-Content-Type: text/markdown
39
-
40
1
  # AgentPack
41
2
 
42
3
  [![PyPI version](https://img.shields.io/pypi/v/agentpack-cli.svg)](https://pypi.org/project/agentpack-cli/)
4
+ [![npm version](https://img.shields.io/npm/v/@vishal2612200/agentpack.svg)](https://www.npmjs.com/package/@vishal2612200/agentpack)
5
+ [![npm downloads](https://img.shields.io/npm/dm/@vishal2612200/agentpack.svg)](https://www.npmjs.com/package/@vishal2612200/agentpack)
43
6
  [![Python versions](https://img.shields.io/pypi/pyversions/agentpack-cli.svg)](https://pypi.org/project/agentpack-cli/)
44
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
45
8
  [![CI](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml/badge.svg)](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml)
46
9
 
47
- > **Status: alpha (v0.3.0).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Public benchmark proof exists for the current suite, but broader repo coverage is still growing. API may change before 1.0.
10
+ > **Status: alpha (v0.3.2).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Public benchmark proof exists for the current suite, but broader repo coverage is still growing. API may change before 1.0.
48
11
  >
49
12
  > **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
13
 
51
14
  **Local context engine for AI coding agents.**
52
15
 
53
- AgentPack builds task-focused context packs for Claude Code, Cursor, Windsurf, Codex, Antigravity, CI jobs, and any LLM workflow that can read markdown. It scans your repo locally, ranks files for the task, compresses the result into a token budget, and keeps the pack fresh through CLI commands, MCP tools, hooks, and agent integrations.
16
+ AgentPack gives Claude Code, Codex, Cursor, Windsurf, Antigravity, CI jobs, and other agent workflows a better starting point. It analyzes your repo locally, finds the relevant files for a task, and packages them into compact task-focused context packs for CLI and MCP tool workflows.
54
17
 
55
- AgentPack is useful when a repo is too large to paste, but a blank agent session wastes time rediscovering the same code structure. It is a context preparation tool, not a coding agent.
18
+ Use AgentPack when a repo is too large to paste and you want faster, more consistent context preparation before an agent starts working. It works offline, keeps the product boundary explicit, and is a context preparation tool, not a coding agent.
56
19
 
57
20
  ## Contents
58
21
 
@@ -60,6 +23,7 @@ AgentPack is useful when a repo is too large to paste, but a blank agent session
60
23
  - [Install](#install)
61
24
  - [Quickstart](#quickstart)
62
25
  - [Quality Bar](#quality-bar)
26
+ - [Download Stats](#download-stats)
63
27
  - [Debugging Selection](#debugging-selection)
64
28
  - [Supported Integrations](#supported-integrations)
65
29
  - [Commands](#commands)
@@ -70,8 +34,9 @@ AgentPack is useful when a repo is too large to paste, but a blank agent session
70
34
 
71
35
  ## Features
72
36
 
73
- - **Task-focused packing**: ranks files from git changes, task terms, symbols, imports, related tests, configs, churn, and repo history.
37
+ - **Task-focused packing**: ranks files from git changes, task terms, symbols, imports, related tests, configs, churn, repo history, and deterministic offline summaries.
74
38
  - **Budget-aware compression**: emits `full`, `diff`, `symbols`, `skeleton`, or `summary` views instead of all-or-nothing file dumps.
39
+ - **Local code intelligence**: extracts roles, domains, entrypoints, definitions, dependencies, env reads, side effects, and external systems using static analysis.
75
40
  - **Semantic repo map**: adds a compact module-level map before file context so agents orient faster.
76
41
  - **Freshness and deltas**: records task source, git state, snapshot hashes, selected-file deltas, and stale-context warnings.
77
42
  - **Agent integrations**: installs Claude Code, Cursor, Windsurf, Codex, Antigravity, VS Code tasks, git hooks, and MCP configuration.
@@ -80,11 +45,51 @@ AgentPack is useful when a repo is too large to paste, but a blank agent session
80
45
  ## Install
81
46
 
82
47
  ```bash
83
- pip install agentpack-cli
48
+ pipx install agentpack-cli
84
49
  agentpack --version
85
50
  ```
86
51
 
87
- Requires Python 3.10+. The PyPI package is `agentpack-cli`; the command is `agentpack`.
52
+ Requires Python 3.10+. The PyPI package is `agentpack-cli`; the command is `agentpack`. Use `pipx` for normal installs because many macOS/Linux Python distributions block global `pip install` with PEP 668's `externally-managed-environment` error. If you prefer `pip`, install inside a virtual environment.
53
+
54
+ Install `pipx` with your OS package manager first if needed:
55
+
56
+ ```bash
57
+ # macOS
58
+ brew install pipx
59
+
60
+ # Ubuntu/Debian
61
+ sudo apt install pipx
62
+
63
+ # Fedora
64
+ sudo dnf install pipx
65
+
66
+ # Arch
67
+ sudo pacman -S python-pipx
68
+
69
+ # Then ensure pipx apps are on PATH
70
+ pipx ensurepath
71
+ ```
72
+
73
+ If `pipx` is not installed yet:
74
+
75
+ ```bash
76
+ # macOS
77
+ brew install pipx
78
+
79
+ # Ubuntu/Debian
80
+ sudo apt install pipx
81
+
82
+ # Fedora
83
+ sudo dnf install pipx
84
+
85
+ # Arch
86
+ sudo pacman -S python-pipx
87
+
88
+ # Then ensure pipx apps are on PATH
89
+ pipx ensurepath
90
+ ```
91
+
92
+ `pipx` is the recommended default because it keeps the CLI isolated and avoids many macOS/Linux global `pip install` issues, including PEP 668 `externally-managed-environment` errors. If you prefer `pip`, install inside a virtual environment.
88
93
 
89
94
  JavaScript-heavy teams can install the npm wrapper:
90
95
 
@@ -93,7 +98,7 @@ npm install -g @vishal2612200/agentpack
93
98
  agentpack --version
94
99
  ```
95
100
 
96
- The npm package is a Node launcher around the Python implementation. It requires Node.js 18+ and Python 3.10+, then installs the matching core `agentpack-cli` package into a per-version virtual environment on first run. The Python package remains the source of truth; npm is the convenience install path for JavaScript-heavy teams. Use the PyPI extras below when you need optional `watch` or `mcp` dependencies.
101
+ The npm package is a Node launcher around the Python implementation. It requires Node.js 18+ and Python 3.10+, then installs the matching core `agentpack-cli` package into a per-version virtual environment on first run. The Python package remains the source of truth; npm is the convenience install path for JavaScript-heavy teams. See the [npm README](https://github.com/vishal2612200/agentpack/blob/main/npm/README.md) for wrapper cache controls and troubleshooting. Use the PyPI extras below when you need optional `watch` or `mcp` dependencies.
97
102
 
98
103
  ## Quickstart
99
104
 
@@ -164,6 +169,24 @@ ItsDangerous, and MarkupSafe by checking out each commit's parent and scoring
164
169
  against files actually changed by the commit. Synthetic fixtures are useful
165
170
  regression tests, but should not be presented as market proof.
166
171
 
172
+ ## Download Stats
173
+
174
+ npm exposes official package download counts through its public registry API and the npm downloads badge above:
175
+
176
+ ```bash
177
+ curl https://api.npmjs.org/downloads/point/last-month/%40vishal2612200%2Fagentpack
178
+ curl https://api.npmjs.org/downloads/point/last-week/%40vishal2612200%2Fagentpack
179
+ ```
180
+
181
+ PyPI does not show official project download counts on package pages. For rough trend data on the Python core package, use third-party mirrors:
182
+
183
+ ```bash
184
+ curl https://pypistats.org/api/packages/agentpack-cli/recent
185
+ ```
186
+
187
+ - PyPI Stats: <https://pypistats.org/packages/agentpack-cli>
188
+ - pepy.tech: <https://pepy.tech/project/agentpack-cli>
189
+
167
190
  ## Debugging Selection
168
191
 
169
192
  When AgentPack misses a file, the next command should explain the miss:
@@ -454,7 +477,7 @@ jobs:
454
477
  with:
455
478
  python-version: "3.12"
456
479
 
457
- - run: pip install agentpack-cli
480
+ - run: python -m pip install agentpack-cli
458
481
 
459
482
  - name: Generate context pack
460
483
  run: |
@@ -767,9 +790,13 @@ Uses `watchdog` if installed, falls back to polling. Context is refreshed whenev
767
790
 
768
791
  Install watchdog for better performance:
769
792
  ```bash
770
- pip install "agentpack-cli[watch]"
793
+ pipx inject agentpack-cli watchdog
794
+ PIPX_AGENTPACK="$(pipx environment --value PIPX_BIN_DIR)/agentpack"
795
+ "$PIPX_AGENTPACK" watch
771
796
  ```
772
797
 
798
+ Use the explicit `pipx` binary path above if you also have the npm wrapper on `PATH`; otherwise `agentpack watch` may still resolve to the Node launcher.
799
+
773
800
  ---
774
801
 
775
802
  ### `agentpack claude`
@@ -789,10 +816,13 @@ Requires an initialized project (`agentpack init`). Refreshes context, prints th
789
816
  Run AgentPack as an MCP server — exposes context packing as tools that Claude Code (and any MCP-compatible agent) can call directly.
790
817
 
791
818
  ```bash
792
- pip install "agentpack-cli[mcp]"
793
- agentpack mcp
819
+ pipx inject agentpack-cli "agentpack-cli[mcp]"
820
+ PIPX_AGENTPACK="$(pipx environment --value PIPX_BIN_DIR)/agentpack"
821
+ "$PIPX_AGENTPACK" mcp
794
822
  ```
795
823
 
824
+ Use the explicit `pipx` binary path above if you also have the npm wrapper on `PATH`; otherwise `agentpack mcp` may still resolve to the Node launcher instead of the extras-enabled Python CLI.
825
+
796
826
  Register in Claude Code settings (`~/.claude/settings.json`):
797
827
 
798
828
  ```json
@@ -1211,7 +1241,8 @@ Works like `.gitignore`. Default rules exclude:
1211
1241
  │ │
1212
1242
  │ Summary cache ── role, imports, │
1213
1243
  │ (offline) symbols, side effects, │
1214
- │ public API, errors
1244
+ │ public API, naming
1245
+ │ signals, errors │
1215
1246
  │ │
1216
1247
  │ Import graph ── Python AST │
1217
1248
  │ (6 languages) ─ JS/TS regex │
@@ -1224,6 +1255,9 @@ Works like `.gitignore`. Default rules exclude:
1224
1255
  │ ast.get_source_segment) classes, │
1225
1256
  │ ── arrow fns w/ =>) │
1226
1257
  │ │
1258
+ │ Naming signals ── public files/symbols │
1259
+ │ ── env/config/test ids │
1260
+ │ ── generic-name hints │
1227
1261
  │ Test detection ── name heuristics │
1228
1262
  │ Task keywords ── stopwords + variants│
1229
1263
  │ ── concept synonyms │
@@ -1249,6 +1283,7 @@ Works like `.gitignore`. Default rules exclude:
1249
1283
  │ +70 symbol +60 content match │
1250
1284
  │ +50 dep +40 rev-dep │
1251
1285
  │ +35 test +25 config +20 recent │
1286
+ │ +20 naming -6 generic public API │
1252
1287
  │ -50 large unrelated │
1253
1288
  │ History noise penalty from metrics │
1254
1289
  └────────────────────┬────────────────────┘
@@ -1336,14 +1371,15 @@ src/agentpack/
1336
1371
  rust_imports.py # use, mod, extern crate
1337
1372
  java_imports.py # Java import + Kotlin import
1338
1373
  symbols.py # AST symbols + body via ast.get_source_segment
1374
+ naming_signals.py # public-name classification for summaries + ranking boosts
1339
1375
  tests.py # source → test file mapping heuristics
1340
- ranking.py # keyword extraction, concept synonyms, scoring
1376
+ ranking.py # keyword extraction, concept synonyms, scoring, naming receipts
1341
1377
  monorepo.py # workspace detection + workspace ownership helpers
1342
1378
  repo_map.py # compact semantic repo map reserved inside token budget
1343
1379
  task_classifier.py # coarse task class for freshness/rendering/scoring context
1344
1380
 
1345
1381
  summaries/
1346
- offline.py # zero-API: AST/regex → imports, symbols, role, side effects, API, errors
1382
+ offline.py # zero-API: AST/regex → imports, symbols, role, side effects, API, naming signals, errors
1347
1383
  base.py # cache-or-build orchestration (parallel, ThreadPool+ProcessPool)
1348
1384
 
1349
1385
  adapters/ # context rendering only — no installation logic
@@ -1464,15 +1500,25 @@ Post-0.3 release focus: broader real-repo proof, npm publish reliability, and co
1464
1500
  ## Optional dependencies
1465
1501
 
1466
1502
  ```bash
1467
- pip install "agentpack-cli[watch]" # watchdog faster file watching for agentpack watch
1468
- pip install "agentpack-cli[mcp]" # mcp — expose agentpack as MCP server tools
1469
- pip install "agentpack-cli[all]" # watch + mcp
1503
+ pipx inject agentpack-cli watchdog # faster file watching for agentpack watch
1504
+ pipx inject agentpack-cli "agentpack-cli[mcp]" # expose agentpack as MCP server tools
1505
+ pipx inject agentpack-cli "agentpack-cli[all]" # watch + mcp
1470
1506
  ```
1471
1507
 
1472
1508
  ---
1473
1509
 
1474
1510
  ## Development
1475
1511
 
1512
+ ## Public Naming And Ranking
1513
+
1514
+ AgentPack works better when public surfaces carry domain context. Prefer domain-revealing names for files, exported functions/classes, CLI commands, tests, and config/env identifiers.
1515
+
1516
+ - `verify_otp` is better than `handle`
1517
+ - `StripeWebhookHandler` is better than `Processor`
1518
+ - `session_token_expiry_test` is better than `test_flow`
1519
+
1520
+ This is guidance, not a lint rule. Local variable names are out of scope for AgentPack ranking.
1521
+
1476
1522
  Clone and run locally:
1477
1523
 
1478
1524
  ```bash
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "agentpack-cli"
3
- version = "0.3.0"
4
- description = "Task-aware context packing for AI coding agents Claude, Cursor, Windsurf, Codex, and Antigravity"
3
+ version = "0.3.2"
4
+ description = "Local context engine for AI coding agents that ranks relevant files and builds task-focused context packs."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  license = {text = "MIT"}
8
- keywords = ["context", "llm", "packing", "claude", "cursor", "windsurf", "codex", "ai", "coding-agent"]
8
+ keywords = ["ai-coding-agents", "developer-tools", "repo-analysis", "context-engine", "context-packing", "prompt-context", "mcp", "ci", "claude-code", "codex", "cursor", "windsurf", "antigravity", "ai", "llm", "context", "packing", "claude"]
9
9
  classifiers = [
10
10
  "Development Status :: 3 - Alpha",
11
11
  "Intended Audience :: Developers",
@@ -1,3 +1,3 @@
1
1
  """AgentPack — task-aware context packing for AI coding agents."""
2
2
 
3
- __version__ = "0.3.0"
3
+ __version__ = "0.3.2"