DESIGN.md from your shell.
dmdg-cli turns a local project or a GitHub repository into a DESIGN.md file, using the same extraction as the web app, without leaving your editor.
$ npm install -g dmdg-cli added 1 package in 2s $ dmdg login dmd_9f2c41ab โ Token saved securely. Run `dmdg whoami` to verify your account. $ dmdg whoami โ Logged in as ben (GitHub ID: 1284773) $ dmdg generate ./src ๐ Found 24 source file(s). Sending to API for AI-powered extraction... โ DESIGN.md written to DESIGN.md (18432 characters)
Files are read locally and only the contents are uploaded. The document is written back to your working tree.
dmdg-cli on npmFour commands, end to end.
Install the terminal client globally or run it through npx.
npm install -g dmdg-cliCreate a token in Account, then save it locally with restricted permissions.
dmdg login <token>Check that the CLI is signed in to your account.
dmdg whoamiScan a project locally and write a DESIGN.md file.
dmdg generate ./src Your token is stored locally in ~/.config/design-md/config.json with 0600 permissions, never in project files or command URLs.
Commands.
dmdg login <token>- Save your API token locally
dmdg logout- Remove the saved API token
dmdg whoami- Show the authenticated GitHub user
dmdg generate <path>- Generate DESIGN.md from local files
dmdg generate <repo> --repo- Generate DESIGN.md from a GitHub repo
dmdg init [dir]- Scaffold a .designmdrc config file
dmdg init [dir] --template- Also create a starter DESIGN.md template
Options
dmdg generate <path> --repo # Treat path as owner/repo
dmdg generate <path> -o <file> # Output file (default: DESIGN.md)What runs when.
- 01 Scan
Recursively discovers supported files in the target directory.
- 02 Read
Reads raw file contents locally on your machine.
- 03 Send
Uploads file contents with your bearer token.
- 04 Extract
Server parses colors, fonts, spacing, shadows, components.
- 05 Enhance
AI enrichment produces a structured DESIGN.md.
- 06 Write
The document lands on your filesystem, ready to commit.
The CLI is a thin client: parsing, normalization, and AI enhancement all happen server-side.
Project config.
dmdg init ./my-project --templateDrops a .designmdrc in the target directory so file discovery stays explicit. It is
discovered automatically on every generate.
{
"include": ["src/**/*.{css,scss,html}", "*.{css,scss,html}"],
"exclude": ["node_modules", "dist", "build"],
"output": "DESIGN.md"
}What gets sent.
.css.scss.less.sass.html.htmtailwind.config.*postcss.config.*vite.config.*svelte.config.*package.jsonFiles above 10 MB are skipped with a warning instead of failing the run.
Always ignored.
node_modules.gitdistbuild.svelte-kit.nextoutcoverage.wrangler Add your own patterns to exclude in .designmdrc.
Variables & alternatives.
DESIGN_MD_TOKENAPI token, as an alternative to dmdg login.
DESIGN_MD_API_BASEAPI base URL. Defaults to the public instance.
npx dmdg-cliRun without installing anything globally.
Prefer the browser? The web app extracts from a URL, repo, image, or written brief.
Back to the extractor