Skill v1.0.1
currentAutomated scan95/1008 files
version: "1.0.1" name: cli description: Use the @farming-labs/docs CLI to scaffold, upgrade, downgrade, deploy, audit, review, export or compact agent docs, validate code blocks, generate discovery files, sync search indexes, and run MCP. Use for init, deploy, upgrade, downgrade, doctor, review, agent export, agent compact, codeblocks validate, agents generate, sitemap generate, robots generate, search sync, mcp, and their flags. compatibility: Requires Node.js and npm, pnpm, Yarn, or Bun. Package installation, hosted deployment, and external search commands require network access and provider credentials.
Use the @farming-labs/docs CLI
Choose the smallest command that satisfies the request, preview its effects when possible, and verify the resulting project or generated output.
Workflow
- Confirm the app/package root, framework, package manager, config path, and whether the request
allows writes, network access, or deployment.
- Inspect
package.json, the lockfile, anddocs.config.ts[x]. In a monorepo, work from the app
containing the framework dependency.
- Select the command and read only its focused reference below.
- Prefer
--dry-run,--check, or--planbefore a material write when the command supports it. - Run the command with the project's package manager. Never place raw credentials in config,
generated JSON, logs, or the command line when an environment-variable mechanism exists.
- Verify changed files, package versions, generated manifests, or the affected route.
- Report what changed, the verification result, and any manual follow-up.
Invocation
For one-off commands, use the matching package-manager runner:
| Package manager | Latest CLI | |
|---|---|---|
| npm | npx @farming-labs/docs@latest <command> | |
| pnpm | pnpm dlx @farming-labs/docs@latest <command> | |
| Yarn | yarn dlx @farming-labs/docs@latest <command> | |
| Bun | bunx @farming-labs/docs@latest <command> |
Inside an installed project, pnpm exec docs <command> (or its package-manager equivalent) uses the local version. Prefer the local binary for config-sensitive validation and generation.
Command routing
All references are one hop from this file.
| Request | Read | |
|---|---|---|
| Scaffold, framework templates, init flags, upgrade, downgrade, generated files | Init and package versions | |
| stdio/hosted MCP setup, Docs Cloud deploy, Typesense or Algolia sync | MCP, cloud, and search | |
| Code-fence execution planning and docs PR review | Validation and review | |
| Sitemap, Agent Bundle, compaction, AGENTS.md, or robots.txt generation | Agent and static outputs | |
| Agent/site readiness audits, hosted probes, JSON reports | Doctor audits |
Common commands
pnpm dlx @farming-labs/docs@latest initpnpm dlx @farming-labs/docs@latest upgrade --dry-runpnpm exec docs review --cipnpm exec docs doctor --agentpnpm exec docs agent export --checkpnpm exec docs sitemap generate --check
Selection rules
- Use
initfor a new docs app or to add docs to an existing supported app. - Use
upgrade --dry-runbefore changing Farming Labs packages in a monorepo. - Use
downgrade --versiononly for a lower version; useupgrade --versionfor a newer one. - Use
docs reviewfor changed documentation anddocs doctor --agentfor whole-site readiness. - Use
agent export --check,sitemap generate --check,robots generate --check, or
agents generate --check to validate committed static outputs.
- Use
codeblocks validate --planbefore executing runnable documentation examples. - Use local
docs mcpfor stdio. Usemcp setup --deploymentto generate a hosted HTTP client
entry; do not generate a recursive setup command.
Safety
- Do not run
initin the wrong directory or over an unrelated app. - Do not execute deploy, sync, install, upgrade, downgrade, or generated-file writes when the user
requested only an explanation or audit.
- Keep
DOCS_CLOUD_API_KEY, search admin keys, and runner tokens in the environment. - Treat
--forceas destructive: inspect the existing managed file before using it. - Do not use arbitrary documented shell snippets as validation.
docs doctorcommand health is
static; executable examples require explicit code-block validation configuration.
Verification and recovery
- Inspect
git diffafter any write. - Run the app's typecheck/build after scaffolding or package changes.
- Run the corresponding
--checkcommand after generation. - If framework detection is wrong, pass
--frameworkfrom the app package root. - If the binary is unavailable in this repository while dogfooding, build
@farming-labs/docs and call its built CLI; installed consumer projects can call docs.
- If a cloud or search command fails, verify the named environment variable and endpoint without
printing its value.
Full human documentation: CLI and Token efficiency.