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 initAdd an extension:
pnpm dlx dashfy@latest add @dashfy/githubAddresses
You reference extensions by address:
| Address | Resolves to |
|---|---|
github | the @dashfy namespace (default) → …/r/github.json |
@dashfy/github | the @dashfy namespace explicitly |
@acme/widget | a custom namespace declared in dashfy.json |
https://example.com/r/foo.json | a direct URL |
./local/foo.json | a local registry file |
owner/repo/foo | a 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.
| Flag | Description |
|---|---|
-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-install | Skip installing npm dependencies. |
-y, --yes | Accept defaults / skip prompts. |
pnpm dlx dashfy@latest init my-app -t vite-appdashfy 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.
| Flag | Description |
|---|---|
-c, --cwd <cwd> | Working directory. |
--no-install | Skip installing npm dependencies (set up only). |
--dry-run | Print what would be added without writing anything. |
-y, --yes | Accept 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.
| Flag | Description |
|---|---|
-c, --cwd <cwd> | Working directory. |
--keep-deps | Leave npm dependencies installed (setup-only removal). |
--dry-run | Print what would be removed without writing anything. |
-y, --yes | Skip 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 gitMachine-readable report for CI:
pnpm dlx dashfy@latest search @dashfy --json| Flag | Description |
|---|---|
[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). |
--json | Output 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 githubMachine-readable report for CI:
dashfy docs @dashfy/github --jsondashfy 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 --jsondashfy 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 doctorMachine-readable report for CI:
pnpm dlx dashfy@latest doctor @dashfy/github --jsonGlobal 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, anddoctoralso 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"
}
}registriesare merged over the built-in@dashfynamespace. A registry endpoint is a URL template containing{name}, or an object withurlplus optionalparams/headers(values may reference${ENV_VAR}for auth).pathstake 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
.envCLI behavior can also be tuned with:
DASHFY_REGISTRY_URL— base URL/dir for@dashfyitems (offline/dev).DASHFY_REGISTRIES_URL— location of the discovery index (registries.json).DASHFY_TEMPLATE_DIR/DASHFY_GITHUB_URL— template source forinit.
More
- Registry —
registry add/remove/build/validateand authoring. - MCP server —
dashfy mcpfor AI assistants.