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.
$ 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
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.
linktwin links create <url>A focused command for every part of your link workflow.
linktwin linksCreate, list, get, update, delete and bulk-delete short links and deep links.
linktwin statsPer-link and account analytics: clicks, countries, referrers, devices and trends.
linktwin collectionsOrganize links into collections and assign links in bulk.
linktwin domainsAdd and manage your branded custom domains.
linktwin pixelsCreate retargeting pixels and attach them to links.
linktwin qrGenerate and manage QR codes for any link.
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
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.
Install the LinkTwin CLI and start managing links from your shell. Free to start.
Free to start • Open source • npm install -g @linktwin/cli