lockpicks 0.3.0 → 0.4.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 +11 -2
- package/dist/lockpick.mjs +1564 -151
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ npm install -g lockpicks
|
|
|
18
18
|
|
|
19
19
|
With it installed, `lockpick mcp config` points agents at `lockpick mcp`; without it, at `npx -y lockpicks mcp`.
|
|
20
20
|
|
|
21
|
-
Use HTTPS for a remote Lockpick host. HTTP is accepted for local network and Tailscale development hosts. The CLI
|
|
21
|
+
Use HTTPS for a remote Lockpick host; a host without a scheme (`lockpick.app`) means HTTPS, and a local one (`studio-mac:3000`) means HTTP. HTTP is accepted for local network and Tailscale development hosts. The CLI never follows redirects during API calls, so a saved key stays on its selected host: when a host only moves to its canonical address (`lockpick.app` to `www.lockpick.app`), `login`, which sends no key, signs in there and saves that address, and every other command names the address to use. `--host` takes precedence over `LOCKPICK_HOST`, which takes precedence over the last login. Each host has its own saved profile; `lockpick logout --host <url>` revokes and removes only that host's key. When the OS keychain is unavailable, the CLI writes the config through a private temporary file and replaces the old file only after the new one is complete. If the config is damaged, repair it before logging in again; the CLI will not silently discard saved profiles.
|
|
22
22
|
|
|
23
23
|
## Commands
|
|
24
24
|
|
|
@@ -51,10 +51,16 @@ Use HTTPS for a remote Lockpick host. HTTP is accepted for local network and Tai
|
|
|
51
51
|
| `lockpick compare <runId>` | What a Pulse recheck changed against its baseline |
|
|
52
52
|
| `lockpick open <id>` | Opens a run or project in the browser |
|
|
53
53
|
| `lockpick skills` | Adds the Lockpick skills to your coding agent (`npx skills add`) |
|
|
54
|
+
| `lockpick docs [words]` | Searches the Lockpick docs from the terminal, or lists the CLI guides (`--open` opens the best match) |
|
|
55
|
+
| `lockpick ci init <site>` | Writes `.github/workflows/lockpick.yml`: a Pulse on each published release and on demand that fails on `--fail-on` findings (default `high`); `--dry-run` prints it, `--action` uses the Lockpick GitHub Action |
|
|
54
56
|
|
|
55
57
|
Every command takes `--host` and `--json`. With `--json`, errors are printed to stderr as `{ "error": "…", "code": "…" }`, plus `nextStep`, `retryAfterSeconds`, `webUrl` and `requestId` for the agent commands.
|
|
56
58
|
|
|
57
|
-
Exit codes: `0` success; `1` network or other error; `2` authentication; `3` a watched result failed, was cancelled or did not finish before the wait limit; `4` permission or allowance; `5` invalid input; `6` rate limit; `7` provider capacity or service failure
|
|
59
|
+
Exit codes: `0` success; `1` network, not found or other error; `2` authentication; `3` a watched result failed, was cancelled or did not finish before the wait limit; `4` permission (key scope or project role) or allowance; `5` invalid input; `6` rate limit; `7` provider capacity or service failure; `8` open findings reached `--fail-on`. JSON results go to stdout, with errors and human progress on stderr. Text errors end with a `Help:` link to the docs page on your Lockpick host that explains them (`docsUrl` in JSON errors). `--json` never adds terminal colors; `NO_COLOR` turns them off and `FORCE_COLOR=1` turns them on for a CI log. While a scan runs, a terminal shows one live progress line; a pipe or CI (`CI` set) gets one line per change.
|
|
60
|
+
|
|
61
|
+
`--fail-on critical|high|medium|low` on `pulse`, `recheck`, `watch`, `deep start` and `findings` exits `8` when open findings are that severe or worse, for CI. `lockpick ci init <site>` writes a GitHub Actions workflow that runs `npx -y lockpicks@<this version> pulse <site> --fail-on high` with the key from the `LOCKPICK_KEY` repository secret; it runs on published releases and by hand only, because each run uses a Pulse.
|
|
62
|
+
|
|
63
|
+
Text from scanned sites and saved briefs can carry terminal escape sequences. The CLI neutralizes every control character in API responses before printing them (an escape shows as `␛`), and keeps only its own colours on the way out, so a scanned page cannot clear your screen, write your clipboard or hide a link. Ids are checked before they go into a URL, and the key is never printed, even when a server error repeats it.
|
|
58
64
|
|
|
59
65
|
`watch`, `pulse`, full `recheck` and `deep start` wait for at most 600 seconds by default. Use `--timeout <seconds>` (up to 3600) and `--interval <seconds>` (2–30), or `--no-wait` for a started scan id immediately. If a wait ends while the scan is running, the CLI prints its id and exits `3`; resume with `lockpick watch <scanId>`. Waiting never sends the start request again. A quick check waits up to 90 seconds and a DNS recheck up to 60 seconds by default.
|
|
60
66
|
|
|
@@ -83,5 +89,8 @@ Agents set up for CLI 0.2.0 keep working: `lockpick_list_projects`, `lockpick_pr
|
|
|
83
89
|
| `LOCKPICK_KEY` | A key to use without logging in (CI) |
|
|
84
90
|
| `LOCKPICK_CONFIG_DIR` | Where the config file lives (default `~/.config/lockpick`) |
|
|
85
91
|
| `LOCKPICK_KEYCHAIN=0` | Skip the OS keychain and use the config file |
|
|
92
|
+
| `NO_COLOR` | Turn colour off |
|
|
93
|
+
| `FORCE_COLOR=1` | Colour even when output is not a terminal (CI logs) |
|
|
94
|
+
| `LOCKPICK_ACTION_REF` | The GitHub Action `ci init --action` refers to |
|
|
86
95
|
|
|
87
96
|
Requires Node.js 20.9 or later.
|