Skip to content

Commit 164c3d4

Browse files
committed
Add commands
1 parent ca2cce5 commit 164c3d4

3 files changed

Lines changed: 220 additions & 0 deletions

File tree

‎assets/commands/declick.md‎

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
# TAGLINE
2+
3+
Compile APIs, MCP servers, and databases into agent-ready CLIs
4+
5+
# TLDR
6+
7+
**Install** the global CLI (needs Node 24 or newer)
8+
9+
```npm i -g declick```
10+
11+
**Wire** declick into local agent clients (PATH, MCP adapters, rules)
12+
13+
```declick setup```
14+
15+
**Compile** an OpenAPI spec into a named adapter
16+
17+
```declick add [https://petstore3.swagger.io/api/v3/openapi.json] --name [petstore]```
18+
19+
**List** an adapter's verbs
20+
21+
```declick run [petstore] describe```
22+
23+
**Call** a verb and keep only named fields
24+
25+
```declick run [petstore] [get-user-by-name] [user1] --fields [username,email]```
26+
27+
**Preview** a mutating call without sending it
28+
29+
```declick run [petstore] [get-pet-by-id] [7] --dry-run```
30+
31+
**Filter** a list before it reaches the model
32+
33+
```declick run [shop] [list-pets] --where [status=sold] --limit [20]```
34+
35+
**Compile** a SQLite database into list/get/insert verbs
36+
37+
```declick add sqlite:[path/to/data.db] --name [db]```
38+
39+
**Check** Node, PATH, engines, and agent integration
40+
41+
```declick doctor```
42+
43+
# SYNOPSIS
44+
45+
**declick** _command_ [_options_] [_args_]
46+
47+
# PARAMETERS
48+
49+
**setup**
50+
> Put **~/.declick/bin** on PATH, adopt the agent's MCP servers as adapters, write a rules block to **CLAUDE.md** or **AGENTS.md**, and (Claude Code) install a PreToolUse hook. **--dry-run** prints the plan; **--revert** restores a byte-exact snapshot.
51+
52+
**add** _source_ **--name** _n_
53+
> Compile a source into **~/.declick/**_n_ (manifest, launcher, SKILL.md). Sources include OpenAPI/Swagger URLs or files, Postman/Insomnia collections, HAR captures, GraphQL schemas, **mcp:**_command_, **sqlite:**_path_, **cli:**_binary_, **web:**_url_, **app:**_window_ (Windows), and **compose:**_chain.json_. **--verbs** / **--tag** subset a large spec; **--engine** overrides detection; **--force** overwrites a name collision; **--dry-run** compiles and lints without writing.
54+
55+
**run** _name_ _verb_ [_args_]
56+
> Invoke a compiled verb without putting the adapter on PATH. Once **~/.declick/bin** is on PATH, the short form _name_ _verb_ [_args_] is equivalent.
57+
58+
**describe** _name_
59+
> Print the adapter surface (verbs, required args, base URL). Pages itself over about 2000 characters. **--full**, **--verb** _v_, **--grep** _text_, **--offset** _N_, **--limit** _N_ narrow the listing.
60+
61+
**list**
62+
> Every adapter: engine, source, verb names, auth keys, last run, last error.
63+
64+
**engines**
65+
> Built-in engines. **--source** _x_ reports which engine a source would use before anything is written.
66+
67+
**doctor**
68+
> Node version, home, PATH, skill dirs, vault, deskclaw, Claude CLI, governance, engine readiness, and whether **setup** has run. Exit 1 only when Node is too old.
69+
70+
**path** **--install**
71+
> Put **~/.declick/bin** on PATH for new shells. **--dry-run** previews without writing.
72+
73+
**daemon** [**start** | **stop** | **status**]
74+
> Keep stdio MCP servers warm between runs. HTTP MCP adapters never use it.
75+
76+
**defaults** _name_
77+
> Per-adapter flag defaults in **~/.declick/**_name_**/defaults.json**. **--set** _k=v_, **--unset** _k_, **--clear**, optional **--verb** _v_.
78+
79+
**policy**
80+
> Inspect **~/.declick/policy.json**. **--check** _adapter_ _verb_ shows which rule wins; **--example** prints a starter file.
81+
82+
**auth** _name_
83+
> Report which required env keys are present (process environment, then **~/.creds/vault.env**) and from where. Exit 4 when any is missing.
84+
85+
**lint** _name_ / **build** _name_ / **skill** [_name_]
86+
> Check the contract, recompile from the stored source, or regenerate SKILL.md. **skill --print** writes one skill to stdout.
87+
88+
**remove** _name_ [_verb_]
89+
> Delete an adapter (manifest, launcher, skill) or one desktop verb.
90+
91+
**export** _name_ / **import** [_file_|**-**]
92+
> Round-trip a JSON bundle of manifest plus recipes. **declick export** _n_ **| declick import -** rebuilds on another machine.
93+
94+
**compose** _name_
95+
> Print a compose chain. **--steps** _file_ compiles a chain of existing adapter verbs into one verb.
96+
97+
**audit**
98+
> Read **~/.declick/audit.jsonl** newest first. **--adapter** _n_, **--since** _10m_, **--failed**, **--sum**.
99+
100+
**ui**
101+
> Local page at **http://127.0.0.1:4870** (loopback only). **--open**, **--port** _N_, **--allow-authoring**.
102+
103+
**uninstall** **--yes**
104+
> Revert setup if it ran, delete **~/.declick**, and print the **npm rm -g declick** line. Refuses without **--yes**.
105+
106+
**--json**
107+
> Envelope on stdout. Default when stdout is not a TTY. Success: **{ok:true, data, meta}**. Failure: **{ok:false, error, exit}**. **--json false** forces text.
108+
109+
**--fields** _a,b_
110+
> Project named fields (dotted paths allowed). A list that matches nothing is exit 1.
111+
112+
**--limit** _N_
113+
> Cap list output (default 50). Must be a positive integer.
114+
115+
**--where** _k=v_
116+
> Filter a list before **--fields** and **--limit**. Repeatable. Operators: **=**, **!=**, **~** (regex), **>**, **>=**, **<**, **<=**, **=*** (present).
117+
118+
**--rows** _path_
119+
> Unwrap a dotted array field inside a response object.
120+
121+
**--dry-run**
122+
> Print what a mutating verb or write command would do; set **meta.dryRun: true**.
123+
124+
**--each** _file_
125+
> Run the verb once per NDJSON/JSON-array item (**-** for stdin). One envelope; exit is 0 only when every item succeeded.
126+
127+
**--cache** _seconds_
128+
> Answer a read-only verb from a stored response younger than this. Exit 1 on a mutating verb.
129+
130+
**--max-bytes** _N_
131+
> Ceiling on **data** bytes (default 8192, **0** off). Over the cap: **meta.truncated** and **meta.capped**, exit still 0.
132+
133+
**--no-defaults**
134+
> Ignore **~/.declick/**_name_**/defaults.json** for this call.
135+
136+
**--header** _'K: V'_, **--base-url** _url_, **--body** _@file_, **--retry** _N_, **--timeout** _ms_, **--verbose**, **--curl**
137+
> HTTP request flags on openapi, postman, and har verbs.
138+
139+
**commands** / **version** / **--help**
140+
> Command surface as data, build version, or one command's flags and examples.
141+
142+
# DESCRIPTION
143+
144+
**declick** compiles an API spec, MCP server, database, CLI, web page, or (on Windows) desktop window into a named shell adapter. Each adapter exposes **verbs** that return one JSON envelope and one of five exit codes, so an agent can call tools through the shell instead of carrying a full MCP tool listing on every turn.
145+
146+
Every engine, and declick itself, honors the same output contract: **describe** for a compact surface, **--json** for a stable envelope, **--fields** / **--limit** / **--where** to cut the payload before it reaches a model, and **--dry-run** on mutating verbs. **declick add** writes **~/.declick/**_name_**/manifest.json**, a two-line launcher under **~/.declick/bin**, and a **SKILL.md** into agent skill directories that already exist (**~/.claude/skills**, and **~/.codex/skills**, **~/.hermes/skills**, **~/.openclaw/skills**, **~/.agents/skills** when present).
147+
148+
The ten built-in engines (zero runtime npm dependencies, Node 24+) are **openapi**, **postman**, **har**, **graphql**, **mcp**, **sqlite**, **cli**, **web**, **desktop**, and **compose**. Auth is never stored in a manifest: required names are read from the process environment, then **~/.creds/vault.env**. Optional DashClaw governance and a local **policy.json** can block mutating verbs with exit 3.
149+
150+
# EXIT CODES
151+
152+
**0**
153+
> Success.
154+
155+
**1**
156+
> Error (bad flags, invalid input, Node too old, unreadable policy).
157+
158+
**2**
159+
> Not found (adapter, verb, window, or element).
160+
161+
**3**
162+
> Blocked (local policy, DashClaw guard, unarmed deskclaw, or STOP).
163+
164+
**4**
165+
> Auth needed (required env key missing).
166+
167+
# CONFIGURATION
168+
169+
**~/.declick/**
170+
> Default home (**DECLICK_HOME**). Adapters, launchers, cache, audit log, daemon socket, and setup snapshots.
171+
172+
**~/.declick/**_name_**/manifest.json**
173+
> Compiled contract. Regenerated by **declick build**; do not edit by hand.
174+
175+
**~/.declick/**_name_**/defaults.json**
176+
> Optional per-adapter / per-verb flag defaults. Survives **build**; deleted with **remove**.
177+
178+
**~/.declick/policy.json**
179+
> Local allow/warn/block rules (globs on adapter and verb). First match wins. Invalid JSON fails closed (every run exits 1). **DECLICK_POLICY** moves the path.
180+
181+
**~/.declick/audit.jsonl**
182+
> One JSON line per verb invocation. **DECLICK_AUDIT=off** disables it.
183+
184+
**~/.declick/bin/**
185+
> Generated adapter launchers. **declick path --install** (and **setup**) put this directory on PATH.
186+
187+
**DECLICK_MAX_BYTES**, **DECLICK_CACHE**, **DECLICK_DEFAULTS**, **DECLICK_TIMEOUT_MS**, **DECLICK_DAEMON_IDLE_MS**
188+
> Output cap, response cache, defaults, HTTP/MCP timeout, and daemon idle (ms). See **declick doctor** and the upstream reference for the full list.
189+
190+
**DASHCLAW_API_KEY**, **DASHCLAW_URL**
191+
> Optional remote guard for mutating verbs. No key means verbs run and the envelope records **governance.enabled: false**.
192+
193+
# CAVEATS
194+
195+
Requires **Node 24 or newer**; an older runtime exits 1 with one line naming the version it found. Published on npm as **declick**; distro packages are uncommon.
196+
197+
Releases after **0.3.0** use the **Elastic License 2.0** (use and modify; do not offer it as a managed service). 0.3.0 on npm was MIT.
198+
199+
The **desktop** engine shells out to deskclaw and is Windows-only; **declick engines** reports it as not ready on other platforms. **author** / **repair** need the Claude Code CLI on PATH. **declick ui** binds loopback only and is a local control page, not a public server.
200+
201+
# HISTORY
202+
203+
**declick** is a Node CLI by **ucsandman**, first published on GitHub in **September 2026** (npm package **declick**, homepage **declick.dev**). It compiles OpenAPI, MCP, SQLite, and related sources into shell verbs with a shared output contract aimed at coding agents. Version **0.6.x** added compose chains, a warm MCP daemon, local policy, and agent **setup** / **uninstall**.
204+
205+
# SEE ALSO
206+
207+
[curl](/man/curl)(1), [openapi-generator](/man/openapi-generator)(1), [sqlite3](/man/sqlite3)(1), [jq](/man/jq)(1), [npm](/man/npm)(1), [claude](/man/claude)(1)
208+
209+
# RESOURCES
210+
211+
```[Source code](https://github.com/ucsandman/declick)```
212+
213+
```[Homepage](https://declick.dev)```
214+
215+
```[Documentation](https://github.com/ucsandman/declick/blob/main/docs/REFERENCE.md)```
216+
217+
<!-- verified: 2026-09-05 -->

‎assets/commands/index.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,7 @@ debuild.md
16441644
decaffeinate.md
16451645
decant.md
16461646
declare.md
1647+
declick.md
16471648
decode-dimms.md
16481649
deemix.md
16491650
deepseek.md

‎scripts/fetch-package-installs.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@
144144
},
145145
# ante: nixpkgs "ante" is jfecher/ante (programming language), not AntigmaLabs coding agent
146146
"ante": {},
147+
# declick: AUR "declick" is a 2020 WAV declicker (wahlm), not ucsandman/declick (npm CLI)
148+
"declick": {},
147149
# h3: distro packages are Uber's geospatial H3 (libh3-bin / h3); antirez h3-metal is source-only
148150
"h3": {},
149151
# singular: distro/brew/nix "singular" is the Singular CAS, not alex-reysa/singular-lite

0 commit comments

Comments
 (0)