agkit 0.7.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/README.md ADDED
@@ -0,0 +1,174 @@
1
+ # agkit
2
+
3
+ > **AG**ent marketplace **KIT**
4
+
5
+ Scaffold and manage **plugin marketplaces for Claude Code, GitHub Copilot, OpenAI Codex, and Cursor**, distributed through **any Git host** — GitHub, GitLab, Bitbucket, Gitea, or a self-hosted forge.
6
+
7
+ Think `ng` for Angular, but for agent plugin marketplaces: `init` gives you a push-ready repository, and `add`/`build`/`sync`/`bump`/`validate` cover the whole life of the project afterwards.
8
+
9
+ > Unofficial community tool, not affiliated with Anthropic, GitHub, OpenAI, or Cursor.
10
+
11
+ ## How agents consume your marketplace
12
+
13
+ agkit always writes one canonical catalog — `.claude-plugin/marketplace.json` — plus your plugins under `plugins/<name>/`. That catalog is the single source of truth. How each agent reads it falls into two groups:
14
+
15
+ - **Native (no build step)** — **Claude Code** and **GitHub Copilot** read `.claude-plugin/marketplace.json` directly. Push the repo and it installs.
16
+ - **Generated registry (`agkit build`)** — **Codex** and **Cursor** install from their own committed registry, which `agkit build` derives from the same canonical catalog. You run `agkit build` once to enable a target; after that `add`/`bump`/`sync` keep it fresh automatically.
17
+
18
+ You can target several agents from a single repository — the plugin content under `plugins/` is shared.
19
+
20
+ ## Quick start
21
+
22
+ ```bash
23
+ npx agkit init my-marketplace
24
+ cd my-marketplace
25
+ agkit add skill tdd-coach
26
+ agkit validate
27
+ git remote add origin <your-git-url>
28
+ git add -A && git commit -m "feat: initial marketplace" && git push -u origin main
29
+ ```
30
+
31
+ The default init targets Claude Code and GitHub Copilot (both native). To target Codex or Cursor, see below.
32
+
33
+ ## Create a marketplace for your agent
34
+
35
+ Choose targets at init with `--agents`. Every flow ends with a normal git push; distribution works from any forge.
36
+
37
+ ### Claude Code
38
+
39
+ Native — nothing to generate.
40
+
41
+ ```bash
42
+ agkit init my-marketplace --agents claude-code
43
+ cd my-marketplace
44
+ agkit add skill my-skill
45
+ agkit validate
46
+ git remote add origin <your-git-url>
47
+ git add -A && git commit -m "feat: initial marketplace" && git push -u origin main
48
+ ```
49
+
50
+ Consumers install in a Claude Code session:
51
+
52
+ ```
53
+ /plugin marketplace add <owner/repo or git URL>
54
+ /plugin install my-skill@my-marketplace
55
+ ```
56
+
57
+ ### GitHub Copilot
58
+
59
+ Native — same repository as Claude Code, no build. The default init already includes Copilot; to target it explicitly use `--agents copilot` (or `--agents claude-code,copilot`).
60
+
61
+ ```bash
62
+ agkit init my-marketplace --agents claude-code,copilot
63
+ cd my-marketplace
64
+ agkit add skill my-skill
65
+ agkit validate
66
+ git add -A && git commit -m "feat: initial marketplace" && git push -u origin main
67
+ ```
68
+
69
+ Consumers install from the shell (or with `/plugin marketplace add` inside a session):
70
+
71
+ ```bash
72
+ copilot plugin marketplace add <owner/repo or git URL>
73
+ copilot plugin install my-skill@my-marketplace
74
+ ```
75
+
76
+ ### OpenAI Codex
77
+
78
+ Codex installs from its own registry, which `agkit build` generates from the catalog.
79
+
80
+ ```bash
81
+ agkit init my-marketplace --agents codex
82
+ cd my-marketplace
83
+ agkit add skill my-skill
84
+ agkit build # generates .agents/plugins/marketplace.json + plugins/<name>/.codex-plugin/plugin.json
85
+ agkit validate
86
+ git add -A && git commit -m "feat: initial marketplace" && git push -u origin main
87
+ ```
88
+
89
+ Consumers install with:
90
+
91
+ ```bash
92
+ codex plugin marketplace add <owner/repo or git URL>
93
+ ```
94
+
95
+ The Codex registry format follows the official Codex plugin docs (`.agents/plugins/marketplace.json` with `source: { source: "local", path }`, `policy`, and `category`). Commit the generated files so consumers can install.
96
+
97
+ ### Cursor
98
+
99
+ Cursor installs from a committed `.cursor-plugin/` registry, also generated by `agkit build`.
100
+
101
+ ```bash
102
+ agkit init my-marketplace --agents cursor
103
+ cd my-marketplace
104
+ agkit add skill my-skill
105
+ agkit build # generates .cursor-plugin/marketplace.json + plugins/<name>/.cursor-plugin/plugin.json
106
+ agkit validate
107
+ git add -A && git commit -m "feat: initial marketplace" && git push -u origin main
108
+ ```
109
+
110
+ Consumers add the marketplace in Cursor, then install the plugin by name.
111
+
112
+ ### Several agents at once
113
+
114
+ One repository can serve every supported agent:
115
+
116
+ ```bash
117
+ agkit init my-marketplace --agents claude-code,copilot,codex,cursor
118
+ cd my-marketplace
119
+ agkit add skill my-skill
120
+ agkit build # generates the Codex and Cursor registries; Claude Code and Copilot need none
121
+ agkit validate
122
+ git add -A && git commit -m "feat: initial marketplace" && git push -u origin main
123
+ ```
124
+
125
+ ## Commands
126
+
127
+ | Command | What it does |
128
+ | :------ | :----------- |
129
+ | `agkit init [dir]` | Scaffolds a git-first marketplace: `.claude-plugin/marketplace.json` (with `$schema`, `pluginRoot`, `targets`), `plugins/`, `AGENTS.md`, a per-agent README, `examples/team-settings.json`, CI (GitHub Actions or GitLab CI), `.gitignore`, `git init`. Pick target agents with `--agents` (see [Target agents](#target-agents)). Non-interactive with `-y`. |
130
+ | `agkit add <template\|spec> <name>` | Scaffolds a plugin from a built-in template (`skill`, `command`, `agent`, `hook`, `mcp`) **or a remote/local one** — `gh:owner/repo/dir#ref`, `gl:owner/repo`, any git URL with `//subdir` and `#ref`, or a local path. Registers it in the catalog and refreshes the README plugin table. |
131
+ | `agkit build [--target] [--check]` | Generates the registries for **Codex** and **Cursor** from the catalog: their committed `marketplace.json` + per-plugin manifest mirrors. Default targets are the ones in `metadata.targets`; `--target codex,cursor` overrides. `--check` fails on drift (CI). |
132
+ | `agkit bump [plugin] [level]` | Bumps a plugin version from conventional commits scoped to its directory since the last `<plugin>@x.y.z` tag (`feat`→minor, breaking→major, else patch), or an explicit `major\|minor\|patch`. `--tag` commits and tags; `--dry-run` previews. Catalog, README, and any built registries stay in sync. |
133
+ | `agkit sync` | Reconciles the catalog with what's on disk. Source of truth: each plugin's `.claude-plugin/plugin.json`. Adds missing entries, fixes drift, flags orphans, regenerates the README table, and refreshes any already-built Codex/Cursor registry. |
134
+ | `agkit validate [--strict]` | Local checks (JSON validity, kebab-case, reserved names, source resolution, manifest presence, version drift) plus delegation to `claude plugin validate` when the Claude Code CLI is installed (`--strict` forwarded). Non-zero exit on error — CI-ready. |
135
+ | `agkit list` | Lists available plugin templates. |
136
+
137
+ ## Target agents
138
+
139
+ `agkit init --agents <list>` records the agents you want to serve and adapts the scaffold. Default: `claude-code,copilot`.
140
+
141
+ | Agents | How agkit serves them |
142
+ | :----- | :------------------- |
143
+ | **Claude Code, GitHub Copilot** | Native. The catalog is read as-is — per-agent install docs and the team-settings path are wired at init, nothing to generate. |
144
+ | **Codex, Cursor** | `agkit build` generates the committed registry + per-plugin manifest mirrors from the catalog. `sync`/`add`/`bump` keep it fresh once built. |
145
+
146
+ Every init also writes a root `AGENTS.md`, read natively by most agents for repository context.
147
+
148
+ ## Keeping registries fresh
149
+
150
+ Generation is opt-in: run `agkit build` once to enable Codex/Cursor. From then on, `agkit add`, `agkit bump`, and `agkit sync` refresh the generated registries automatically, so they never drift as plugins change. In CI, run `agkit build --check` to fail the build if a committed registry is out of date (the generated GitHub Actions / GitLab CI workflows already do this).
151
+
152
+ ## Team templates (remote or local)
153
+
154
+ Version your team's plugin templates in any git repository and consume them from every marketplace:
155
+
156
+ ```bash
157
+ agkit add gh:my-org/plugin-templates/kata-fr gilded-rose
158
+ agkit add "https://gitlab.company.io/craft/templates//skill-ddd#v2" tactical-ddd
159
+ agkit add ./shared-templates/hook-guard no-secrets
160
+ ```
161
+
162
+ A template is any directory containing `.claude-plugin/plugin.json` (adopted, `name` rewritten) or `plugin.json.tpl`. Files ending in `.tpl` are rendered with `{{pluginName}}`, `{{pluginTitle}}`, `{{description}}`, `{{authorName}}` — in contents **and** in file/directory names. Executable bits are preserved.
163
+
164
+ ## Forge-agnostic by design
165
+
166
+ `init` parses your git remote (https, ssh, scp-style) regardless of host. On github.com it uses the `owner/repo` shorthand and `{"source": "github"}` team settings; everywhere else it emits the git URL form — which every supported agent accepts for any forge.
167
+
168
+ ## Team setup (automatic installation)
169
+
170
+ `init` writes `examples/team-settings.json` with an `extraKnownMarketplaces` block. Drop it into the settings file for each agent so teammates get the marketplace automatically when they trust the repository — `.claude/settings.json` for Claude Code, `.github/copilot/settings.json` for GitHub Copilot.
171
+
172
+ ## License
173
+
174
+ MIT