aliasx

Safe, modular shell aliases for bash and zsh on Linux and macOS. 502 aliases and functions in 25 modules.

Install

git clone https://github.com/bakhod1r/aliasx ~/.aliasx
~/.aliasx/install.sh

install.sh adds one line to ~/.bashrc and ~/.zshrc. Running it again changes nothing. Open a new shell.

oh-my-zsh: clone into $ZSH_CUSTOM/plugins/aliasx and add aliasx to plugins=(...).

Profiles

export ALIASX_PROFILE=backend     # devops, sysadmin, minimal; combine: "backend devops"
aliasx profiles                   # what each profile loads

Your own aliases

aliasx add deploy './scripts/deploy.sh --prod' "deploy to production"
aliasx mine
aliasx rm deploy

Saved in ~/.aliasx.local.sh, loaded last, with hints and search like built-in ones.

Configure

export ALIASX_DISABLE="docker k8s"      # skip default modules
export ALIASX_ENABLE="modern dangerous"  # load opt-in modules

Set these before the aliasx line in your rc file.

Inspect

aliasx modules          # list modules
aliasx list git         # aliases in one module
aliasx check gs k tf    # is a name taken?
aliasx conflicts        # names that hide programs or clash with your rc files
aliasx doctor           # version, shell, profile, install state
aliasx update           # pull the latest version
aliasx why lni          # lni → ln -i · link, ask before overwriting

Hints

Type an aliasx name and press Space: zsh shows what it does under the prompt.

$ lni █
lni → ln -i · link, ask before overwriting

Don't know the name? Type a word like port and press Space: related commands are listed.

$ port █
related commands:
ports [PORT] · listening TCP ports, or who listens on PORT
freeport PORT · kill what listens on PORT after y/N
waitport HOST PORT [SEC] · wait until PORT accepts connections

Same in any shell: aliasx find port. Turn lists off with ALIASX_FIND=0.

bash 4+ prints the hint above the prompt. bash 3 (macOS default) has no live hook; use aliasx why.

Safe mode

aliasx mode safe     # rm lists targets and asks [Y/n]
aliasx mode normal   # plain rm
aliasx mode          # show current mode
export ALIASX_MODE=safe   # keep it on (put in rc before aliasx)

Rules

Modules

ModuleCoversCount
CoreCore: helpers, terminal and the aliasx command. Always loaded.20
HintsHints: typing an aliasx name then Space shows what it does.2
CompletionTab completion for the aliasx command.1
NavigationNavigation and listing.17
FilesFiles: safe operations, search, disk, archives, history.39
GitGit and GitHub CLI.58
DockerDocker and Docker Compose.30
PodmanPodman (pd*): same shape as the docker module.21
KubernetesKubernetes and Helm.49
InfrastructureInfrastructure as code: Terraform, OpenTofu, Ansible.21
DevOpsDevOps: retries, tunnels, certificates, DNS, cron, logs.9
SysadminSysadmin: users, logins, services, disk hogs, kernel messages.14
NetworkNetworking and HTTP.11
SystemSystem: processes, services, packages, macOS.54
DevelopmentDevelopment: Node, Python (uv, poetry), PHP, Ruby, .NET, Go, Rust, Java, TLS.57
Backend & APIBackend and API work: HTTP calls, timing, JWT, ports, keys, certs.12
DatabasesDatabases: PostgreSQL (pg*), MySQL (my*), Redis (r*), MongoDB.25
nginxnginx: test, reload, logs. Config is always tested before reload/restart.9
SSH & tmuxRemote work: ssh and tmux.9
UtilitiesUtilities: passwords, ids, time, encoding, quick checks.13
.env files.env files: insert or update KEY=VALUE without opening an editor.4
CloudCloud CLIs: read-only identity and listing only.7
Modern toolsModern CLI tools that add new names only (never replace standard commands).6
Modern replacements opt-inOpt-in: replace standard commands with modern tools.9
Dangerous helpers opt-inOpt-in: destructive helpers. Each one shows targets and asks for a phrase.5

Uninstall

~/.aliasx/install.sh --uninstall