Shorten & Manage Links From the Command Line

The LinkTwin CLI brings short links and deep links to your terminal. Create, edit and analyze links, manage QR codes, collections and domains, and automate everything with simple commands and JSON output — perfect for developers, scripts and CI.

Free to start Open source Scriptable with --json
$ npm install -g @linktwin/cli
$ linktwin login
  API key: ********************************
  ✓ Saved credentials for https://linktw.in

$ linktwin links create https://example.com --custom spring-sale
  ✓ Created https://linktw.in/spring-sale

$ linktwin stats link spring-sale
  clicks: 1,204   unique: 982   top country: United States
Built for developers

Stop context-switching to shorten a link

You live in the terminal. Opening a dashboard to create a link, or hand-rolling API calls for a quick script, slows you down. The LinkTwin CLI puts link creation, deep linking and analytics one command away.

The old way
  • Leave the terminal for the dashboard
  • Write curl + auth for every script
  • No easy bulk operations
  • Hard to wire into CI
VS
With the LinkTwin CLI
  • linktwin links create <url>
  • One login, then just commands
  • Bulk create & delete with ease
  • --json + env var = CI-ready
Commands

Everything, from one command

A focused command for every part of your link workflow.

linktwin links

Create, list, get, update, delete and bulk-delete short links and deep links.

linktwin stats

Per-link and account analytics: clicks, countries, referrers, devices and trends.

linktwin collections

Organize links into collections and assign links in bulk.

linktwin domains

Add and manage your branded custom domains.

linktwin pixels

Create retargeting pixels and attach them to links.

linktwin qr

Generate and manage QR codes for any link.

Get started

Up and running in two commands

Requires Node.js 18+. Your API key is saved locally to ~/.linktwin/config.json.

# 1. Install
npm install -g @linktwin/cli

# 2. Authenticate (paste your API key)
linktwin login

# 3. Create your first link
linktwin links create https://example.com --custom hello

Using AI? Try the MCP server  ·  Read the API docs

FAQ

CLI
Questions

Everything about the LinkTwin command-line tool.

Still have questions? Contact us

The LinkTwin CLI is a command-line tool (the linktwin command) for shortening and managing links from your terminal. You can create short links and deep links, manage collections, branded domains, retargeting pixels and QR codes, and pull click analytics — without opening the dashboard. Every command supports --json output for scripting and automation.

Install it from npm with: npm install -g @linktwin/cli. It requires Node.js 18 or newer. Then run "linktwin login", paste your API key, and you are ready to create links from the command line.

Yes. The CLI is free and open source, and you can start with a free LinkTwin account. It uses the LinkTwin developer API, which is available on plans that include API access.

Absolutely. Pass --json to any command for machine-readable output you can pipe into jq, and authenticate non-interactively with the LINKTWIN_API_KEY environment variable. This makes the CLI ideal for build pipelines, cron jobs and bulk link creation.

Yes. Beyond plain short links, the CLI creates deep links with geo, device and language targeting, A/B testing, UTM parameters and branded domains. Advanced targeting can be supplied as JSON via the --data flag.

Sign in to LinkTwin and open Settings or the Tools & Integrations → CLI page in your dashboard. Copy your API key and run "linktwin login", or set it as the LINKTWIN_API_KEY environment variable.

Shorten your next link without leaving the terminal

Install the LinkTwin CLI and start managing links from your shell. Free to start.

Free to start • Open source • npm install -g @linktwin/cli