@charter-dev/cli
v0.1.0-alpha.0
Published
CLI for Charter: spec manifest builder
Downloads
23
Readme
@charter-dev/cli
CLI for Charter: spec manifest builder.
Reads .spec.md files from your specs/ folder and produces a single JSON manifest that @charter-dev/react loads at runtime.
Status: v0.1.0-alpha.
Install
pnpm add -D @charter-dev/cliCommands
charter init
Initializes Charter in the current project:
- Creates
specs/routes/example.spec.mdif thespecs/folder is missing - Adds
prebuild/predevscripts topackage.json - Adds
.charter/to.gitignore - Warns if Tailwind CSS is not installed
- Runs the first manifest build
Run once per project.
charter build-manifest
charter build-manifest [--specs-dir ./specs] [--output ./.charter/specs.json] [--watch]Walks specs/ recursively, collects every *.spec.md file, and writes a JSON manifest.
Typically wired as prebuild and predev so your bundler can import the manifest as JSON.
charter build-manifest --watch
Runs the initial build, then watches for changes. Rebuilds on add, change, and unlink.
Spec folder structure
specs/
routes/
hello.spec.md → /hello
nested/page.spec.md → /nested/page
components/
counter.spec.md → components/counter
shared/
privacy.spec.md → shared/privacyspecs/routes/*.spec.md files map to URL paths. Other subfolders keep their path prefix.
Manifest format
{
"version": "0.1.0",
"generatedAt": "2026-04-20T10:00:00.000Z",
"specs": {
"/hello": {
"path": "routes/hello.spec.md",
"title": "/hello",
"content": "# /hello\n\n..."
},
"components/counter": {
"path": "components/counter.spec.md",
"title": "components/counter",
"content": "..."
}
}
}License
MIT
