You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 759dfc7
Browse filesBrowse the repository at this point in the historyBrowse files
Publish the read side as @profullstack/crawlproof, and make crawlproof a command (#241)
* Make `crawlproof` a command, not a cd and an npm incantation
The CLI had no bin and was not on PATH, so every command in its own help and
in this PR's description was a lie unless you first cd'd into the checkout and
typed `npm run cli --`. `crawlproof dashboard` now works from anywhere.
bin/crawlproof.mjs resolves the repo from its own location and runs tsx against
cli/index.ts, preferring the checkout's tsx and falling back to npx so a fresh
clone still starts. It relays the child's signal rather than inventing an exit
code, so a TUI killed with ctrl+c does not look like a clean exit.
The token now also falls back to the `token` field of ~/.crawlproof.json, the
same shape and the same reasoning as ~/.coinpay.json: using the CLI should not
be conditional on remembering to export a secret first.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HvWJ4336pxTFRdRbvsTQeD
* Publish the read side as @profullstack/crawlproof
A dashboard you can only run by cd'ing into a Next.js checkout is not installed
anywhere. packages/cli publishes the two commands a box actually wants —
`dashboard` and `stats` — so cli-tools can vendor it the way it vendors hqtui,
and any machine can `npm i -g @profullstack/crawlproof`.
Only those two, deliberately. Both are token-authed and pure HTTP, which is
what makes them publishable: `audit` needs the audit engines and their model
SDKs, and `sweep` needs a cron secret. Those stay in the repo.
The package is a **build artifact**, not a second copy. lib/dashboard/* and
cli/dashboard.ts stay where the suite already covers them and where the in-repo
CLI already imports them; build.mjs bundles the same files with esbuild and
leaves hqtui and the CoinPay SDK external, since both have their own release
cadence. There is one implementation and it cannot drift.
The stats printer moves to lib/dashboard/stats-text.ts and returns a string
rather than writing to stdout, because two CLIs print it now and a printer that
owns the process can be neither shared nor tested.
Verified from the bundle against production: `crawlproof stats crawlproof.com`
reads the token out of ~/.crawlproof.json with nothing exported, and the
dashboard collects all 52 sites with zero source errors.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HvWJ4336pxTFRdRbvsTQeD
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
`--json` prints the same snapshot the screens render, for a script or a box
56
+
with no terminal. Aliases for `dashboard`: `roi`, `tui`.
57
+
58
+
## Auth
59
+
60
+
|||
61
+
| --- | --- |
62
+
|`CRAWLPROOF_TOKEN`| API token (`crp_…`) from Social → API tokens. Also read from the `token` field of `~/.crawlproof.json`. `--token` wins. |
63
+
|`CRAWLPROOF_SITE_URL`| API base, default `https://crawlproof.com`. |
64
+
|`COINPAY_SESSION_TOKEN`| CoinPay merchant JWT for the money screens. Defaults to `jwtToken` in `~/.coinpay.json`, which `coinpay auth login` writes. |
65
+
66
+
Without a CoinPay session the traffic and ads screens still work and the money
67
+
panels say what is missing, rather than showing zero.
68
+
69
+
Needs Node 22.6 or newer, and a terminal for the dashboard. `--json` needs
0 commit comments