Skip to main content

A streamlined CLI tool for managing aliases on Linux systems, simplifying the creation, deletion, and management of command shortcuts.

Project description

al - The Alias Manager

al is a streamlined CLI tool for managing shell aliases on Linux and macOS systems. It simplifies the creation, organization, and synchronization of your command shortcuts, keeping your shell configuration clean and portable.

Features

  • Grouped Aliases: Organize aliases into groups (e.g., git, docker, system) for better management.
  • Interactive Management: Easily add and remove aliases with interactive prompts.
  • Search: Quickly find aliases by name or command content.
  • Cloud Sync: Synchronize your aliases across machines using GitHub Gists.
  • Shell Integration: Works seamlessly with zsh and bash.
  • Import: Import existing aliases from your .zshrc or .bash_aliases.

Installation

Prerequisites

  • Python 3.11 or higher
  • uv (recommended) or pip

Install with uv

# Clone the repository
git clone https://github.com/yourusername/al.git
cd al

# Install dependencies and the tool
uv sync
uv pip install -e .

Install from PyPI

pip install al-alias-manager
# or
uv pip install al-alias-manager

Quick Start

  1. Initialize: Set up the configuration and shell integration.

    al init
    

    Follow the instructions to source the alias file (e.g., source ~/.config/al/aliases or restart your terminal).

  2. Add an Alias:

    al add
    

    Follow the interactive prompts to create a new alias.

  3. Use it:

    # Run the alias directly from al (optional)
    al run my-alias
    
    # Or just use it in your shell (after sourcing)
    my-alias
    

Usage

Managing Aliases

  • Add: Create a new alias interactively.

    al add
    
  • List: View all aliases, optionally filtered by group.

    al list
    al list git  # Show only 'git' group
    
  • Search: Find aliases matching a query.

    al search "log"
    
  • Remove: Interactively select and remove an alias.

    al remove
    
  • Edit: Open the raw alias file in your default editor ($EDITOR).

    al edit
    

Synchronization (GitHub Gist)

Sync your aliases to a private GitHub Gist to share them between computers.

  1. Push: Upload your local aliases to Gist.

    al sync push
    

    On first run, you will be asked for a GitHub Personal Access Token (with gist scope).

  2. Pull: Download aliases from Gist.

    al sync pull
    

    You will need the Gist ID (provided after a successful push).

Importing

Import existing aliases from a file (e.g., your .zshrc).

al import ~/.zshrc

This will parse alias name='command' lines and add them to an imported group.

Development

This project uses uv for dependency management and ruff for linting/formatting.

# Run tests
uv run pytest

# Run linting
uv run ruff check .

License

GPLv3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

al_alias_manager-0.1.0.tar.gz (51.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

al_alias_manager-0.1.0-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

Details for the file al_alias_manager-0.1.0.tar.gz.

File metadata

  • Download URL: al_alias_manager-0.1.0.tar.gz
  • Upload date:
  • Size: 51.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for al_alias_manager-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4dd03e72f31dfbd642820e360386af7f9ca1e3915aed6c90731ebd355db7a1dc
MD5 722db977169b9c5032ab8222aff38807
BLAKE2b-256 e2d740c0d50f2bb207554ad3372719434d5fa8fe112b6e3759a15ff3d66636a4

See more details on using hashes here.

File details

Details for the file al_alias_manager-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for al_alias_manager-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79e0d8d7731519bd48845ce416f37954c332f027177b66dc2a8004f69975d004
MD5 0c44ed58e655cb33004cb61848226822
BLAKE2b-256 81ecee4f7f1c13bedf695b90204086a3266245858506f18ca727c08145252883

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page