Reference

CLI Reference

@tailor-app/cli v0.13.1 — command groups for document management, review workflows, signing, page publishing, and multi-agent collaboration.

Installation

Terminal
npm install -g @tailor-app/cli
tailor --help

Requires Node.js 20+. Verify with tailor --version.

Authentication

Environment Variable (recommended for agents & CI/CD)

bash
export TAILOR_API_KEY=tailor_sk_YOUR_KEY
tailor list   # works immediately — no login needed

No tailor login needed. Env vars override stored config. TAILOR_BASE_URL defaults to https://api.tailor.au — the API host. The web app at https://tailor.au is a different host and will return HTML if the CLI hits it by mistake.

Store API Key to Disk

bash
tailor login --key tailor_sk_YOUR_KEY

Verify Current Auth

bash
tailor login --check

Non-interactive — validates your current API key or token and shows the source (env var or config file).

Magic Link (for humans in a terminal)

bash
tailor login --email you@company.com

Opens a browser for one-click sign-in, or enter the 6-digit code manually. Requires a TTY.

Connect

2 subcommands

tailor connect generates a ready-to-paste connector config for any AI runtime and (for supported MCP hosts) writes the config file directly. Mirrors the public connector hub at /connect.

tailor connect <platform>[--write] [--name <n>] [--scopes <list>]

Generate a connector config for the platform (cursor, claude-desktop, claude-api, codex, windsurf, mcp, openai-gpt, ...). Use --write to install supported local MCP configs automatically.

tailor connect platforms

List the connector platforms supported by your Tailor instance (mirrors GET /api/connect/platforms).

Examples

List all platforms
tailor connect platforms
Install Cursor MCP into ~/.cursor/mcp.json
tailor connect cursor --write
Print remote MCP config for Claude API
tailor connect claude-api
Install Codex stdio MCP into ~/.codex/config.toml
tailor connect codex --write
The CLI talks to the API host https://api.tailor.au by default. Override with TAILOR_BASE_URL for self-hosted or local dev.

Documents

6 commands
tailor upload<files...>

Upload documents (DOCX, PDF, MD, HTML) or entire folders.

tailor list

List documents with pagination and tag filtering.

tailor status<docId>

Show status, reviewers, comment/change counts.

tailor download<docId>

Download a document binary.

tailor attach<docId> <files...>

Attach supporting reference documents.

tailor tagadd | remove | list

Tag and organise documents.

upload options

--shareCreate shareable links after upload
--permission <perm>ReadOnly, CommentOnly, or FullReviewFullReview
--publicNo email verification required
--access <mode>open, closed-individual, or closed-orgopen
--reviewers <emails>Comma-separated reviewer emails
--domain <domain>Allowed email domain (e.g. tailor.au)
--jsonOutput as JSON

Examples

Upload a folder + create share links
tailor upload ./deliverables/ --share --permission CommentOnly
List documents filtered by tag
tailor list --tag compliance --json | jq '.data[].title'

Docs API

3 commands

Read and update document content programmatically. Pipe-friendly for AI agents and CI scripts.

tailor docs get<docId>

Read document content as Markdown (or JSON with --format json).

tailor docs update<docId>

Update document content from --file or stdin (HTML, MD, DOCX).

tailor docs list

List documents with pagination and tag filtering.

Examples

Read document as Markdown
tailor docs get <docId>
Update from a local file
tailor docs update <docId> --file report.html
Pipe HTML from a build step
cat one-pager.html | tailor docs update <docId> --html

Collaboration

4 commands
tailor share<docId>

Create a shareable review link with access controls.

tailor commentslist | add | resolve

View, add, or resolve comments on a document.

tailor reviewslist | accept | submit

Manage review invitations and submissions.

tailor changes<docId>

View tracked changes (insertions, deletions, formatting).

share options

--permission <perm>ReadOnly, CommentOnly, or FullReviewFullReview
--publicNo email verification required
--access <mode>open, closed-individual, or closed-orgopen
--reviewers <emails>Comma-separated emails (for closed-individual)
--domain <domain>Allowed domain (for closed-org)

Examples

Restricted share link
tailor share abc123-def456 --access closed-org --domain logan.qld.gov.au
List open comments
tailor comments list abc123-def456 --unresolved

Pages

3 commands

Publish HTML at clean public URLs (/p/<slug>).

tailor pages publish<file> --slug <slug>

Publish an HTML file at /p/<slug>.

tailor pages list

List your published pages.

tailor pages unpublish<slug>

Remove a published page.

Examples

Publish a one-pager
tailor pages publish product-universe.html --slug product-universe

Signing

6 commands

Request and manage document signatures. Documents must be in ReviewFinalised status before requesting signatures.

tailor sign request<docId>

Request signatures (e.g. --signatories 'Name:email@corp.com').

tailor sign status<requestId>

Check signing progress and signatory status.

tailor sign cancel<requestId>

Cancel a pending signature request.

tailor sign submit<token>

Submit a signature using an access token (from email link).

tailor sign decline<token>

Decline to sign with an optional --reason.

tailor sign view<token>

View signing page details for an access token.

Examples

Request signatures
tailor sign request <docId> --signatories "Rick:rick@corp.com"
Check status
tailor sign status <requestId>

Agents (PACT)

46 subcommands

The tailor tap command group implements PACT — the Protocol for Agent Consensus and Truth — enabling AI agents to collaboratively review and edit documents.

Document

join, leave, get, sections, agents, events

Proposals

propose, proposals, approve, reject, object

ICS

intent, constrain, salience, salience-map

Live

poll, watch, done, completions, lock, unlock

Escalation

escalate, ask-human, respond, resolve

Barriers

classify, clearances, frameworks

Quick example — full agent cycle

Agent: join → read → propose → leave
# Join as an agent
tailor tap join <docId> --as "compliance-bot" --role editor

# Read the document and section tree
tailor tap get <docId>
tailor tap sections <docId>

# Declare intent before writing
tailor tap intent <docId> --section sec:liability \
  --goal "Add currency risk language" --category compliance

# Check constraints from other agents
tailor tap constraints <docId> --section sec:liability

# Propose a change
tailor tap propose <docId> --section sec:liability \
  --content "## Liability\n\nRevised clause with currency risk..." \
  --summary "Added currency risk allocation"

# Signal done and leave
tailor tap done <docId> --status aligned --summary "Compliance review complete"
tailor tap leave <docId>

Account

3 commands
tailor login

Authenticate with Tailor via API key, magic link, or interactive prompt.

tailor keyscreate | list | revoke

Create, list, and revoke API keys.

tailor adminlogin | create-org | list-orgs | ...

Organisation, user, domain, and BYOK management.

keys create options

--name <name>Key name (e.g. "CI Pipeline")required
--scopes <scopes>Comma-separated scopesdocuments:read,documents:write
--expires <days>Days until expiry365
--no-saveDon't auto-save key to CLI config

Examples

Create a scoped API key
tailor keys create --name "CI Pipeline" --scopes documents:read --expires 90

Global Options

FlagDescription
--jsonMachine-readable JSON output (most commands)
-V, --versionShow version number
-h, --helpShow help for any command or subcommand

Configuration

~

Config stored at ~/.config/@tailor-app/cli/config.json

Environment variables take precedence over stored config:

  • TAILOR_API_KEYoverrides stored API key
  • TAILOR_BASE_URLoverrides stored base URL (default: https://api.tailor.au)