@hecto/cli
v3.0.0
Published
Hecto source catalogue and command-line interface.
Readme
@hecto/cli
The Hecto CLI copies editable component and chart source. Package installation stays with npm, pnpm, Yarn, or Bun.
pnpm dlx @hecto/cli init --framework react --yes
pnpm dlx @hecto/cli add ui/button --yes
pnpm dlx @hecto/cli list
pnpm dlx @hecto/cli show ui/buttonThe browser-safe catalogue is available from @hecto/cli/catalogue.
Server generators (hecto g, hecto graph)
hecto g module <name> and hecto g resource <name> scaffold an @hecto/server
module (a typed GET / for module; a full in-memory CRUD module for resource) plus its test,
written to <dir>/<name>.ts and <dir>/<name>.test.ts (default --dir src/modules);
--file-routes writes routes/<name>/module.ts + route.ts instead. --dry-run prints the plan
without writing; --yes writes it; an existing file with different content refuses without
--overwrite.
hecto g module widgets --dry-run
hecto g resource tasks --yeshecto graph <entry> [--format mermaid|json] [--export app] imports your entry file (run it
with bun for a TypeScript entry) and prints toMermaid(inspectDefinition(entry[--export])) from
@hecto/server/inspect — the CLI does not depend on @hecto/server itself; it reaches
the graph through whatever your entry already imports.
