command-shortner

A tool that lets users save and run long terminal commands with short aliases

📜 License

This project is licensed under the GNU General Public License v3.0.
See the full LICENSE file for detailed terms and conditions.

⚡ Boost Productivity with command-shortner 🚀

Save and run long terminal commands with short, memorable aliases!

npm License: GPL v3 Downloads

🌟 Why Use This?

Tired of repetitive long commands? command-shortner supercharges your workflow with:

Alias management - Save lengthy commands
Command chaining - Run multiple commands sequentially
Interactive UI - Visual command management
Cross-platform - Works everywhere
Import/Export - Share your shortcuts

# Instead of typing this...
docker-compose up --build --force-recreate --remove-orphans

# Just type this!
boost run dc-up

📦 Installation

Install globally to use anywhere in your terminal:

npm install -g command-shortner

After installation, you'll see a beautiful welcome message with usage examples!


🛠 Core Features

🔖 Basic Commands

# Add new shortcut
boost add <alias> "<command>"

# Run command
boost run <alias>

# List all shortcuts
boost list

# Remove shortcut
boost remove <alias>

⛓ Advanced Command Chaining

# Chain existing aliases
boost chain-alias alias1,alias2,alias3
boost chain-alias cl,de

# Example:
boost add build "npm run build"
boost add test "npm test"
boost chain-alias build,test

📁 Import/Export

# Export all commands to JSON
boost export [filename.json]

# Import commands from JSON
boost import commands.json

🖥 Interactive Mode

boost interactive

Launches a beautiful terminal UI with:

  • Command browser with search
  • One-click execution
  • Visual feedback
  • Easy management

🎨 Special Features

🪄 Silent Mode

boost run <alias> --silent  # Runs without output

🛠 Windows Fix

boost fix-windows  # Solves PowerShell issues

⚙️ Configuration

# Set default shell (e.g., zsh, bash, powershell)
boost config set shellOverride /bin/zsh

🚦 Troubleshooting

PowerShell Issues

# Run as admin then execute:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Command Not Found

# Ensure npm global bin is in your PATH
npm bin -g

Permission Issues

# On Linux/Mac
sudo npm install -g command-shortner --unsafe-perm

🧩 Real-World Examples

Command Description
boost add deploy "git push && npm run build && scp -r ./dist user@server:/app" Full deployment shortcut
boost add logs "docker-compose logs -f --tail=100" Docker log tracking
boost run deploy Runs git push && npm run build && scp -r ./dist user@server:/app
boost remove deploy Deletes the deploy shortcut
boost add refresh "rm -rf node_modules && npm install" Project reset
boost chain-alias test,build,deploy CI/CD pipeline

🤝 Contributing

Found a bug or have a feature request?
Open an issue or submit a PR!