Aliases
LazyJJ provides aliases that add value beyond built-in JJ commands. For shortcuts to native commands (st, d, n, e, ll), see lazyjj-shortcuts.toml.
Philosophy: Value-Add Over Shortcuts
LazyJJ’s approach to aliases:
- Value-add aliases: Do something Git or vanilla JJ don’t (these are in the main reference)
- Pure shortcuts: Just shorter names for existing commands (separate file)
This keeps the main aliases file focused on LazyJJ’s unique contributions to the JJ workflow.
Value-Add Aliases
These aliases add flags or combine commands beyond what JJ provides natively:
Diff Aliases
| Command | Shortcut | JJ Command | Purpose |
|---|---|---|---|
diff-summary | diffs | diff --summary --no-pager | Compact diff summary |
diff-files | diffls | diff --name-only --no-pager | List changed files only |
Log Aliases
| Command | Shortcut | JJ Command | Purpose |
|---|---|---|---|
log-short | l | log --limit 10 | Quick log (last 10 commits) |
log-history | hist | log --no-pager | Full history without pager |
Git Aliases
| Command | Shortcut | JJ Command | Purpose |
|---|---|---|---|
git-fetch | gf | git fetch | Fetch from remote |
Shortcuts
LazyJJ also provides shortcuts to native JJ commands via lazyjj-shortcuts.toml:
| Shortcut | JJ Command |
|---|---|
st | status |
d | diff |
ll | log |
n | new |
e | edit |
Examples
# Quick workflow using shortcutsjj st # Check what's changedjj d # See the diffjj n # Create new commitjj l # See recent history (last 10)
# Using value-add aliasesjj diff-files # Just file namesjj diff-summary # Summary of changesjj log-history # Full log without pager
# Fetch latestjj git-fetch # Same as 'jj git fetch'Customizing Aliases
To add your own aliases or override LazyJJ’s, create a file in ~/.config/jj/conf.d/ that sorts after lazyjj-*:
[aliases]# Add custom aliasesmylog = ["log", "--limit", "5", "-T", "builtin_log_compact"]
# Override a shortcutst = ["status", "--no-pager"]
Ernesto Jiménez