Skip to content

feat(web): curl installer at nichedb.dev/install.sh - #190

Merged
ralyodio merged 3 commits into
mainfrom
feat/curl-install
Oct 13, 2026
Merged

ralyodio merged 3 commits into
mainfrom
feat/curl-install

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Adds curl -fsSL https://nichedb.dev/install.sh | sh, per the standing rule that every product serves /install.sh for its CLI.

  • apps/web/public/install.sh installs @profullstack/nichedb@latest globally. It uses bun if present, otherwise npm with Node >= 22. When the npm prefix is not writable it installs into ~/.local instead of sudo, then checks nichedb is on PATH. Re-running it upgrades.
  • routes/static.js serves it as text/x-sh with no-cache.
  • lib/pricing.js adds /install.sh to the gateway's openPaths, so curl is never answered 402.
  • The line is in the README, apps/cli/README.md, /docs/cli and llms.txt.
  • routes/install-sh.test.js pins the 200, the content type, the #! body and the open path.

Tested: sh -n passes. I ran it in throwaway HOMEs on both paths (bun, and npm-only with an unwritable prefix that falls back to ~/.local), and the installed nichedb ran on each.

Found while testing, not fixed here: nichedb --version with no command prints help, because the no-command check runs before the version flag. nichedb version works. The CLI's VERSION constant also still says 0.36.0 while the package is 0.36.2. The script calls nichedb version.

🤖 Generated with Claude Code

…db CLI

curl -fsSL https://nichedb.dev/install.sh | sh installs @profullstack/nichedb
globally: bun if present, else npm with Node >= 22, falling back to ~/.local
instead of sudo, then checks the bin is on PATH. Re-running it upgrades.

Served from apps/web/public as text/x-sh with no-cache, and added to the
crawl gateway's openPaths so curl never meets a 402. The line is in the
README, the CLI README, /docs/cli and llms.txt. A test pins the route,
the content type and the open path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio

Copy link
Copy Markdown
Contributor Author

Leaving this open. CI test fails in test/screen-thetvdb-catalog.test.js (3 tests under "the first pass"). The failure was there before this PR, which does not touch the file, and a rerun failed the same way. The cause is that the fixture login JWT's exp is 1791915321 (2026-10-13 18:15 UTC). The adapter renews any token within a day of expiry, so since 2026-10-12 18:15 UTC the fixture token counts as nearly dead, and the tests see extra logins. main will fail the same way on its next run. The fix is a fixture token with a far-future exp (and updating the 1791915321000 assertions). Once that is on main, this PR can be rebased and merged.

ralyodio and others added 2 commits October 13, 2026 00:08
When ~/.bun/install/global/package.json is missing, bun add -g writes the
package into the nearest package.json above that directory, which can be
the user's ~/package.json. Create the dir and an empty {} first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit f17c23c into main Oct 13, 2026
3 checks passed
@ralyodio
ralyodio deleted the feat/curl-install branch October 13, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant