npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fynlink/cli

v0.1.0-beta.2

Published

Official command-line interface for Fynlink

Readme

@fynlink/cli

Official command-line interface for Fynlink, powered by @fynlink/sdk.

Website: https://fyn.link

Requirements

  • Node.js >= 20.10.0

Install

npm i -g @fynlink/cli

The package exposes two equivalent commands:

fyn --help
fynlink --help

Quick Start

  1. Add a profile (interactive):
fyn profile add
  1. Add a profile (non-interactive):
fyn profile add \
  --name dev \
  --token "$FYN_TOKEN" \
  --secret "$FYN_SECRET" \
  --set-active
  1. Verify active profile:
fyn profile current
  1. Call APIs:
fyn links list --limit 10

Global Options

These options work on every command:

--profile <name>
--token <value>
--secret <value>
--base-url <url>
--timeout-ms <number>
--debug
--quiet
--no-progress
--output <json|table|yaml>
--json
--no-color

Environment variables are also supported:

FYN_PROFILE
FYN_TOKEN
FYN_SECRET
FYN_BASE_URL
FYN_TIMEOUT_MS
FYN_DEBUG
FYN_QUIET
FYN_PROGRESS
FYN_COLOR

Resolution precedence is: CLI flags -> environment -> selected profile.

About

# Show CLI build/runtime metadata
fyn about

Doctor

# Run runtime/profile/token/connectivity diagnostics
fyn doctor

# Machine-readable diagnostics
fyn doctor --json

Shell Completion

# Bash
fyn completion bash > ~/.bashrc.d/fyn-completion.sh

# Zsh
fyn completion zsh > ~/.zsh/completions/_fyn

# Fish
fyn completion fish > ~/.config/fish/completions/fyn.fish

Profiles

# Add profile with prompts for missing values
fyn profile add

# Add profile fully from flags
fyn profile add --name staging --token "<token>" --secret "<secret>" --set-active

# List all profiles
fyn profile list

# Show active profile
fyn profile current

# Switch active profile
fyn profile use staging

# Show one profile
fyn profile show staging

# Remove profile (skip confirmation)
fyn profile remove staging --yes

profile add validates the token by calling bootstrap info and stores team metadata (team id/name, token name) on success.

Info

# Get bootstrap info
fyn info get

# Force refresh (bypass SDK bootstrap cache)
fyn info get --force

Teams

# Get current team
fyn teams get

# Update team (interactive if --name is omitted)
fyn teams update --name "Growth Team"

Members

# List members
fyn members list

# Include owner
fyn members list --include-owner

# Get a member
fyn members get member_123

# Invite (interactive if flags omitted)
fyn members invite --email [email protected] --role admin

# Update role (interactive if --role omitted)
fyn members update member_123 --role editor

# Remove member (skip confirmation)
fyn members remove member_123 --yes

Domains

# List domains
fyn domains list --page 1 --limit 20

# Get domain by id
fyn domains get domain_123

# Create domain (interactive if --domain omitted)
fyn domains create \
  --domain links.example.com \
  --description "Primary branded domain" \
  --not-found-url "https://www.example.com/404" \
  --root-redirect "https://www.example.com" \
  --gpc

# Verify DNS/status
fyn domains verify domain_123

# Update domain fields
fyn domains update domain_123 --description "Updated description" --gpc true

# Remove domain (skip confirmation)
fyn domains remove domain_123 --yes

Links

# Create link (interactive if --target omitted)
fyn links create \
  --target "https://www.example.com/pricing" \
  --slug spring-sale \
  --title "Spring Campaign" \
  --notes "Created from CLI" \
  --tag campaign spring \
  --ios-target "https://apps.apple.com/app/id123" \
  --android-target "https://play.google.com/store/apps/details?id=com.example.app" \
  --geo US=https://us.example.com/pricing CA=https://ca.example.com/pricing \
  --safe-mode true \
  --analytics full \
  --expiry-seconds 86400

# Get one link
fyn links get link_123

# List links with filters
fyn links list \
  --page 1 \
  --limit 20 \
  --sort-by created_at \
  --sort-order desc \
  --filter-domain links.example.com \
  --filter-tracking full \
  --filter-safe-mode true \
  --filter-private false \
  --filter-password false

# Update link
fyn links update link_123 --title "Updated title" --tag campaign q2 --private false

# Clear password and expiry
fyn links update link_123 --password null --expiry-seconds null

# Delete link (skip confirmation)
fyn links delete link_123 --yes

Notes:

  • domain is optional for link create. If omitted, CLI uses the team default domain from refreshed bootstrap info.
  • Link status and viaApi are response fields from backend/system state.
  • They are not accepted as create/update input flags.
  • Progress indicators are transient. Use --no-progress for fully quiet automation logs.
  • Create/update mutations print a short result header before the returned record in table output for better visual separation.

Analytics

# Total clicks
fyn analytics clicks link_123

# Timeseries with date range
fyn analytics timeseries link_123 \
  --start 2026-03-01T00:00:00Z \
  --end 2026-03-31T23:59:59Z \
  --granularity day

# Browser split with filters
fyn analytics browsers link_123 \
  --country US IN \
  --browser Chrome Safari

# Other breakdowns
fyn analytics devices link_123
fyn analytics countries link_123
fyn analytics referrers link_123 --referrer google.com x.com

Output Modes

# Human-readable default output
fyn links get link_123

# JSON for scripting
fyn links list --json

# YAML output
fyn links list --output yaml

# Disable ANSI colors
fyn links get link_123 --no-color

Automation Examples

# Select profile once and reuse
fyn profile use production
fyn links list --limit 100 --json

# Use env vars in CI
FYN_TOKEN="<token>" FYN_SECRET="<secret>" fyn links list --json

# Parse JSON output
fyn links list --json | jq '.data[0].id'