Skip to content

npx launcher: make 'npx @libredb/studio' start the standalone server #110

Description

@cevheri

Part of the distribution-channels epic #108.

Problem

@libredb/studio is already published to npm, but only as a library for libredb-platform. There is no way to run Studio itself from npm. A bin entry would make npx @libredb/studio the cheapest possible "try it in one command" story, next to Docker.

Proposal

  • Add a bin entry to package.json pointing at a small launcher script.
  • The launcher starts the Next.js standalone server (or next start against a shipped build), applying the first-run bootstrap from the zero-config issue.
  • Decide how the standalone server build ships in the npm package: include the built server in the published tarball (larger package) or download a release artifact on first run (smaller package, needs network).

Constraints

  • Runtime under npx is Node, not Bun: the bun:sqlite-based SQLite DB provider needs a Node fallback or a clear "SQLite provider requires Bun" message.
  • Package size: the standalone build plus native drivers is large; measure before choosing the shipping strategy.
  • Must not break the existing library consumption by libredb-platform (exports map, tsup dist untouched).

Acceptance criteria

  • npx @libredb/studio on a clean machine (Node >= 24) starts the server and prints the URL plus first-run credentials.
  • Works on Linux, macOS, and Windows.
  • README gains a Quick Start section with the npx one-liner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions