Tray LinkTray Link

CLI

The tlink command-line interface for managing your projects.

Introduction

tlink is the companion CLI for Tray Link. It shares the same configuration as the desktop app — projects added via the CLI appear in the app, and vice-versa.

Installing the CLI

You can install the CLI in two ways:

  1. From the app — Open Settings → CLI section → click Install CLI
  2. Automatically — the CLI is bundled with the desktop app and can be symlinked to your PATH

Once installed, verify it works:

tlink --help

Configuration File

The CLI reads and writes to the same config.json file used by the desktop app:

PlatformPath
macOS~/Library/Application Support/TrayLink/config.json
Windows%APPDATA%/TrayLink/config.json
Linux~/.config/TrayLink/config.json

Commands

Add a project to the list.

tlink add <path> [options]

Arguments:

ArgumentDescription
pathAbsolute path to the project folder

Options:

OptionDescription
-n, --name <name>Custom name for the project (defaults to the folder name)

Examples:

# Add a project using the folder name
tlink add /Users/me/projects/my-app

# Add a project with a custom name
tlink add /Users/me/projects/my-app --name "My App"

Display a table of all registered projects.

tlink list

Example output:

┌──────────┬──────────────────────────────────┬──────────┐
│ Name     │ Path                             │ Favorite │
├──────────┼──────────────────────────────────┼──────────┤
│ my-app   │ /Users/me/projects/my-app        │ No       │
│ website  │ /Users/me/projects/website       │ No       │
└──────────┴──────────────────────────────────┴──────────┘

Remove a project from the list.

tlink remove <name-or-id>

Arguments:

ArgumentDescription
name-or-idProject name or UUID

Examples:

# Remove by name
tlink remove my-app

# Remove by ID
tlink remove 550e8400-e29b-41d4-a716-446655440000

Open a project in your editor and/or terminal.

tlink open <project> [options]

Arguments:

ArgumentDescription
projectProject name or UUID

Options:

OptionDescription
-e, --editor [slug]Open in editor. Optionally pass a slug to choose a specific editor.
-t, --terminal [slug]Open in terminal. Optionally pass a slug to choose a specific terminal.

When neither -e nor -t is provided, the project opens in both the effective default editor and the effective default terminal.

The resolution order is:

  1. Explicit slug passed in the command
  2. Project-specific default
  3. Global default from Settings / tlink config set
  4. Platform fallback

Examples:

# Open in both default editor and terminal
tlink open my-app

# Open only in a specific editor
tlink open my-app -e cursor

# Open only in a specific terminal
tlink open my-app -t iterm

# Open in a specific editor and terminal
tlink open my-app -e code -t warp

List available editors or terminals.

tlink config list <type> [options]

Arguments:

ArgumentDescription
typeeditor or terminal

Options:

OptionDescription
--detectedOnly show tools that are detected/installed on your system
-p, --project <project>Show the effective default in the context of a specific project

The current effective default is marked with * in the output. When --project is used, the Source column indicates whether the selected tool comes from the project override or the global default.

Examples:

# List all known editors
tlink config list editor

# List only detected/installed terminals
tlink config list terminal --detected

# Show effective defaults for a specific project
tlink config list editor --project my-app
tlink config list terminal --project my-app

Set the default editor or terminal.

tlink config set <type> [slug] [options]

Arguments:

ArgumentDescription
typeeditor or terminal
slug(Optional) Slug of the tool to set as default

Options:

OptionDescription
-i, --interactiveChoose interactively from available tools
-p, --project <project>Set the default for a specific project
--clearClear the current default in the selected scope

Examples:

# Set default editor directly
tlink config set editor cursor

# Set default terminal interactively
tlink config set terminal -i

# Set a project-specific editor default
tlink config set editor cursor --project my-app

# Set a project-specific terminal default
tlink config set terminal warp --project my-app

# Clear a project-specific override and fall back to the global default
tlink config set editor --project my-app --clear

Migrate data from legacy versions of the app (vs-tray, old Tray Link).

tlink migrate [options]

Options:

OptionDescription
--dry-runPreview what would be migrated without making changes
-f, --forceSkip duplicate check and force migration

The migration searches for legacy configuration files in known locations and normalizes them into the current format.

Examples:

# Preview migration
tlink migrate --dry-run

# Run migration, skipping duplicate checks
tlink migrate --force