Adds a CLI tab to the request editor that shows an equivalent harborclient command for the configured request. The command is editable — change it and click Update to apply the parsed request back to the active tab. A Copy button copies the current editor text.
Build the plugin, then install the .hcp package or load the project folder unpacked:
pnpm install
pnpm buildIn HarborClient: Settings → Plugins → Load unpacked… and select this directory.
Requires HarborClient with hc.host.applyRequestDraft support (SDK @harborclient/sdk ≥ 1.1.31).
pnpm devRebuilds dist/renderer.js on change when HarborClient file watching is enabled for unpacked plugins.
- Open a request and switch to the CLI tab to see the generated command.
- Edit the command in the editor (method, URL, headers, body flags).
- Click Update to parse the command and replace the active request’s method, URL, headers, and body.
- Click Copy to copy the current editor contents.
The editor resyncs when you edit the request in other tabs (Params, Headers, Body, etc.).
harborclient GET https://httpbin.org/get
harborclient POST https://httpbin.org/post -H 'X-Token: secret' --json '{"hello":"world"}'
harborclient POST https://httpbin.org/post -d 'plain text'| Aspect | Behavior |
|---|---|
| Variables | Resolved from collection + active environment (environment wins on dupes) |
| Cookie jar | Not included unless a Cookie header is set manually |
| Pre/post scripts | Do not affect displayed CLI; Update does not modify scripts |
| urlencoded / multipart | Exported as best-effort -d body text; body type may not round-trip |
| Auth tab | Generated Authorization headers round-trip as headers, not Auth tab mode |
| Execution flags | --timeout, --no-verify-ssl, and -v are ignored on Update |
MIT
