Diagent Cli
Description
CLI for encoding and decoding Diagent diagram URLs. Includes Claude Code skill.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
@diagent/cli
Command-line tool to encode and decode Diagent shareable diagram URLs. Designed for agents (Claude Code, Cursor) and humans alike.
By default, `diagent encode` produces a **short URL** like `https://diagent.dev/d/abcdefghij` (~31 chars, constant size regardless of diagram complexity). This works by calling the Diagent backend's `POST /api/s` endpoint, which stores the Mermaid in Cloudflare KV and returns a content-addressed short ID.
If the backend is unreachable (dev, offline, rate-limit, Cloudflare outage), `diagent encode` **automatically falls back** to an inline URL of the form `https://diagent.dev/?code=`, which carries the full Mermaid source in the `code` query parameter. The feature never fully breaks — worst case, you get a longer URL and a stderr notice. Pass `--inline` to skip the backend entirely and always produce the inline format.
Install
**From npm:**
npx -y @diagent/cli --help
# or install globally
npm install -g @diagent/cli
**From source (contributors):**
cd cli
npm install
npm run build
npm link # puts `diagent` on your global PATH
Usage
diagent encode [FILE] [--base-url URL] [--inline]
Encode Mermaid from FILE or stdin -> URL on stdout
(tries backend short URL, falls back to inline)
diagent decode Decode inline ?code= URL -> Mermaid source on stdout
diagent decode - Decode URL read from stdin
diagent --help Show help
diagent --version Show version
**Encode from stdin (produces a short URL):**
cat flow.mmd | diagent encode
# https://diagent.dev/d/kwtsgx5o24
**Encode from a file:**
diagent encode flow.mmd
**Force inline format (skip backend):**
diagent encode flow.mmd --inline
# https://diagent.dev/?code=GYGw9g7gxg...
**Encode against a
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11