@vishal2612200/agentpack 0.2.2 → 0.3.1

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.
package/README.md CHANGED
@@ -1,33 +1,102 @@
1
- # AgentPack npm wrapper
1
+ # AgentPack
2
2
 
3
3
  Task-aware context packing for AI coding agents.
4
4
 
5
- This npm package is a thin wrapper around the Python package
6
- [`agentpack-cli`](https://pypi.org/project/agentpack-cli/). On first run it:
5
+ AgentPack scans a repository locally, ranks the files that matter for the current task, and writes a compact markdown context pack for tools such as Claude Code, Cursor, Windsurf, Codex, Antigravity, CI jobs, and generic LLM workflows.
6
+
7
+ Use it when the repo is too large to paste, but a blank agent session keeps wasting time rediscovering routes, services, tests, configs, and recent changes.
8
+
9
+ ## What this npm package is
10
+
11
+ `@vishal2612200/agentpack` is a Node launcher for the Python package [`agentpack-cli`](https://pypi.org/project/agentpack-cli/).
12
+
13
+ On first run it:
7
14
 
8
15
  1. Finds Python 3.10+.
9
- 2. Creates a per-version virtual environment under your user cache directory.
10
- 3. Installs the matching PyPI package version.
11
- 4. Proxies all arguments to the real `agentpack` CLI.
16
+ 2. Creates a per-version virtual environment in your user cache directory.
17
+ 3. Installs the matching `agentpack-cli` version from PyPI.
18
+ 4. Proxies every command to the real `agentpack` CLI.
19
+
20
+ The Python CLI remains the source of truth. The npm package exists so JavaScript-heavy teams can install AgentPack with the toolchain they already use. This wrapper installs the core CLI; optional Python extras such as `watch` and `mcp` are documented below.
21
+
22
+ ## Install
12
23
 
13
24
  ```bash
14
25
  npm install -g @vishal2612200/agentpack
15
- agentpack quickstart --task "fix auth token expiry"
26
+ agentpack --version
16
27
  ```
17
28
 
18
- ## Requirements
29
+ Requirements:
19
30
 
20
31
  - Node.js 18+
21
32
  - Python 3.10+
22
33
  - macOS or Linux
23
34
 
24
- Windows is not supported by AgentPack yet. Use WSL or install the Python package
25
- directly inside a Linux environment.
35
+ Windows is not supported directly yet. Use WSL, or install `agentpack-cli` inside a Linux environment.
36
+
37
+ ## First project
38
+
39
+ ```bash
40
+ cd your-project
41
+ agentpack init --agent codex
42
+ printf '%s\n' "fix auth token expiry" > .agentpack/task.md
43
+ agentpack pack
44
+ ```
45
+
46
+ Use the agent that matches your editor or CLI:
47
+
48
+ ```bash
49
+ agentpack init --agent claude
50
+ agentpack init --agent cursor
51
+ agentpack init --agent windsurf
52
+ agentpack init --agent codex
53
+ agentpack init --agent antigravity
54
+ ```
55
+
56
+ `agentpack init` creates local `.agentpack/` state and installs the selected integration when supported. `agentpack pack` reads `.agentpack/task.md`, ranks relevant files, and writes the adapter-specific context output.
57
+
58
+ For a guided setup:
59
+
60
+ ```bash
61
+ agentpack quickstart --task "fix auth token expiry"
62
+ ```
63
+
64
+ ## Daily workflow
65
+
66
+ ```bash
67
+ printf '%s\n' "describe the task you are about to work on" > .agentpack/task.md
68
+ agentpack pack
69
+ agentpack stats
70
+ ```
71
+
72
+ ## Useful commands
73
+
74
+ ```bash
75
+ agentpack status
76
+ agentpack doctor --agent all
77
+ agentpack explain --file path/to/file.py
78
+ agentpack benchmark --sample-fixtures --misses
79
+ agentpack repair --agent all
80
+ ```
81
+
82
+ ## Optional watch and MCP workflows
83
+
84
+ The `watch` and `mcp` commands use optional Python dependencies. If you need those workflows today, add the Python extras to a `pipx` install or use a virtual environment. Avoid global `pip3 install` on system-managed Python: many macOS/Linux distributions block it with PEP 668's `externally-managed-environment`.
85
+
86
+ ```bash
87
+ pipx install agentpack-cli
88
+ pipx inject agentpack-cli "agentpack-cli[all]"
89
+ agentpack watch
90
+ agentpack mcp
91
+ ```
92
+
93
+ Install `pipx` with your OS package manager first if needed: `brew install pipx`, `sudo apt install pipx`, `sudo dnf install pipx`, or `sudo pacman -S python-pipx`; then run `pipx ensurepath`.
94
+
95
+ The npm wrapper still works well for the core setup, pack, status, doctor, explain, repair, and benchmark commands.
26
96
 
27
97
  ## Python selection
28
98
 
29
- By default, the wrapper tries `python3` and then `python`. To force a specific
30
- interpreter:
99
+ By default, the wrapper tries `python3` and then `python`. To force a specific interpreter:
31
100
 
32
101
  ```bash
33
102
  AGENTPACK_PYTHON=/opt/homebrew/bin/python3 agentpack --version
@@ -47,12 +116,48 @@ or, if `XDG_CACHE_HOME` is unset:
47
116
  ~/.cache/agentpack-npm/<version>/
48
117
  ```
49
118
 
50
- Override with:
119
+ Override the cache path with:
51
120
 
52
121
  ```bash
53
122
  AGENTPACK_NPM_CACHE_DIR=/tmp/agentpack-cache agentpack --version
54
123
  ```
55
124
 
56
- ## Upstream
125
+ To force a clean reinstall of the Python CLI for this npm package version, remove the matching cache directory and run `agentpack --version` again.
126
+
127
+ ## Troubleshooting
128
+
129
+ `agentpack npm wrapper: Python >=3.10 is required.`
130
+
131
+ Install Python 3.10+ or set `AGENTPACK_PYTHON=/path/to/python3`.
132
+
133
+ `failed to install agentpack-cli==<version>`
134
+
135
+ Check that Python can reach PyPI. Corporate networks may need standard package index or proxy configuration. Avoid global `pip3 install` on system-managed Python; many macOS/Linux distributions block it with PEP 668's `externally-managed-environment`. Use `pipx` or a virtual environment for direct Python installs.
136
+
137
+ Optional Python `watch` and `mcp` extras can be added to a `pipx` install:
138
+
139
+ ```bash
140
+ pipx install agentpack-cli
141
+ pipx inject agentpack-cli "agentpack-cli[all]"
142
+ ```
143
+
144
+ Install `pipx` with your OS package manager first if needed: `brew install pipx`, `sudo apt install pipx`, `sudo dnf install pipx`, or `sudo pacman -S python-pipx`; then run `pipx ensurepath`.
145
+
146
+ `agentpack: command not found`
147
+
148
+ Make sure your global npm bin directory is on `PATH`:
149
+
150
+ ```bash
151
+ npm bin -g
152
+ ```
153
+
154
+ ## Security and privacy
155
+
156
+ AgentPack scans, summarizes, ranks, and packs locally. It does not call an LLM API for the core pack flow. Context files are written into your repository under `.agentpack/` and integration-specific local files.
157
+
158
+ ## Links
57
159
 
58
- Full docs: <https://github.com/vishal2612200/agentpack>
160
+ - Full docs: <https://github.com/vishal2612200/agentpack>
161
+ - PyPI package: <https://pypi.org/project/agentpack-cli/>
162
+ - npm package: <https://www.npmjs.com/package/@vishal2612200/agentpack>
163
+ - Issues: <https://github.com/vishal2612200/agentpack/issues>
package/bin/agentpack.js CHANGED
@@ -6,7 +6,7 @@ const fs = require("node:fs");
6
6
  const os = require("node:os");
7
7
  const path = require("node:path");
8
8
 
9
- const PACKAGE_VERSION = "0.2.2";
9
+ const PACKAGE_VERSION = "0.3.1";
10
10
  const PYPI_PACKAGE = `agentpack-cli==${PACKAGE_VERSION}`;
11
11
 
12
12
  function compareVersions(left, right) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vishal2612200/agentpack",
3
- "version": "0.2.2",
3
+ "version": "0.3.1",
4
4
  "description": "Task-aware context packing for AI coding agents. npm wrapper for the Python AgentPack CLI.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/vishal2612200/agentpack#readme",