launchr

Config-Driven URL Launcher

Turn short flags into full URLs in seconds.

launchr helps teams open dashboards, logs, and runbook links from reusable command templates. Keep links typed, validated, and fast to execute.

  • Node.js 20+ CLI shipped on npm as launchr-cli
  • Typed parameters: string, integer, boolean, single-choice-list
  • Zsh tab completion sourced from your saved command config

Quick Start

From install to first custom command

01

Install the CLI

npm install -g launchr-cli

02

Create a command interactively

launchr add

03

Enable zsh completion

mkdir -p ~/.zsh/completions
launchr completion zsh > ~/.zsh/completions/_launchr

Features

Made for repeatable command workflows

Declarative command templates

Define URL templates once, then reuse them with typed parameters and short flags.

Strong runtime validation

launchr validates command schema, placeholders, missing required values, and allowed choices.

Opt-in interactive entry

Use -i or --interactive before a custom command to fill missing required parameters in a terminal.

Fast command discovery

Use launchr list and built-in help to inspect custom commands. In zsh, launchr <TAB> also completes saved command names from your config.

Backward-compatible transition

Version 1.x supports both launchr add and deprecated alias launchr init.

Commands

Built-in command reference

Command Purpose
launchr Starts CLI entrypoint and prints guidance.
launchr help Shows built-in help and usage details.
launchr list Lists configured custom commands from your JSON config file.
launchr add Interactive flow for creating a new custom command.
launchr -i <custom> [flags] Prompts for missing required parameters in an interactive terminal.
launchr init Deprecated alias for add in v1.x.
launchr <custom> help Shows usage for one configured custom command.
launchr <custom> [flags] Builds URL from template and opens it in your browser.

Shell setup: generate the zsh completion file with launchr completion zsh > ~/.zsh/completions/_launchr. This is a setup command and is intentionally hidden from the normal top-level command list.

Configuration

Command definition structure

launchr stores command definitions at ~/.launchr-configurations/launchr-commands.json.

Saved command names in this file are also what zsh completion shows after launchr.

Example: grafana command
{
  "grafana": {
    "description": "Open Grafana with typed parameters",
    "url": "https://grafana.com/{environments}/{query}/{timeframe}",
    "parameters": {
      "environments": {
        "type": "single-choice-list",
        "flag": "e",
        "defaultValue": "staging",
        "required": true,
        "values": ["staging", "production"]
      },
      "query": {
        "type": "string",
        "flag": "q",
        "defaultValue": "error",
        "required": true
      },
      "timeframe": {
        "type": "single-choice-list",
        "flag": "t",
        "defaultValue": "5m",
        "required": true,
        "values": ["5m", "10m", "1h", "6h"]
      }
    }
  }
}

Release Notes

Recent updates

v1.2.0

Completion and interactive mode

  • Zsh completion now resolves built-ins and saved custom command names from config.
  • launchr completion zsh remains available as a setup-only command.
  • -i / --interactive can prompt for missing required parameters.

v1.1.1

Command naming transition

  • launchr add is now the canonical command.
  • launchr init remains as a deprecated alias in v1.x.
  • Help text updated to guide users toward add.

v1.0.0

Stable initial release

  • Typed URL template commands with JSON-based configuration.
  • Interactive command creation and detailed runtime validation.
  • npm package publishing workflow with test gating.

Development

Local contributor workflow

Run from source

npm install
npm start -- help

Run tests

npm test