CLI (Homebrew + Chocolatey)
Install the T.LY command-line tool with Homebrew or Chocolatey and create short links from your terminal.
The T.LY CLI gives you a fast way to create short links from your terminal, which is handy for scripts, local automation, and quick one-off link creation. If you want language-specific packages instead, see API basics & SDKs.
Install with Homebrew
The CLI is distributed through the tlyshortener/tly Homebrew tap.
brew tap tlyshortener/tly brew install tly
Install with Chocolatey
On Windows, install the CLI from the T.LY CLI Chocolatey package.
choco install tly-cli
Create your API token
- Log in to your T.LY account.
- Create a token in Settings > API.
- Add it to your shell before using the CLI.
macOS, Linux, or Git Bash:
export TLY_API_TOKEN="your-api-token"
PowerShell:
$env:TLY_API_TOKEN="your-api-token"
TLY_API_TOKEN for the CLI.Create your first short link
tly create https://example.com
A few common examples:
tly create https://example.com --short-id promo tly create https://example.com --description "Spring campaign" tly create https://example.com --domain https://go.example.com/ tly create https://example.com --json
Helpful notes
- Use
tly --helportly --versionto confirm the CLI is installed correctly. - You can pass
--tokendirectly, but usingTLY_API_TOKENis usually better for local scripts. - Chocolatey package details are available at community.chocolatey.org/packages/tly-cli.
- Need more than simple CLI commands? Use the API docs or the official SDKs.
Need more help?
If you still have questions, contact [email protected] or use the contact form. For abuse or suspicious links, use Report Abuse. For feature requests, email [email protected].