casey / casey/just

Feature: Auto-generate recipe aliases from first letters of words

Open
#2,975 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
35.8k
Forks
846
Avg merge
27m
Merged PRs (30d)
3

Description

## Problem

Currently, recipe aliases must be manually defined in justfiles. For recipes with multi-word names like `full-check`, users often want short aliases using the first letter of each word (e.g., `fc`). This pattern is so common that I've aliased nearly all of my recipes this way:

```just
alias fc := full-check

full-check:
# recipe body
```

This creates repetitive boilerplate and maintenance overhead when renaming recipes.

## Proposed Solution

Add support for auto-generated aliases based on the first letter of each word in a recipe name (split on hyphens or underscores).

For example:
- `full-check` → auto-alias `fc`
- `build-docker-image` → auto-alias `bdi`
- `run-integration-tests` → auto-alias `rit`

### Possible Approaches

**Option 1: Opt-in via recipe attribute**
```just
[auto-alias]
full-check:
# recipe body
```

**Option 2: Global setting in justfile**
```just
set auto-alias := true

full-check: # automatically gets 'fc' alias
# recipe body
```

> [!NOTE]
> Collision handling would be important - if `fc` is already used by `format-code`, `just` should either error or fall back to manual aliasing. In any case, the user should be informed.

## Benefits

- Reduces boilerplate for common aliasing patterns
- Maintains consistency across recipes
- Makes justfiles easier to maintain when renaming recipes
- Preserves backward compatibility (manual aliases still work)

Contributor guide

Open the contributing guide

Research direction

Start by clarifying whether auto-aliases are enabled through a recipe attribute or a global justfile setting. Define the expected behavior for hyphens and underscores, alias collisions, manual aliases, and renamed recipes. Done means the chosen behavior is specified, implemented, and verified for the examples in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.