clipwright/cli/README.md
pedro-bento 09a0c58e14 chore: simplify repo — drop agent skills, n8n examples, ops/hallmark and demo assets
- Remove skills/, examples/, ops/, .hallmark/, CLAUDE.md, docs/dsa-notice,
  unused demo gifs + demo video and the n8n SEO page/assets
- Untrack .opencode and ignore it (.opencode/, .pytest_cache/, .hallmark/)
- Fix all dangling references (README, cli, SEO pages/fallback, retention doc)
- Keep assets/watermark.png, docs/compliance, design.md, screenshots, cli
2026-10-04 20:13:21 +01:00

55 lines
1.9 KiB
Markdown

# Clipwright CLI
Clip long videos into vertical 9:16 shorts from the terminal. Zero
dependencies; talks to the same self-hosted REST API the dashboard uses.
```bash
pip install clipwright # or: uvx clipwright / pipx run clipwright
```
## Use it against your own instance
Clipwright is free, open source under MIT and self-hosted with Docker. There is
no hosted edition and no paid plan, so there is no account to create. Point the
CLI at your instance:
```bash
export CLIPWRIGHT_API_URL=http://localhost:8000
clipwright process "https://youtube.com/watch?v=..." --wait
clipwright clips <job_id>
clipwright publish <job_id> 0 --platforms tiktok,youtube
clipwright quota
```
Self-hosted instances are open by default and need no API key. You do need a
Google Gemini key: put it in the server's environment, or send it per call as an
`X-Gemini-Key` header. If you put your own instance behind a key, the CLI sends
`CLIPWRIGHT_API_KEY` (`clw_...`) as a bearer token.
## Publish through Postiz
Publishing goes through your self-hosted Postiz instance. Pass the base URL and
API key with `--postiz-url` / `--postiz-key`, or set `POSTIZ_URL` /
`POSTIZ_API_KEY`; the CLI forwards them to the server as `X-Postiz-Url` /
`X-Postiz-Key`.
```bash
clipwright publish <job_id> 0 --platforms tiktok,youtube \
--postiz-url https://postiz.example.com --postiz-key <key>
```
## Quota
`clipwright quota` prints the instance config it reads from `GET /api/config`:
the job-retention window, whether YouTube-URL ingest is enabled, and the
local-LLM setting. A self-hosted instance has no minute quota, so none is
reported.
## Pipelines and webhooks
Prefer the webhook to `--wait`: pass `--webhook` and `--webhook-secret` and
Clipwright POSTs once (HMAC-signed, `X-Clipwright-Signature: sha256=<hex>`) when
the job ends, with each clip's title and `video_url`. Set `PUBLIC_API_URL` on
the server so those links are absolute; otherwise they are relative to your
instance.