agentshq 0.1.0
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/LICENSE +21 -0
- package/README.md +301 -0
- package/bin/cli.mjs +14 -0
- package/dist/THIRD-PARTY-LICENSES.md +458 -0
- package/dist/_chunks/format-translator.mjs +5 -0
- package/dist/_chunks/libs/@clack/core.mjs +773 -0
- package/dist/_chunks/libs/@clack/prompts.mjs +336 -0
- package/dist/_chunks/libs/@kwsites/file-exists.mjs +799 -0
- package/dist/_chunks/libs/@kwsites/promise-deferred.mjs +54 -0
- package/dist/_chunks/libs/esprima.mjs +5340 -0
- package/dist/_chunks/libs/extend-shallow.mjs +38 -0
- package/dist/_chunks/libs/gray-matter.mjs +2801 -0
- package/dist/_chunks/libs/simple-git.mjs +3611 -0
- package/dist/_chunks/libs/xdg-basedir.mjs +16 -0
- package/dist/_chunks/rolldown-runtime.mjs +26 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +5321 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ulpi
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<pre align="center">
|
|
3
|
+
█████╗ ██████╗ ███████╗███╗ ██╗████████╗███████╗
|
|
4
|
+
██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝██╔════╝
|
|
5
|
+
███████║██║ ███╗█████╗ ██╔██╗ ██║ ██║ ███████╗
|
|
6
|
+
██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║ ╚════██║
|
|
7
|
+
██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║ ███████║
|
|
8
|
+
╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝</pre>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<strong>The package manager for AI coding agents.</strong><br>
|
|
13
|
+
Discover, install, and manage agent definitions across 43+ IDEs.
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://www.npmjs.com/package/agentshq"><img alt="npm version" src="https://img.shields.io/npm/v/agentshq.svg"></a>
|
|
18
|
+
<a href="https://www.npmjs.com/package/agentshq"><img alt="npm downloads" src="https://img.shields.io/npm/dm/agentshq.svg"></a>
|
|
19
|
+
<a href="https://www.npmjs.com/package/agentshq"><img alt="license" src="https://img.shields.io/npm/l/agentshq.svg"></a>
|
|
20
|
+
<a href="https://agentshq.sh"><img alt="website" src="https://img.shields.io/badge/web-agentshq.sh-blue"></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
No install required -- run with `npx`:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx agentshq add owner/repo
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The CLI clones the repo, discovers every agent inside it, detects which IDEs you have installed, and writes each agent in the correct format. One command, all your IDEs.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Install a specific agent
|
|
37
|
+
npx agentshq add owner/repo@agent-name
|
|
38
|
+
|
|
39
|
+
# Search the registry
|
|
40
|
+
npx agentshq find react
|
|
41
|
+
|
|
42
|
+
# List installed agents
|
|
43
|
+
npx agentshq list
|
|
44
|
+
|
|
45
|
+
# Update everything
|
|
46
|
+
npx agentshq update
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Or install globally:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm i -g agentshq
|
|
53
|
+
agentshq add owner/repo
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## How It Works
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
Source repo Your machine
|
|
60
|
+
─────────── ────────────
|
|
61
|
+
AGENT.md ──clone──► .agents/agents/<name>/AGENT.md (canonical)
|
|
62
|
+
*.agent.md │
|
|
63
|
+
*.json ├──► .claude/agents/<name>.md
|
|
64
|
+
*.toml ├──► .cursor/agents/AGENTS.md
|
|
65
|
+
AGENTS.md sections ├──► .github/agents/<name>.agent.md
|
|
66
|
+
├──► .kiro/agents/<name>.json
|
|
67
|
+
└──► ... (43+ IDEs)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Agents are stored once in a canonical format, then **translated and copied** to each IDE's native format. No symlinks, no lock-in -- every IDE gets a file it understands natively. Updates and removal are tracked automatically via lock files.
|
|
71
|
+
|
|
72
|
+
## Supported IDEs
|
|
73
|
+
|
|
74
|
+
### Native agent support
|
|
75
|
+
|
|
76
|
+
| IDE | Format |
|
|
77
|
+
|-----|--------|
|
|
78
|
+
| Claude Code | `.md` with YAML frontmatter |
|
|
79
|
+
| Gemini CLI | `.md` with YAML frontmatter |
|
|
80
|
+
| OpenCode | `.md` with YAML frontmatter |
|
|
81
|
+
| GitHub Copilot | `.agent.md` |
|
|
82
|
+
| Kiro | `.json` |
|
|
83
|
+
| Mistral Vibe | `.toml` |
|
|
84
|
+
| Cursor | `AGENTS.md` sections |
|
|
85
|
+
| Windsurf | `AGENTS.md` sections |
|
|
86
|
+
| Codex | `AGENTS.md` sections |
|
|
87
|
+
| Amp | `AGENTS.md` sections |
|
|
88
|
+
| Augment | `AGENTS.md` sections |
|
|
89
|
+
| Roo Code | `AGENTS.md` sections |
|
|
90
|
+
| Cline | `AGENTS.md` sections |
|
|
91
|
+
| Goose | `AGENTS.md` sections |
|
|
92
|
+
| Junie | `AGENTS.md` sections |
|
|
93
|
+
| Antigravity | `AGENTS.md` sections |
|
|
94
|
+
| Warp | `AGENTS.md` sections |
|
|
95
|
+
|
|
96
|
+
### Forward-bet IDEs
|
|
97
|
+
|
|
98
|
+
26 additional IDEs that don't yet have a native agent format. The CLI copies the canonical `AGENT.md` so agents are ready the moment support lands: Continue, Replit, Trae, Qwen Code, OpenHands, Kilo Code, Droid, Cortex Code, CodeBuddy, and more.
|
|
99
|
+
|
|
100
|
+
## Commands
|
|
101
|
+
|
|
102
|
+
### Install agents
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# From a GitHub repo
|
|
106
|
+
npx agentshq add owner/repo
|
|
107
|
+
|
|
108
|
+
# A specific agent from a multi-agent repo
|
|
109
|
+
npx agentshq add owner/repo@agent-name
|
|
110
|
+
|
|
111
|
+
# From any git URL
|
|
112
|
+
npx agentshq add https://gitlab.com/org/repo
|
|
113
|
+
|
|
114
|
+
# From a local directory
|
|
115
|
+
npx agentshq add ./path/to/agents
|
|
116
|
+
|
|
117
|
+
# Global install (available in all projects)
|
|
118
|
+
npx agentshq add owner/repo -g
|
|
119
|
+
|
|
120
|
+
# Target specific IDEs only
|
|
121
|
+
npx agentshq add owner/repo --ide claude-code cursor windsurf
|
|
122
|
+
|
|
123
|
+
# Install everything, no prompts
|
|
124
|
+
npx agentshq add owner/repo --all
|
|
125
|
+
|
|
126
|
+
# Preview agents in a repo without installing
|
|
127
|
+
npx agentshq add owner/repo --list
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Search agents
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Interactive search with fuzzy matching
|
|
134
|
+
npx agentshq find
|
|
135
|
+
|
|
136
|
+
# Search by keyword
|
|
137
|
+
npx agentshq find typescript
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Manage agents
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# List project agents
|
|
144
|
+
npx agentshq list
|
|
145
|
+
|
|
146
|
+
# List global agents
|
|
147
|
+
npx agentshq list -g
|
|
148
|
+
|
|
149
|
+
# JSON output
|
|
150
|
+
npx agentshq list --json
|
|
151
|
+
|
|
152
|
+
# Remove interactively
|
|
153
|
+
npx agentshq remove
|
|
154
|
+
|
|
155
|
+
# Remove by name
|
|
156
|
+
npx agentshq remove agent-name
|
|
157
|
+
|
|
158
|
+
# Check for updates
|
|
159
|
+
npx agentshq check
|
|
160
|
+
|
|
161
|
+
# Update all agents
|
|
162
|
+
npx agentshq update
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Create agents
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Scaffold a new AGENT.md
|
|
169
|
+
npx agentshq init my-agent
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Command reference
|
|
173
|
+
|
|
174
|
+
| Command | Aliases | Description |
|
|
175
|
+
|---------|---------|-------------|
|
|
176
|
+
| `add <source>` | `a`, `install`, `i` | Install agents from GitHub, GitLab, any git URL, or a local path |
|
|
177
|
+
| `remove [names]` | `rm`, `r` | Remove installed agents (interactive picker if no names given) |
|
|
178
|
+
| `list` | `ls` | List installed agents |
|
|
179
|
+
| `find [query]` | `search`, `f`, `s` | Search the registry |
|
|
180
|
+
| `check` | | Check for available updates |
|
|
181
|
+
| `update` | `upgrade` | Update all agents |
|
|
182
|
+
| `init [name]` | | Create a new `AGENT.md` |
|
|
183
|
+
|
|
184
|
+
### Flags
|
|
185
|
+
|
|
186
|
+
| Flag | Description |
|
|
187
|
+
|------|-------------|
|
|
188
|
+
| `-g, --global` | User-level scope instead of project-level |
|
|
189
|
+
| `--ide <ides>` | Target specific IDEs (or `*` for all) |
|
|
190
|
+
| `--agent <names>` | Select specific agents (or `*` for all) |
|
|
191
|
+
| `-y, --yes` | Skip confirmation prompts |
|
|
192
|
+
| `--all` | All agents, all IDEs, no prompts |
|
|
193
|
+
| `--list` | Preview without installing |
|
|
194
|
+
| `--json` | Machine-readable output |
|
|
195
|
+
|
|
196
|
+
## Publishing Your Own Agents
|
|
197
|
+
|
|
198
|
+
### Repo layout
|
|
199
|
+
|
|
200
|
+
**Single agent** -- put an `AGENT.md` at the root:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
my-agent/
|
|
204
|
+
AGENT.md
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Multiple agents** -- one subdirectory per agent:
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
my-agents/
|
|
211
|
+
agents/
|
|
212
|
+
code-reviewer/
|
|
213
|
+
AGENT.md
|
|
214
|
+
api-designer/
|
|
215
|
+
AGENT.md
|
|
216
|
+
test-writer/
|
|
217
|
+
AGENT.md
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Push to GitHub (or any git host) and anyone can install with `npx agentshq add owner/repo`.
|
|
221
|
+
|
|
222
|
+
### AGENT.md format
|
|
223
|
+
|
|
224
|
+
```markdown
|
|
225
|
+
---
|
|
226
|
+
name: code-reviewer
|
|
227
|
+
description: Reviews pull requests for correctness, style, and security issues
|
|
228
|
+
metadata:
|
|
229
|
+
tags:
|
|
230
|
+
- code-review
|
|
231
|
+
- security
|
|
232
|
+
tools:
|
|
233
|
+
- Read
|
|
234
|
+
- Grep
|
|
235
|
+
- Bash
|
|
236
|
+
model: sonnet
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
# Code Reviewer
|
|
240
|
+
|
|
241
|
+
You are a senior code reviewer. When activated, review the provided
|
|
242
|
+
code changes for correctness, security, and style issues.
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
| Field | Required | Description |
|
|
246
|
+
|-------|----------|-------------|
|
|
247
|
+
| `name` | yes | Agent identifier (used as directory name on install) |
|
|
248
|
+
| `description` | yes | One-line summary shown in search results |
|
|
249
|
+
| `metadata.tags` | no | Keywords for discovery |
|
|
250
|
+
| `metadata.tools` | no | Tools the agent needs |
|
|
251
|
+
| `metadata.model` | no | Preferred model hint |
|
|
252
|
+
| `metadata.internal` | no | Set `true` to hide from public discovery |
|
|
253
|
+
|
|
254
|
+
The markdown body is the agent's system prompt -- preserved verbatim across all format translations.
|
|
255
|
+
|
|
256
|
+
### Supported input formats
|
|
257
|
+
|
|
258
|
+
The CLI auto-detects all of these:
|
|
259
|
+
|
|
260
|
+
| Format | Example | Used by |
|
|
261
|
+
|--------|---------|---------|
|
|
262
|
+
| `AGENT.md` | `agents/reviewer/AGENT.md` | Canonical (recommended) |
|
|
263
|
+
| `<name>.md` | `reviewer.md` with YAML frontmatter | Claude Code, Gemini CLI, OpenCode |
|
|
264
|
+
| `<name>.agent.md` | `reviewer.agent.md` | GitHub Copilot |
|
|
265
|
+
| `<name>.json` | `reviewer.json` | Kiro |
|
|
266
|
+
| `<name>.toml` | `reviewer.toml` | Mistral Vibe |
|
|
267
|
+
| `AGENTS.md` | `<!-- agent:reviewer -->` sections | Cursor, Windsurf, Augment + 8 more |
|
|
268
|
+
|
|
269
|
+
## Private Repos
|
|
270
|
+
|
|
271
|
+
Same syntax as public repos:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
npx agentshq add your-org/private-agents
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
When the source is private, the CLI automatically:
|
|
278
|
+
|
|
279
|
+
- **Skips all telemetry** -- no repo names or agent names leave your machine
|
|
280
|
+
- **Skips the security audit API** -- zero external requests
|
|
281
|
+
- **Tracks only locally** -- lock file entries for updates, nothing more
|
|
282
|
+
|
|
283
|
+
Set `GITHUB_TOKEN` or `GH_TOKEN` if you need token-based access:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
GITHUB_TOKEN=ghp_xxx npx agentshq add your-org/private-agents
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## Requirements
|
|
290
|
+
|
|
291
|
+
- Node.js >= 18
|
|
292
|
+
|
|
293
|
+
## License
|
|
294
|
+
|
|
295
|
+
MIT -- see [LICENSE](https://github.com/ulpi-io/agentshq-cli/blob/main/LICENSE) for details.
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
<p align="center">
|
|
300
|
+
<a href="https://agentshq.sh">agentshq.sh</a>
|
|
301
|
+
</p>
|
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import module from 'node:module';
|
|
4
|
+
|
|
5
|
+
// https://nodejs.org/api/module.html#module-compile-cache
|
|
6
|
+
if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) {
|
|
7
|
+
try {
|
|
8
|
+
module.enableCompileCache();
|
|
9
|
+
} catch {
|
|
10
|
+
// Ignore errors
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
await import('../dist/cli.mjs');
|