Skip to content
/ qlink Public

Interactive TUI tool for managing and launching frequently-used browser links with multi-environment support.

License

Notifications You must be signed in to change notification settings

esh2n/qlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qlink - Quick Link Browser Launcher

Interactive TUI tool for managing and launching frequently-used browser links with multi-environment support.

CleanShot 2025-10-25 at 16 16 19

Features

  • Interactive terminal UI built with ratatui
  • 10 color themes (Catppuccin, Tokyo Night, Nord, Gruvbox, Dracula, OneDark)
  • JSON-based configuration
  • Multi-environment support (dev, staging, production, custom)
  • Dynamic URL parameters (text input, selections)
  • Keyboard-driven navigation
  • Import/Export configurations

Installation

From crates.io:

cargo install qlink

From source:

git clone https://github.com/esh2n/qlink.git
cd qlink
cargo build --release
sudo cp target/release/qlink /usr/local/bin/

Or download pre-built binaries from Releases.

Quick Start

Initialize default configuration:

qlink init

Launch the TUI:

qlink

Press t to change theme, i to import your own configuration.

Custom Configuration

Create your own configuration JSON file (e.g., my-links.json):

{
  "version": "1.0",
  "projects": [
    {
      "name": "My Project",
      "description": "My custom links",
      "categories": [
        {
          "name": "Web Apps",
          "description": "Application dashboards",
          "links": [
            {
              "name": "Admin Dashboard",
              "environments": ["dev", "staging", "prod"],
              "url_template": "https://admin.{domain}",
              "env_config": {
                "dev": { "domain": "dev.mycompany.com" },
                "staging": { "domain": "staging.mycompany.com" },
                "prod": { "domain": "mycompany.com" }
              },
              "parameters": []
            }
          ]
        }
      ]
    }
  ]
}

Import:

qlink import my-links.json

# Merge with existing config
qlink import --merge new-links.json

Configuration Format

Project Structure

{
  "version": "1.0",
  "projects": [
    {
      "name": "Project Name",
      "description": "Optional description",
      "categories": [...]
    }
  ]
}

Category

{
  "name": "Category Name",
  "description": "Optional description",
  "links": [...]
}

Link with Text Input Parameter

{
  "name": "Application",
  "environments": ["dev", "staging", "prod"],
  "url_template": "https://{tenant}.app.{domain}",
  "env_config": {
    "dev": { "domain": "dev.example.com" },
    "staging": { "domain": "staging.example.com" },
    "prod": { "domain": "example.com" }
  },
  "parameters": [
    {
      "type": "input",
      "name": "tenant",
      "description": "Tenant ID",
      "defaultValue": "default-tenant"
    }
  ]
}

Link with Selection Parameter

{
  "name": "Database Console",
  "environments": ["dev", "prod"],
  "url_template": "https://console.example.com/db/{database}?env={env}",
  "env_config": {},
  "parameters": [
    {
      "type": "select",
      "name": "database",
      "description": "Database to access",
      "options": [
        { "label": "Users DB", "value": "users-db" },
        { "label": "Orders DB", "value": "orders-db" },
        { "label": "Analytics DB", "value": "analytics-db" }
      ],
      "allowEmpty": false
    }
  ]
}

Link with Empty Selection (Optional)

{
  "type": "select",
  "name": "database",
  "description": "Database (optional)",
  "options": [
    { "label": "(All databases)", "value": "" },
    { "label": "Main DB", "value": "main-db" }
  ],
  "allowEmpty": true,
  "emptyUrlTemplate": "https://console.example.com/databases"
}

URL Template Placeholders

Placeholders in url_template are substituted in this order:

  1. Environment-specific values from env_config
  2. User parameters from parameter inputs
  3. Environment name using {env} placeholder

Example

{
  "url_template": "https://{tenant}.app.{domain}/{env}/dashboard",
  "env_config": {
    "dev": { "domain": "dev.example.com" }
  },
  "parameters": [
    { "type": "input", "name": "tenant" }
  ]
}

For environment dev with tenant acme: → https://acme.app.dev.example.com/dev/dashboard

CLI Commands

Initialize Configuration

# Create default config at ~/.config/qlink/config.json
qlink init

# Force overwrite existing config
qlink init --force

Interactive Mode (Default)

qlink

Import Configuration

# Replace existing config
qlink import my-links.json

# Merge with existing config
qlink import --merge my-links.json

Export Configuration

# Export to stdout
qlink export

# Export to file
qlink export --output my-links.json

List Projects

qlink list

Validate Configuration

qlink validate my-links.json

Use Custom Config File

qlink --config /path/to/custom-config.json

Dry Run (Print URL without opening)

qlink --dry-run

Keyboard Shortcuts

Key Action
/ k Move up
/ j Move down
/ h Move left (tabs)
/ l Move right (tabs)
Enter Select / Continue
Esc Go back
q Quit
t Theme selection (project screen)
i Import config
/ Search (in lists)
c Copy URL to clipboard
Tab Next field
Shift+Tab Previous field
Space Toggle option
Ctrl+C Force quit

Development

See DEVELOPMENT.md for details.

make help          # Show all commands
make build         # Build release
make test          # Run tests
make ci            # Run all checks
make bump-patch    # Version bump
make publish       # Publish to crates.io

License

MIT

Author

@esh2n

About

Interactive TUI tool for managing and launching frequently-used browser links with multi-environment support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published