installDacli

About This Task

daCLI ("docs-as-code CLI") gives LLM agents structured access to your AsciiDoc and Markdown documentation — they can read the document structure, fetch a section, search, and edit content instead of grepping files by hand. It works in two modes:

  • a CLI (dacli) for agents with shell access, and

  • an MCP server (dacli-mcp) for MCP-capable clients (Claude Code, IDEs, …).

This task installs daCLI and, if the project has an AGENTS.md or CLAUDE.md, adds a short conditional hint so agents know to use it (see Agent Hint).

Setup and Configuration

daCLI is a Python tool installed with uv. If uv is not on your PATH, the task prints how to install it and stops — it does not fail with a stack trace.

./dtcw4 local installDacli
Note
daCLI is installed straight from its Git repository (uv tool install git+https://github.com/docToolchain/dacli). This is intentional — the PyPI package named dacli is an unrelated project.

To pin a specific ref (tag, branch or commit), set DTC_DACLI_VERSION:

DTC_DACLI_VERSION=v1.0.0 ./dtcw4 local installDacli

Running the MCP Server

After installation you can start the MCP server scoped to this project’s documentation (the task prints the exact command, using your configured inputPath):

dacli-mcp --docs-root src/docs

Register that command with your MCP client to let it navigate and edit the docs.

Agent Hint

When an AGENTS.md or CLAUDE.md exists, the task upserts a short, heading-anchored section into it (idempotent on re-run). The hint is conditional: it points the agent at daCLI only when reading or editing the documentation, references your inputPath, and tells it to run dacli --help first. If neither file exists, the hint is skipped and no agent file is created.

Source

View the source of this task: scripts/installDacli.groovy on GitHub