A fast, simple CLI tool to manage your bash aliases, perfect for SSH shortcuts and frequently used commands.
- π Fast - Written in Rust for blazing speed
- π― Simple - Intuitive commands to add, list, and execute aliases
- π§ Practical - Built for developers who SSH into multiple servers
- π Clean - Manages your
.bash_aliases
file automatically
cargo install rbam
git clone https://github.com/yourusername/rbam
cd rbam
cargo install --path .
# Add your first alias
rbam add
# Name: prod-server
# Command: ssh deploy@production.example.com
# List all aliases
rbam list
# List with full commands
rbam list --full
# Execute an alias
rbam exec prod-server
After adding aliases, reload your shell:
source ~/.bash_aliases
Interactive mode - prompts for name and command:
rbam add
Example session:
Name: cdn-staging
Command: ssh -p 2222 deploy@cdn.staging.example.com
β Added alias: cdn-staging
To use immediately, run:
source ~/.bash_aliases
Show alias names only:
rbam list
Output:
cdn-staging
prod-server
db-backup
Show full details:
rbam list --full
Output:
alias cdn-staging='ssh -p 2222 deploy@cdn.staging.example.com'
alias prod-server='ssh deploy@production.example.com'
alias db-backup='ssh root@backup.example.com'
Run a command from an alias without sourcing:
rbam exec cdn-staging
Useful for testing before sourcing your shell.
rbam add
# Name: prod
# Command: ssh deploy@prod.example.com
rbam add
# Name: staging
# Command: ssh deploy@staging.example.com -p 2222
rbam add
# Name: dps
# Command: docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
rbam add
# Name: gst
# Command: git status -sb
rbam add
# Name: proj
# Command: cd ~/projects/myapp && ls
rbam manages your .bash_aliases
file located at:
~/.bash_aliases
This file is automatically sourced by .bashrc
on most systems.
- Rust 1.70 or higher (for building from source)
- Bash shell
- Linux or macOS
- β Linux
- β macOS
β οΈ Windows (via Git Bash or WSL)
rbam stores aliases in ~/.bash_aliases
. No additional configuration needed.
# Clone the repository
git clone https://github.com/yourusername/rbam
cd rbam
# Run tests
cargo test
# Build release
cargo build --release
# Binary will be at
./target/release/rbam
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Clone your fork:
git clone https://github.com/yourusername/rbam
- Create a branch:
git checkout -b feature/my-feature
- Make changes and add tests
- Run tests:
cargo test
- Format code:
cargo fmt
- Check with clippy:
cargo clippy
- Commit:
git commit -m "Add my feature"
- Push:
git push origin feature/my-feature
- Open a Pull Request
- Remove alias command
- Search/filter aliases
- Import/export aliases
- Shell completion (bash, zsh, fish)
- Edit alias interactively
- Backup and restore
- Windows PowerShell support
Q: Where are my aliases stored?
A: In ~/.bash_aliases
in your home directory.
Q: How do I remove an alias?
A: Currently, manually edit ~/.bash_aliases
. Remove command coming soon!
Q: Do I need to restart my terminal?
A: No, just run source ~/.bash_aliases
to reload.
Q: Can I use this with zsh?
A: Yes! Add source ~/.bash_aliases
to your ~/.zshrc
.
Q: What if I already have a .bash_aliases file? A: rbam appends to it, preserving existing aliases.
MIT License - see LICENSE file for details.
Your Name - @yourhandle
- Built with Rust
- Inspired by the need for simpler SSH alias management
Star β this repo if you find it useful!