01 · Overview

The power of dynamic binaries at your fingertips.

Shortk is a blazing-fast command-line shortcut manager written in Go. Unlike traditional shell aliases, Shortk generates real executables in your PATH, enabling instant usage across all terminal tabs without sourcing configuration files.

02 · Setup

Installation

Install Shortk directly via curl. The script automatically detects your OS and architecture.

Terminal · Install Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/Hilaladiii/shortk/main/install.sh | bash
Terminal · Install Script (Windows PowerShell)
irm https://raw.githubusercontent.com/Hilaladiii/shortk/main/install.ps1 | iex

Shortk is fully compatible with Linux, macOS, and Windows.
After installation, reload your shell profile or restart your terminal to apply changes:
source ~/.zshrc, source ~/.bashrc, or restart your PowerShell terminal.

03 · Maintenance

Updating

Keep Shortk up to date by simply re-running the installation command. The script will automatically fetch and install the latest pre-built binary.

Terminal · Update (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/Hilaladiii/shortk/main/install.sh | bash
Terminal · Update (Windows PowerShell)
irm https://raw.githubusercontent.com/Hilaladiii/shortk/main/install.ps1 | iex
04 · Quickstart

Getting Started

Initialize the environment and add your first shortcut.

1. Initialize

Sync existing wrappers and ensure shell integration is active.

shortk init

2. Add a Shortcut

Map a long command to a concise name.

shortk add hello 'echo "hello from shortk"'

3. Execute

Call it directly from any directory.

hello
05 · API Reference

Core Commands

shortk init

Set up shell integration and sync dynamic wrappers.

shortk add <short> <long>

Register a new shortcut globally.

shortk remove <short>

Delete a shortcut and its associated dynamic binary.

shortk list

List all currently registered shortcuts.

shortk status <short>

Inspect where a shortcut is defined and detect scope overrides.

shortk version

Show current Shortk version.

06 · Scoping

Local vs Global Scope

Shortk supports directory-specific shortcuts using the --local flag. This creates a .shortk file in your current directory.

# Add a shortcut only for the current project shortk add migrate "go run main.go migrate" --local # Detect where a command is coming from shortk status migrate Status for 'migrate': LOCAL: go run main.go migrate (from /path/to/project/.shortk) GLOBAL: (none found)
07 · Variables

Automatic .env Injection

Dynamic wrappers automatically detect .env files in the current directory and inject their variables into the command context at runtime.

Runtime Context

~/.env: DB_PORT=5432
shortk add db-shell "psql -p $DB_PORT"
→ Dynamic Wrapper sources .env before execution

08 · Cleanup

Uninstallation

Completely remove Shortk and its dynamic binaries from your system.

Terminal · Uninstall Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/Hilaladiii/shortk/main/uninstall.sh | bash
Terminal · Uninstall Script (Windows PowerShell)
irm https://raw.githubusercontent.com/Hilaladiii/shortk/main/uninstall.ps1 | iex