One config for every shell shortcut.
Generate aliases and functions for bash, zsh, fish, and PowerShell from a single YAML or JSONC config.
Define your shell shortcuts once and generate the right output for every shell. No more aliases duplicated across .zshrc, .bashrc, and PowerShell profiles, drifting out of sync.
- Single source of truth for bash, zsh, fish, and PowerShell
- Project-level overrides for repository-specific commands
- Built-in PowerShell conflict handling
-
Create
~/.config/shaka.yaml:dc: docker compose gs: git status
-
Evaluate the generated code in your shell (swap
zshfor your shell):eval "$(shaka zsh)"
This makes
gs,dc, etc. available in the current session. Add the same line to your shell profile to load them automatically.
# Linux/macOS
curl -fsSL https://github.com/NazmusSayad/shaka/raw/main/install.sh | sh
# Windows (PowerShell)
(Invoke-WebRequest -UseBasicParsing https://github.com/NazmusSayad/shaka/raw/main/install.ps1).Content | Invoke-ExpressionUsing cargo:
cargo install shaka # from crates.ioshaka prints shell code to stdout. Load it per shell:
eval "$(shaka bash)"
eval "$(shaka zsh)"
shaka fish | source
Invoke-Expression (& shaka pwsh | Out-String)Valid arguments: bash, zsh, fish, pwsh, pwsh-conflict. A missing or unsupported argument exits with an error and the usage string.
Files are loaded in this order; later files override earlier ones by key.
| Scope | Paths |
|---|---|
| Global | ~/.config/shaka.yaml, ~/.config/shaka.json, ~/.shaka.yaml, ~/.shaka.json |
| Project | ./.shaka.yaml, ./.shaka.json (higher priority than global) |
So personal defaults live in your home directory, and a repository can override or add commands locally:
# ~/.config/shaka.yaml
dc: docker compose
ls: eza# ./.shaka.yaml
dc: docker compose -f dev.yml # replaces the global dc
test: cargo testYAML or JSONC:
dc: docker compose
gs: git statusA value can be an object with a required cmd plus optional platform and/or shell filters. The entry is emitted only when the current platform and shell match; otherwise it is dropped before merging (so it never shadows a matching entry from an earlier file).
platform—windows,linux, ormacosshell—bash,zsh,fish,pwsh, orpwsh-conflict
Both accept a single value or a list; when both are given, both must match. A plain string applies everywhere. An unknown name is a configuration error.
gs: git status # all platforms and shells
ll:
cmd: eza -l
platform: [linux, macos]
open:
cmd: explorer .
platform: windows
shell: pwshbash, zsh, and fish render aliases:
alias dc='docker compose'PowerShell renders functions. By default shaka pwsh removes any existing alias of the same name first, avoiding conflicts with built-ins:
Remove-Alias -Name dc -Force -ErrorAction SilentlyContinue
function dc { docker compose @args }To keep built-in aliases and emit only functions, use pwsh-conflict:
function dc { docker compose @args }In pwsh mode only, shaka expands environment variables ($NAME and $env:NAME) in command values before rendering. Missing variables are left unchanged. This keeps machine-specific paths out of your config:
n: $HOME/.local/bin/nodefunction n { C:/Users/you/.local/bin/node @args }
{ // comments are allowed "dc": "docker compose", "gs": "git status", }