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 to cli/dist/hub).
  • apps/web/ — The public documentation website and landing page (built with Astro).

Contributor Setup

  1. Clone the repository:
    git clone git@github.com:martijnbokma/chain-hub.git
  2. Install dependencies (using Bun):
    cd chain-hub
    bun install
  3. Run the CLI in development mode: Instead of installing the package globally via npm, run the development typescript wrapper directly:
    cd cli
    bun 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 running cli/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