Skip to main content

CLI reference

The Docify CLI (@devdocify/cli) provides commands for local development, content validation, SEO analysis, project scaffolding, and configuration management.

Installation​

npm install -g @devdocify/cli

Global flags​

FlagDescription
-v, --versionPrint the installed CLI version
-h, --helpPrint help for a command

docify dev​

Starts the local development server. Detects the package manager in use (pnpm, yarn, bun, or npm) and runs the start script.

Requires: a docusaurus.config.ts or docusaurus.config.js in the current directory.

docify dev

The command streams all output from the underlying build process. Press Ctrl+C to stop the server.


docify build​

Builds the documentation site for production. Detects the package manager and runs the build script.

Requires: a docusaurus.config.ts or docusaurus.config.js in the current directory.

docify build

Output is written to the build/ directory. Exits with code 1 if the build fails.


docify validate​

Runs the lint-content script defined in package.json.

Requires: a docusaurus.config.ts or docusaurus.config.js in the current directory.

docify validate

Add a lint-content script to package.json to integrate your linter of choice (Vale, markdownlint, or custom scripts).


Builds the site and parses the build output for broken link errors reported by Docusaurus. Prints each broken source page and its unresolvable target.

Requires: a docusaurus.config.ts or docusaurus.config.js in the current directory.

docify broken-links

Exits with code 1 if any broken links are found.


docify new <directory>​

Scaffolds a new DevDocify project in <directory>. Creates the directory and writes the following files:

  • package.json
  • docusaurus.config.ts
  • sidebars.ts
  • docs/index.md
  • src/css/custom.css
  • .gitignore
docify new my-docs

Does not require a DevDocify project to be present in the current directory.


docify update​

Updates the CLI to the latest published version.

docify update

Runs npm install -g @devdocify/cli@latest. Does not require a DevDocify project to be present.


docify score <url>​

Fetches a URL and checks for six SEO signals. Prints a tick or cross for each check and returns a score out of 6.

docify score https://your-docs-site.example.com/docs

Checks performed:

CheckWhat it looks for
Title tag<title> element present and non-empty
Meta description<meta name="description"> with non-empty content
Canonical link<link rel="canonical"> present
og:title<meta property="og:title"> present
og:description or og:imageAt least one of the two OG tags present
Robots or sitemap<meta name="robots"> present, or sitemap.xml returns 200

docify analytics​

Prints guidance for accessing Algolia search analytics.

docify analytics

The command makes no network requests. It prints the Algolia dashboard URL and describes what analytics are available.


docify a11y​

Prints guidance for running accessibility tests with axe-core.

docify a11y

The command makes no network requests. It explains how to run npx axe-cli <url> against a local or deployed site.


docify config​

Reads and writes CLI configuration stored in ~/.docify/config.json.

List all config​

docify config

Read a single value​

docify config <key>

Set a value​

docify config <key> <value>

Example:

docify config defaultPm pnpm

Reset all config​

docify config --reset

Project detection​

Most commands require the current directory to contain a docusaurus.config.ts or docusaurus.config.js file. If neither file exists, the command prints an error and exits with code 1.

Commands that skip this check: new, update, config, score, analytics, a11y.


Package manager detection​

docify dev, docify build, docify validate, and docify broken-links detect the package manager by checking for lock files in the current directory:

Lock filePackage manager used
pnpm-lock.yamlpnpm
bun.lockbbun
yarn.lockyarn
(none found)npm