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
zshandbash. - Import: Import existing aliases from your
.zshrcor.bash_aliases.
Installation
Prerequisites
- Python 3.11 or higher
uv(recommended) orpip
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
-
Initialize: Set up the configuration and shell integration.
al initFollow the instructions to source the alias file (e.g.,
source ~/.config/al/aliasesor restart your terminal). -
Add an Alias:
al addFollow the interactive prompts to create a new alias.
-
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.
-
Push: Upload your local aliases to Gist.
al sync push
On first run, you will be asked for a GitHub Personal Access Token (with
gistscope). -
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4dd03e72f31dfbd642820e360386af7f9ca1e3915aed6c90731ebd355db7a1dc
|
|
| MD5 |
722db977169b9c5032ab8222aff38807
|
|
| BLAKE2b-256 |
e2d740c0d50f2bb207554ad3372719434d5fa8fe112b6e3759a15ff3d66636a4
|
File details
Details for the file al_alias_manager-0.1.0-py3-none-any.whl.
File metadata
- Download URL: al_alias_manager-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79e0d8d7731519bd48845ce416f37954c332f027177b66dc2a8004f69975d004
|
|
| MD5 |
0c44ed58e655cb33004cb61848226822
|
|
| BLAKE2b-256 |
81ecee4f7f1c13bedf695b90204086a3266245858506f18ca727c08145252883
|