An open API service indexing awesome lists of open source software.

https://github.com/thinhngotony/alias

Hyber Alias - One command. All your shell aliases. Everywhere. Cross-platform alias manager for Git, Kubernetes, and system operations.
https://github.com/thinhngotony/alias

aliases bash cross-platform dotfiles powershell productivity shell zsh

Last synced: 2 days ago
JSON representation

Hyber Alias - One command. All your shell aliases. Everywhere. Cross-platform alias manager for Git, Kubernetes, and system operations.

Awesome Lists containing this project

README

          


Platforms
Shells
License
PRs Welcome

Hyber Alias


One command. All your shell aliases. Everywhere.


A cross-platform shell alias manager that installs a curated set of

productivity aliases for Git, Kubernetes, and system operations.

---

## Quick Start

**Linux / macOS (Bash, Zsh, Fish, sh)**

```sh
curl -sfS https://alias.hyberorbit.com/install | sh
```

**Windows PowerShell**

```powershell
iwr -useb https://alias.hyberorbit.com/install.ps1 | iex
```

> Open a new terminal after install, or run your shell activation command (e.g. `source ~/.bashrc`, `source ~/.zshrc`, or `source ~/.config/fish/conf.d/hyber-alias.fish`).

**Verify installation:**

```bash
alias | grep -E "^g|^k"
```

You should see aliases like `ga`, `gb`, `gs`, `k`, `kgp`, etc.

Alternative URL (if the above doesn't work)

```sh
# Linux/macOS
curl -sfS https://raw.githubusercontent.com/thinhngotony/alias/main/install-universal.sh | sh

# Windows PowerShell
iwr -useb https://raw.githubusercontent.com/thinhngotony/alias/main/install.ps1 | iex
```

---

## Why Hyber Alias?

| Feature | Description |
| ------------------ | ------------------------------------------------ |
| **Zero Config** | Auto-detects OS, shell, and environment |
| **Cross-Platform** | Linux, macOS, Windows, WSL, Docker, Kubernetes |
| **Instant Setup** | Installs in under 5 seconds |
| **Always Fresh** | Auto-updates on each shell start |
| **Customizable** | Add your own aliases that persist across updates |
| **Offline Ready** | Works without internet after first install |
| **Discoverable** | Type `alias-` + TAB for category autocomplete |
| **Secure** | AES-256-CBC encrypted secret storage |

---

## Quick Reference

Type `alias-` then press **TAB** for autocomplete:

```bash
alias-help # Show all categories
alias-git # Git aliases
alias-k8s # Kubernetes aliases
alias-system # System aliases
alias-ai # AI coding agent aliases
alias-add # Add custom alias to category
alias-remove # Remove custom alias
alias-list # List custom categories
```

---

## Aliases Reference

### Git

| Alias | Command | Description |
| :------------- | :--------------------------- | :-------------------------------------------- |
| `ga` | `git add .` | Stage all changes |
| `gb` | `git branch` | List branches |
| `gc ` | `git commit -m ` | Commit with message (use `gcm` on PowerShell) |
| `gd` | `git diff` | Show unstaged changes |
| `glog` | `git log --oneline -n 20` | Recent commits |
| `gph ` | `git push origin ` | Push to remote |
| `gpl ` | `git pull origin ` | Pull from remote |
| `gs` | `git status` | Working tree status |
| `gsw ` | `git switch ` | Switch branches |
| `gauto` | Stage, commit "Backup", push | Quick backup |

### Kubernetes

| Alias | Command | Description |
| :---------- | :------------------------------- | :------------------ |
| `k` | `kubectl` | Shorthand |
| `ka ` | `kubectl apply -f ` | Apply manifest |
| `kd` | `kubectl delete` | Delete resource |
| `kdesc` | `kubectl describe` | Describe resource |
| `ke` | `kubectl exec -it` | Exec into container |
| `kg` | `kubectl get` | Get resources |
| `kgp` | `kubectl get pods` | List pods |
| `kgs` | `kubectl get services` | List services |
| `kl` | `kubectl logs` | View logs |
| `kctx` | `kubectl config current-context` | Current context |
| `kns ` | Set namespace | Switch namespace |

### System

| Alias | Command | Description |
| :------- | :------------------ | :-------------- |
| `ll` | `ls -lah` | Detailed list |
| `la` | `ls -A` | List all |
| `cls` | `clear` | Clear screen |
| `reload` | Reload shell config | Refresh aliases |
| `home` | `cd ~` | Go home |
| `..` | `cd ..` | Up one level |
| `...` | `cd ../..` | Up two levels |

### AI

| Alias | Command | Description |
| :--------- | :--------------------------------------------------------------------------- | :------------------------ |
| `copilotx` | `copilot --allow-all-tools --allow-all-paths` | Full access Copilot agent |
| `claudex` | `claude --allow-dangerously-skip-permissions --dangerously-skip-permissions` | Full access Claude agent |

---

## Secure Secret Storage

Store sensitive tokens and credentials with AES-256-CBC encryption:

```bash
# Store a secret (prompts for encryption password)
alias-secret-add my-token "your-api-token"

# Retrieve a secret (prompts for decryption password, copies to clipboard if available)
alias-secret-get my-token

# List all stored secrets
alias-secret-list

# Remove a secret (secure deletion)
alias-secret-remove my-token
```

Secrets are encrypted at rest using OpenSSL AES-256-CBC with PBKDF2 key derivation. Files are stored in `~/.alias/.secrets/` with `600` permissions.

---

## Custom Aliases

Add your own aliases in `~/.alias/custom/`. They persist across updates.

### Using alias-add (Recommended)

Create organized custom categories with the built-in commands:

```bash
# Add alias to a category
alias-add ai claudex "claude --dangerously-skip-permissions"
alias-add ai gpt "chatgpt --model gpt-4"

# View category aliases
alias-ai

# List all custom categories
alias-list

# Remove an alias
alias-remove ai gpt
```

### Manual Creation

Linux / macOS

Create a `.sh` file:

```bash
cat > ~/.alias/custom/docker.sh << 'EOF'
alias dc='docker-compose'
alias dcu='docker-compose up -d'
alias dcd='docker-compose down'
alias dps='docker ps'
EOF
```

Windows PowerShell

Create a `.ps1` file:

```powershell
@'
function dc { docker-compose $args }
function dcu { docker-compose up -d $args }
function dcd { docker-compose down $args }
function dps { docker ps $args }
'@ | Out-File ~\.alias\custom\docker.ps1
```

---

## How It Works

```
1. Install script downloads loader to ~/.alias/
2. Adds source line to shell config (.bashrc / $PROFILE)
3. Loader fetches latest aliases on each shell start
4. Custom aliases in ~/.alias/custom/ are loaded last
```

**Directory structure after install:**

```
~/.alias/
├── load.sh # Loader (Linux/macOS)
├── load.ps1 # Loader (Windows)
├── env.sh # Environment config
├── cache/ # Downloaded alias modules
├── custom/ # Your custom aliases (*.sh)
└── .secrets/ # Encrypted secrets (AES-256-CBC)
```

---

## Security

Hyber Alias follows security best practices:

- **Input validation**: Category and alias names are restricted to alphanumeric characters, hyphens, and underscores. Path traversal and shell metacharacter injection are blocked.
- **Encrypted secrets**: Secrets are stored using AES-256-CBC encryption with PBKDF2 key derivation via OpenSSL (not base64).
- **Atomic file operations**: Downloads and updates use temporary files (`mktemp`) with atomic moves to prevent corruption.
- **Race condition protection**: Self-updates use directory-based locking to prevent concurrent modification.
- **Symlink protection**: Custom alias loading skips symbolic links to prevent symlink attacks.
- **Secure deletion**: Secret removal uses `shred` when available for secure file erasure.
- **No `exec` in installers**: Installation scripts print activation instructions instead of forcing shell replacement.

---

## Updating

Aliases auto-update on each new shell session.

**Force update:**

```bash
# Linux/macOS
source ~/.alias/load.sh

# Windows
. ~\.alias\load.ps1
```

---

## Uninstall

**Linux / macOS**

```sh
curl -sfS https://alias.hyberorbit.com/uninstall | sh
```

**Windows PowerShell**

```powershell
iwr -useb https://alias.hyberorbit.com/uninstall.ps1 | iex
```

---

## Troubleshooting

Windows: "Running scripts is disabled"

PowerShell blocks scripts by default. Fix:

```powershell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
```

Then reinstall.

Windows: Aliases not working

Open a new PowerShell window, or run:

```powershell
. ~\.alias\load.ps1
```

Windows: Garbled characters

Cosmetic issue with UTF-8. Install still works. Latest version uses ASCII-only output.

Linux/macOS: Aliases not working

```bash
source ~/.bashrc # or ~/.zshrc
```

Or open a new terminal.

Clean reinstall

**Linux/macOS:**

```sh
curl -sfS https://alias.hyberorbit.com/uninstall | sh
curl -sfS https://alias.hyberorbit.com/install | sh
```

**Windows:**

```powershell
iwr -useb https://alias.hyberorbit.com/uninstall.ps1 | iex
iwr -useb https://alias.hyberorbit.com/install.ps1 | iex
```

Alias conflicts

Some aliases (e.g., `gc`) override PowerShell built-ins. Use full command name if needed: `Get-Content` instead of `gc`.

---

## Requirements

| Platform | Requirement |
| -------- | ----------------------------------------------- |
| Linux | Bash, Zsh, or Fish, `curl`, `openssl` |
| macOS | Bash, Zsh, or Fish, `curl`, `openssl` |
| Windows | PowerShell 5.1+ (built-in on Windows 10/11) |

---

## Contributing

Contributions welcome! Please read our contributing guidelines.

1. Fork the repository
2. Create feature branch (`git checkout -b feature/new-alias`)
3. Commit changes (`git commit -m 'Add new alias'`)
4. Push to branch (`git push origin feature/new-alias`)
5. Open a Pull Request

---

## License

MIT License - see [LICENSE](LICENSE) for details.

---


Built with care by Hyber Orbit