# Draft CLI Dev

> Use the repo-local Draft CLI for development and testing with an isolated development port. Trigger this skill when working on `products/notion-editor/cli`, testing local Draft CLI changes, or avoiding collisions with an installed/global Draft CLI.

- Skill: `innosage-llc/draft-cli-dev` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add innosage-llc/draft-cli-dev`
- Raw SKILL.md: https://api.skillmd.com/api/skills/innosage-llc/draft-cli-dev/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: innosage-llc (https://skillmd.com/u/innosage-llc)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/innosage-llc/draft-cli-dev

---


# Draft CLI Dev

Use this skill when developing or testing Draft CLI from this repository rather than using the
installed global `draft` binary.

## Contract

- Prefer the repo-local CLI under `products/notion-editor/cli`.
- Use development port `31414` by default.
- The only live-page runtime is headless v2.

## Entry Point

```bash
skills/draft-cli-dev/scripts/run-local-draft.sh <draft-args...>
```

The wrapper:

- resolves the repository root
- targets `products/notion-editor/cli/bin/draft.js`
- builds the local CLI when `dist/index.js` is missing or stale
- injects `--port 31414` unless the command already specifies `--port` or `-p`

## Common Commands

```bash
skills/draft-cli-dev/scripts/run-local-draft.sh status --json
skills/draft-cli-dev/scripts/run-local-draft.sh start-server
skills/draft-cli-dev/scripts/run-local-draft.sh page ls --json
skills/draft-cli-dev/scripts/run-local-draft.sh stop-server
```

If status reports `DAEMON_OFFLINE`, run `start-server` and then re-check status. A `READY` state is
enough for headless page commands.

