CLI

The dashfy CLI scaffolds dashboards, manages extensions, and audits your project.

The dashfy CLI helps you create a new Dashfy project and add extensions (widgets + data sources) to an existing one.

Scaffold a project:

pnpm dlx dashfy@latest init

Add an extension:

pnpm dlx dashfy@latest add @dashfy/github

Addresses

You reference extensions by address:

AddressResolves to
githubthe @dashfy namespace (default) → …/r/github.json
@dashfy/githubthe @dashfy namespace explicitly
@acme/widgeta custom namespace declared in dashfy.json
https://example.com/r/foo.jsona direct URL
./local/foo.jsona local registry file
owner/repo/fooa registry item in a GitHub repo (#ref optional)

dashfy init|create [name]

Scaffolds a runnable Dashfy app (a framework client + Node server + configuration). create is an alias for init.

FlagDescription
-t, --template <template>vite-starter (default), vite-app, astro-starter, astro-app, next-starter, next-app, react-router-starter, react-router-app, start-starter, or start-app.
-e, --extensions <names>Comma-separated extensions to set up (*-starter only).
-c, --cwd <cwd>Working directory.
--no-installSkip installing npm dependencies.
-y, --yesAccept defaults / skip prompts.
pnpm dlx dashfy@latest init my-app -t vite-app

dashfy add [extensions...]

Resolves the extension address(es), installs the @dashfy/ext-* package(s), and sets them up automatically (widgets in App.tsx, server API in your bootstrap, .env entries, and a starter block in dashfy.config.yml). With no arguments, add prompts you to pick from the catalog. See Extensions.

FlagDescription
-c, --cwd <cwd>Working directory.
--no-installSkip installing npm dependencies (set up only).
--dry-runPrint what would be added without writing anything.
-y, --yesAccept defaults / skip prompts.

dashfy remove [extensions...]

Reverses what add set up. Removal is registry-first and idempotent, and it falls back to deriving the setup from your project when the registry is unreachable.

FlagDescription
-c, --cwd <cwd>Working directory.
--keep-depsLeave npm dependencies installed (setup-only removal).
--dry-runPrint what would be removed without writing anything.
-y, --yesSkip the confirmation prompt.

dashfy search [registries...]

Searches extension catalogs and prints matches (aliased as dashfy list). Queries are fuzzy-matched and ranked across name, title, description, and categories, and each result includes a ready-to-run add command.

Search for extensions:

pnpm dlx dashfy@latest search --query git

Machine-readable report for CI:

pnpm dlx dashfy@latest search @dashfy --json
FlagDescription
[registries...]Registry namespace(s) to search (defaults to all configured).
-q, --query <query>Filter by name, title, description, or category.
-t, --type <type>Filter by item type (e.g. registry:extension).
-l, --limit <n>Max items per registry (default 100).
-o, --offset <n>Items to skip (default 0).
--jsonOutput as JSON.

dashfy view <items...>

Resolves the given address(es) and prints the full registry item JSON (deps, env vars, widgets, starter config) — useful for inspection and piping:

pnpm dlx dashfy@latest view @dashfy/github | jq '.dependencies'

dashfy docs <extensions...>

Resolves the extension(s) and prints setup-oriented documentation: setup notes, required env vars, how it integrates into your app and server, the starter dashboard it seeds, and a ready-to-run install command.

View documentation for an extension:

dashfy docs github

Machine-readable report for CI:

dashfy docs @dashfy/github --json

dashfy info

Prints a snapshot of the current project: detected files, dashfy.json paths, configured registries, installed ext-* packages, and useful links.

pnpm dlx dashfy@latest info --json

dashfy doctor [extensions...]

Diagnoses the project and verifies each extension is fully set up. Exits non-zero when any check fails, making it suitable as a CI gate. Falls back to inspecting source files when the registry is unreachable.

Auto-detect installed extensions:

pnpm dlx dashfy@latest doctor

Machine-readable report for CI:

pnpm dlx dashfy@latest doctor @dashfy/github --json

Global flags

These apply to every command:

  • --json — emit machine-readable JSON only and suppress human output. Place before the command (e.g. dashfy --json add @dashfy/github); info, search, view, docs, and doctor also accept it after the command.
  • --silent — mute non-error output.

Project configuration (dashfy.json)

dashfy init writes a dashfy.json, and add reads it. It declares where the CLI applies changes and any custom registries:

{
  "$schema": "https://dashfy.dev/schema.json",
  "registries": {
    "@acme": "https://acme.com/r/{name}.json"
  },
  "paths": {
    "app": "src/App.tsx",
    "server": "dashfy.server.ts",
    "config": "dashfy.config.yml",
    "env": ".env"
  }
}
  • registries are merged over the built-in @dashfy namespace. A registry endpoint is a URL template containing {name}, or an object with url plus optional params / headers (values may reference ${ENV_VAR} for auth).
  • paths take precedence over the CLI's heuristic file discovery.

Environment variables

init, add, and registry add load .env files before resolving registries (so ${ENV_VAR} auth works), in this precedence order — first match wins, existing process env is never overridden:

.env.local
.env.development.local
.env.development
.env

CLI behavior can also be tuned with:

  • DASHFY_REGISTRY_URL — base URL/dir for @dashfy items (offline/dev).
  • DASHFY_REGISTRIES_URL — location of the discovery index (registries.json).
  • DASHFY_TEMPLATE_DIR / DASHFY_GITHUB_URL — template source for init.

More

  • Registryregistry add/remove/build/validate and authoring.
  • MCP serverdashfy mcp for AI assistants.
Loading Dashfy...