Reference & CLI
Local development
On this page
If you are developing features, fixing bugs, or adding new adapter support to Chain Hub, you should run the project from a local clone of the git repository.
Repository Layout
Chain Hub is structured as a monorepo containing the following components:
cli/— The Core TypeScript CLI (built with Commander, packaged and compiled to JS).apps/hub/— The React-based dashboard UI (built with Astro + React SPA, compiled tocli/dist/hub).apps/web/— The public documentation website and landing page (built with Astro).
Contributor Setup
- Clone the repository:
git clone git@github.com:martijnbokma/chain-hub.git
- Install dependencies (using Bun):
cd chain-hubbun install
- Run the CLI in development mode:
Instead of installing the package globally via npm, run the development typescript wrapper directly:
cd clibun run dev -- --help
Running the Dashboard locally
When styling or building features for the dashboard SPA (apps/hub), you can launch the Vite/Astro dev server to preview changes instantly:
cd apps/hub
bun run dev
This starts two watch processes:
- Astro dev server on
http://127.0.0.1:4321. - A proxy that redirects dashboard
/api/*endpoints to the active development watcher runningcli/chain.ts hub.
Verification & Testing
Before creating a Pull Request, run the local verification suite:
# Run unit tests in the CLI directory
cd cli
bun test
# Run build typechecking
cd apps/hub
bun run typecheck