Getting Started with the FlipLink CLI

Install the FlipLink CLI, authenticate, and turn a PDF into a published, shareable flipbook from your terminal in a few commands.

Sumit Ghugharwal
Sumit Ghugharwal

Published on June 21, 2026 · 5 min read

Share this post:

If you live in the terminal, clicking through a dashboard to publish a flipbook feels like a detour. The FlipLink CLI lets you do the whole thing — create, publish, and share — without leaving your shell. It's a thin, scriptable wrapper over the FlipLink API, so anything you can do with an HTTP request, you can do with a single command.

This guide gets you from zero to a published, shareable flipbook in about five minutes. By the end you'll have the CLI installed, authenticated, and producing a public URL straight from a PDF.

Install the CLI

The CLI ships as an npm package and needs Node.js 18 or newer. Install it globally so the fliplink command is available everywhere:

npm install -g fliplink-cli

Prefer not to install anything permanently? You can run any command on demand with npx:

npx fliplink-cli whoami

Either way, the same command surface is available. The rest of this guide assumes a global install.

Set Your API Key

Every command authenticates with your FlipLink API key. Grab one by signing in at https://go.fliplink.me and opening the Subscription page.

Store the key once and the CLI remembers it:

fliplink config set-key YOUR_API_KEY

This writes the key to ~/.config/fliplink/config.json with 600 permissions, so only your user can read it. For CI/CD or scripts where you'd rather not write a config file, set an environment variable instead:

export FLIPLINK_API_KEY=YOUR_API_KEY

The CLI resolves credentials in this order: the FLIPLINK_API_KEY environment variable first, then the config file. Treat the key like a password — never commit it to a repo. If you want the deeper background on how this header-based auth works, the API glossary entry is a good primer.

Confirm You're Connected

Before doing anything else, run a quick health check. whoami calls the account identity endpoint and confirms your key works:

fliplink whoami

A successful response prints your account details (and your maximum upload size). If you see an authentication error, your key is missing or wrong — re-run config set-key and try again. This is the same first call we recommend for the API itself, so it's a reliable smoke test.

Create a Flipbook from a PDF

Now the fun part. Point the CLI at a local PDF and give it a title:

fliplink flipbook create ./deck.pdf --title "Q3 Report" --name q3

--title is what readers see, and --name is an internal label you'll use to find it later. The command uploads the file, kicks off conversion, and returns the new flipbook's ID. Note that ID — you'll use it for the next two steps.

Already have the PDF hosted somewhere? Skip the upload and create from a URL instead:

fliplink flipbook create-url https://example.com/deck.pdf --title "Q3 Report"
🚀

Try FlipLink Free

Convert your PDF in seconds. No sign-up, no credit card — just upload and go.

Drop your PDF here or click to browse

Max 40MB

Paid plans from $39 raise this to 150 MB.

Publish and Share

A freshly created flipbook isn't public until you publish it. Here's the full sequence — create, publish, then fetch the share link — using the ID returned at each step:

# 1. Create from a PDF and note the returned ID
fliplink flipbook create ./deck.pdf --title "Q3 Report" --name q3

# 2. Publish it (use the ID from step 1)
fliplink flipbook publish 90001

# 3. Get the public share link
fliplink flipbook share-link 90001

publish flips the flipbook live; share-link returns the URL you hand to readers. Changed your mind? fliplink flipbook unpublish 90001 takes it offline again without deleting anything.

Machine-Readable Output with --json

By default the CLI prints human-friendly output. Add --json to any command to get the raw JSON response instead — perfect for piping into jq or capturing a value in a script:

fliplink flipbook create ./deck.pdf --title "Q3 Report" --json | jq -r '.ID'

That one-liner creates a flipbook and prints nothing but its ID, ready to feed into the next command. This is the foundation of every automation you'll build — see Automation and Integrations for where it leads.

Exit Codes for Scripting

The CLI uses predictable exit codes so your scripts can branch on success or failure without parsing output:

CodeMeaning
0Success
1Request or HTTP error (bad connection, 401, etc.)
2Application error — the API returned Result: ERROR

That separation matters: a 2 means your request reached FlipLink but was rejected for a business reason (invalid input, quota exceeded), while a 1 means the request itself failed. In a shell script you can react accordingly:

fliplink flipbook publish 90001 || echo "Publish failed with exit code $?"

Where to Go Next

You now have the core loop: install, authenticate, create, publish, share. From here you can wire the CLI into anything that runs commands.

  • Full command reference — every flag and subcommand lives in the CLI docs.
  • Automate it — run the same sequence on a schedule or per commit. Our guide to automating flipbook publishing in CI/CD walks through a real pipeline.
  • Need raw API power? — the CLI wraps the API reference, and the fliplink api escape hatch reaches any endpoint the named commands don't cover yet.

Once you've published your first flipbook from the terminal, the dashboard starts to feel optional — which is exactly the point.

Ready to Create Your First Flipbook?

Transform your PDFs into interactive flipbooks and documents. Get started with FlipLink's Lifetime Deal — lifetime access that starts at just $39.

#cli#command line#automation#developer#flipbook
Lifetime Deal

Pay Once, Use Forever

10, 50 or 100 flipbooks · All 35 features · Unlimited domains

$39
10 Flipbooks
$89
50 Flipbooks
Most Popular
$129
100 Flipbooks

No feature gates. Every Lifetime Deal tier unlocks all 35 features.

  • Every feature unlocked — no feature gates
  • Stackable — buy more codes anytime
  • Replaceable — swap old for new
  • Unlimited custom domains (CNAME)
  • No recurring fees, ever

Related Reading

Tutorials6 min read

Batch-Convert a Folder of PDFs to Flipbooks

Batch convert PDF to flipbook from a whole folder with one shell loop using the FlipLink CLI — capture URLs to CSV and skip bad files.

Sumit Ghugharwal