pixtex
v0.1.6
Published
Render n8n workflow JSON into share-ready diagrams from your terminal or CI — powered by the Pixtex render API.
Maintainers
Readme
pixtex
Turn n8n workflow JSON into share-ready diagrams — from your terminal or CI.
# get a free key (shown once — store it as PIXTEX_API_KEY)
npx pixtex signup [email protected]
# render a local image
npx pixtex render my-flow.json -o my-flow.png
# host it at a permanent URL and embed it anywhere
npx pixtex push my-flow.jsonpush is the interesting one: it hosts the diagram as a PNG with a stable
URL. Embed that URL in a README, Notion page, or forum post, then re-run
push --id <id> whenever the workflow changes — every embed updates in place.
Your architecture diagrams stop going stale.
# in CI, after the workflow JSON changes:
npx pixtex push flows/order-sync.json --id abc123Commands
| Command | What it does |
|---|---|
| pixtex render <wf.json> | Render to a local png/jpeg/webp/svg/pdf |
| pixtex push <wf.json> | Host as a permanent PNG (--id updates in place) |
| pixtex images | List your hosted images + their URLs |
| pixtex images delete <id> | Delete a hosted image |
| pixtex me | Show quota + usage |
| pixtex signup <email> | Get a free API key |
Every look option from the pixtex.dev editor is available
as a flag — pixtex render --help lists them all. Or export an options JSON
and pass --options file.json.
GitHub Action
Keep the n8n workflow diagram in your README always current. The bundled Action renders your workflow JSON into a hosted image and updates that same image in place on every push — so the picture in your docs never drifts from the actual flow.
- Get a free API key:
npx pixtex signup [email protected](or on pixtex.dev/developers). - Add it as a repo secret named
PIXTEX_API_KEY(Settings → Secrets and variables → Actions → New repository secret). - Add this workflow:
# .github/workflows/pixtex.yml
name: Update workflow diagram
on:
push:
branches: [main]
paths: ['workflows/**.json'] # adjust to where your workflow JSON lives
jobs:
render:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: VicegerentPrince/pixtex@v1
id: pixtex
with:
workflow: workflows/order-sync.json
api-key: ${{ secrets.PIXTEX_API_KEY }}
image-id: ${{ vars.PIXTEX_IMAGE_ID }} # see "First run" below
- run: echo "Updated ${{ steps.pixtex.outputs.image-url }}"First run — capturing the image id
The first time, leave image-id empty so a new hosted image is created,
then read the id from the step output and save it as a repo variable named
PIXTEX_IMAGE_ID (Settings → Secrets and variables → Actions → Variables). Every
run after that reuses it and updates the same URL in place — which is what
keeps your README embed live.
Then embed it in your README once and never touch it again:
Inputs
| Input | Required | Description |
|---|---|---|
| workflow | yes | Path to the n8n workflow JSON file. |
| api-key | yes | Your Pixtex key — pass ${{ secrets.PIXTEX_API_KEY }}. |
| image-id | no | Hosted-image id to update in place. Omit to create a new one. |
| name | no | Display name (defaults to the workflow's own name). |
| options | no | Path to a JSON file of render options (background, palette, layout…). |
| version | no | pixtex CLI version to run (default latest). |
Outputs
| Output | Description |
|---|---|
| image-url | Stable URL of the hosted PNG. |
| image-id | The hosted-image id — save it as PIXTEX_IMAGE_ID after the first run. |
| markdown | Ready-to-paste markdown embed. |
The Action is a thin composite over this same CLI — it runs pixtex push
under the hood. The key travels as an environment variable, never on a command
line or in a URL. No Docker image, no extra dependencies: just npx pixtex.
Lost a URL?
Hosted images are owned by your API key, so nothing is ever lost. Run
pixtex images to list every image you've hosted and its stable URL — or see
them with thumbnails on pixtex.dev/developers.
The only thing to keep safe is your key.
Auth
Set PIXTEX_API_KEY in your environment (in CI, use a secret). The key is sent
as a Bearer header only — never in a URL, never written to disk by the CLI.
Docs
Full API reference: https://pixtex.dev/developers
Built by Muhammad Muneeb.
