PitchHut logo
Effortlessly manage project-specific shell aliases.
Pitch

Portable project-specific aliases simplify the command-line experience by keeping shell profiles clean. With pls, users can create and manage custom, context-aware shortcuts, allowing for efficient execution of frequently used commands. Streamline interaction with your projects through easy-to-use .pls.yml files.

Description

Project Level Shortcuts (pls) is an innovative command-line tool that enhances productivity through the creation, management, and execution of project-specific aliases. By utilizing portable .pls.yml files, users can maintain a clean shell profile while efficiently streamlining their workflow.

Say goodbye to cluttered bash profiles. With pls, run your frequently used commands effortlessly, using simple aliases like:

pls test                          # Execute tests
pls clone my-repo                 # Clone a repository under your name
pls open-here                     # Open the current directory in your file manager

Features

  • Organized Alias Management: Keep aliases organized in separate files instead of cluttering shell profiles, simplifying maintenance and updates.
  • Context-Aware Aliases: Use project-specific aliases that can override global aliases, allowing the same alias name to be reused with different implementations across projects.
  • Command Cache Verification: A caching feature makes sure that potentially harmful commands are not executed without confirmation, ensuring safety and reducing errors.
  • Portability and Synchronization: Easily synchronize aliases between different machines by managing .pls.yml files.
  • Fuzzy Command Picker: The built-in fuzzy alias picker assists in finding and executing aliases without needing to remember exact names.
  • Parameterized Commands: Supports commands with parameters, enhancing versatility.
  • Bash Compatibility: Functioning as a lightweight shell script, pls works seamlessly with any shell that supports bash syntax.

How It Works

When an alias is executed, pls first checks the global context and then searches for the nearest project-specific file that matches. Local aliases take precedence, allowing flexible command management tailored to each project's requirements. If an alias is executed that has not been previously cached, pls will prompt for confirmation prior to execution, preventing unintended command execution.

Configuration

pls is customizable through a .plsrc file. Users can specify variables like the alias filename and caching preferences to enhance functionality based on their specific needs. For instance, set:

PLS_FILENAME: .pls.yml
PLS_GLOBAL: ~/global.pls.yml
PLS_ENABLE_CACHE_CHECK: true

Getting Started

To begin using pls, create a .pls.yml file in your project's root directory and populate it with your desired aliases:

commands:
  - alias: "hello"
    command: "echo 'Hello, World!"  

Run commands simply by executing pls hello, and confirm when prompted to execute your command.

pls not only keeps command execution organized and efficient but also enhances project-specific workflows, making development simpler and more intuitive. For complete guidance, refer to the documentation within the repository and explore the detailed commands overview and real-world examples.

0 comments

No comments yet.

Sign in to be the first to comment.