Command-Line Interface

FlipLink CLI

Create, configure, publish, and manage your flipbooks from the terminal or CI — a thin, scriptable wrapper over the FlipLink REST API.

Installs via npm · 87 commands · JSON output for scripting

Install

terminal
npm install -g fliplink-cli
# or run without installing:
npx fliplink-cli whoami

Requires Node.js 18 or newer.

Authenticate

Get an API key from your FlipLink dashboard → Subscription, then store it:

setup
fliplink config set-key YOUR_API_KEY
fliplink whoami

Or pass it per-invocation (handy in CI — never written to disk):

ci
FLIPLINK_API_KEY=YOUR_API_KEY fliplink flipbook list

Resolution order for every setting: environment variable → config file → built-in default. The stored key lives in ~/.config/fliplink/config.json with chmod 600 permissions.

Common commands

terminal
fliplink flipbook create ./deck.pdf --title "Q3 Report" --name q3
fliplink flipbook create-url https://example.com/deck.pdf --title "Q3 Report"
fliplink flipbook list --search report --page-size 25 --sort-by CreatedOn
fliplink flipbook get <flipbookId>
fliplink flipbook publish <flipbookId>
fliplink flipbook unpublish <flipbookId>
fliplink flipbook set-expiry <flipbookId> --days 30
fliplink flipbook share-link <flipbookId>
fliplink flipbook delete <flipbookId>
fliplink leads list --item <flipbookId> --download true

Run fliplink <command> --help for the flags of any command.

All command groups

Every endpoint is reachable as a named command. Run fliplink <group> --help to list a group's commands.

GroupCovers
flipbookcreate / read / modify / delete + all per-flipbook settings (skin, CTAs, lead capture, access, sharing, sales, tracking, …)
profileget, set
accountsubscription, payments
folderlist
cnameadd, list, delete (custom domains)
teamlist, get, set, set-active, delete
leadslist, delete, delete-bulk
saleslist
lookuptemplates, skins, currencies, background music

Google Sheets endpoints use a different base URL and are reachable via the api escape hatch only.

Scripting

Every command prints a human-readable table by default and raw JSON with --json:

terminal
fliplink flipbook list --json | jq '.[].ID'

Exit codes: 0 success · 1 request/HTTP error · 2 application error (Result: ERROR).

Shell completion

Generate a completion script for your shell:

terminal
source <(fliplink completion zsh)    # add to ~/.zshrc
source <(fliplink completion bash)   # add to ~/.bashrc

Escape hatch — every endpoint, today

Any endpoint not yet wrapped in a friendly command is reachable directly:

terminal
fliplink api GET  /api/list-folders
fliplink api PUT  /api/set-skin/<flipbookId> --data '{"SkinName":"Modern"}'
fliplink api POST /api/create-by-file --file File=./deck.pdf -q Name=deck

Browse every endpoint, its parameters, and responses in the full REST API reference.

How it works

The command surface is generated from the API spec — the same endpoints.json that powers the REST API docs — so the CLI cannot drift from the documented API. Prefer natural language? The same API is also available as an MCP server for AI assistants.

Frequently asked questions

How do I install the FlipLink CLI?

Run npm install -g fliplink-cli (requires Node.js 18+), or use it without installing via npx fliplink-cli whoami.

How do I authenticate in CI?

Pass your key as the FLIPLINK_API_KEY environment variable — for example FLIPLINK_API_KEY=YOUR_KEY fliplink flipbook list. It's never written to disk. Locally you can store it once with fliplink config set-key.

What is the API escape hatch?

Any endpoint not yet wrapped in a friendly command is reachable directly with fliplink api <METHOD> <path>, so the CLI covers the entire REST API from day one.

Can I script the CLI?

Yes. Every command prints a table by default and raw JSON with --json (pipe it to jq). Exit codes are scriptable: 0 success, 1 request/HTTP error, 2 application error (Result: ERROR).

How many commands are there?

87 commands across 9 groups (flipbook, profile, account, folder, cname, team, leads, sales, lookup), generated from the same API spec as the REST API so the CLI cannot drift from the documented endpoints.