CLI Integration

Beta

CLI Beta Notes

  • The CLI supports both aliases: fyn and fynlink.
  • Interactive prompts are available for create flows when flags are omitted.
  • For CI and automation, prefer explicit flags, --json, --quiet, and --no-progress.
  • Built-in operational commands: fyn about, fyn doctor, and fyn completion <shell>.

The CLI is the terminal interface for the Fynlink API and SDK capabilities. If you prefer shell workflows, automation pipelines, and repeatable commands over dashboard-only operations, this is the primary tool.

Prerequisites

Install Node.js before installing the CLI. npm is bundled with Node.js, so npm commands become available only after Node.js installation.

bash
node -v
npm -v

Installation

Install once globally, then use the same CLI across all your Fynlink teams and environments.

bash
npm i -g @fynlink/cli
bash
fyn --help
fynlink --help
CommandDescription
fyn --helpPrimary CLI alias.
fynlink --helpSecondary alias mapped to the same binary.

Quick Start

First create a profile, then run API operations under that active profile context.

bash
fyn profile add
bash
fyn profile add \
--name production \
--token "$FYN_TOKEN" \
--secret "$FYN_SECRET" \
--set-active
bash
fyn profile current
fyn links list --limit 10

Profiles

What Is A Profile?

In Fynlink, API tokens are team-scoped. One token represents access to one team. In the CLI, each team token is stored as a named profile.

You can save multiple profiles, list them, and switch the active one anytime. This lets you move safely between teams such as production, staging, client accounts, or internal environments.

Add Profile

bash
fyn profile add
bash
fyn profile add --name staging --token "$FYN_TOKEN" --set-active

List & Switch

bash
fyn profile list
fyn profile use staging
fyn profile show staging

Domains

Create Domain

bash
fyn domains create --domain links.example.com --gpc

List Domains

bash
fyn domains list --page 1 --limit 20

Update Domain

bash
fyn domains update domain_123 --description "Updated description" --gpc true

Verify Domain

bash
fyn domains verify domain_123

Remove Domain

bash
fyn domains remove domain_123 --yes

Members

Invite Member

bash
fyn members invite --email dev@example.com --role admin

List Members

bash
fyn members list --include-owner

Update Member

bash
fyn members update member_123 --role editor

Remove Member

bash
fyn members remove member_123 --yes

Analytics

Clicks

bash
fyn analytics clicks link_123

Timeseries

bash
fyn analytics timeseries link_123 \
--start 2026-03-01T00:00:00Z \
--end 2026-03-31T23:59:59Z \
--granularity day

Breakdowns

bash
fyn analytics countries link_123
fyn analytics browsers link_123
fyn analytics devices link_123

Output & CI

JSON / YAML

bash
fyn links list --json
fyn links list --output yaml
fyn links get link_123 --no-color

Automation

bash
FYN_TOKEN="$FYN_TOKEN" fyn links list --json --quiet --no-progress | jq '.data[0].id'

Diagnostics

bash
fyn about
fyn doctor
fyn doctor --json
FlagPurpose
--quietSuppress non-essential diagnostics in stderr.
--no-progressDisable transient progress indicators.
--debugEnable debug diagnostics.

Shell Completion

bash
fyn completion bash > ~/.bashrc.d/fyn-completion.sh
fyn completion zsh > ~/.zsh/completions/_fyn
fyn completion fish > ~/.config/fish/completions/fyn.fish
E2EE
Your link data is encrypted, even before leaving the browser & can be decrypted only by you.
< 200ms
Average link redirection time, depends mainly on location of the end user.
99.99%
Uptime guarantee for our redirection services.
300+
For quick, uninterrupted URL redirection, our redirection service is available on all major cities worldwide.