$npx -y skills add disler/bowser --skill justUse just to save and run project-specific commands. Use when the user mentions justfile, recipe, or needs a simple alternative to make for task automation.
| 1 | # Just Command Runner |
| 2 | |
| 3 | [GitHub Repository](https://github.com/casey/just) |
| 4 | |
| 5 | `just` is a handy way to save and run project-specific commands. It's a command runner, not a build system, avoiding much of `make`'s complexity. |
| 6 | |
| 7 | ## Instructions |
| 8 | |
| 9 | ### Prerequisites |
| 10 | |
| 11 | - `just` must be installed: `brew install just` |
| 12 | - Commands are stored in a `justfile` (or `Justfile`). |
| 13 | |
| 14 | #### Common Settings (`set ...`) |
| 15 | |
| 16 | You can configure `just` behavior at the top of your `justfile`: |
| 17 | - `set shell := ["bash", "-c"]`: Change the default shell. |
| 18 | - `set dotenv-load`: Automatically load `.env` files. |
| 19 | - `set allow-duplicate-recipes`: Allow overriding recipes. |
| 20 | - `set fallback`: Search for `justfile` in parent directories. |
| 21 | - `set quiet`: Don't echo commands by default. |
| 22 | |
| 23 | ## Example Justfiles |
| 24 | |
| 25 | For complete reference, see these templates: |
| 26 | - [Node.js + Docker](examples/node-docker.just) |
| 27 | - [Python + Venv](examples/python-venv.just) |
| 28 | - [Bun + TypeScript](examples/bun-typescript.just) |
| 29 | - [Astral UV + Python](examples/uv-python.just) |
| 30 | - [Multi-Module / Advanced](examples/multi-module.just) |
| 31 | |
| 32 | ## Workflow |
| 33 | |
| 34 | 1. **Create a `justfile`**: |
| 35 | Define recipes at the top level of your project. **Always include a `default` recipe that lists available commands:** |
| 36 | ```just |
| 37 | default: |
| 38 | @just --list |
| 39 | ``` |
| 40 | ```just |
| 41 | # The default recipe (runs when calling `just` with no args) |
| 42 | default: |
| 43 | just --list |
| 44 | |
| 45 | # A basic recipe |
| 46 | test: |
| 47 | cargo test |
| 48 | |
| 49 | # A recipe with parameters |
| 50 | build target: |
| 51 | echo "Building {{target}}..." |
| 52 | cc main.c -o {{target}} |
| 53 | ``` |
| 54 | |
| 55 | 2. **Run Recipes**: |
| 56 | - Run the default recipe: `just` |
| 57 | - Run a specific recipe: `just <recipe>` |
| 58 | - Pass arguments to a recipe: `just build my-app` |
| 59 | - List all available recipes: `just --list` |
| 60 | |
| 61 | 3. **Advanced Features**: |
| 62 | - **Dependencies**: `test: build` (runs `build` before `test`). |
| 63 | - **Shebang Recipes**: Use other languages like Python or Node inside a recipe. |
| 64 | ```just |
| 65 | python-task: |
| 66 | #!/usr/bin/env python3 |
| 67 | print("Hello from Python!") |
| 68 | ``` |
| 69 | - **Dotenv**: `set dotenv-load` at the top of the file to load `.env`. |
| 70 | |
| 71 | ## Examples |
| 72 | |
| 73 | ### Example 1: Standard Development Justfile |
| 74 | |
| 75 | User request: |
| 76 | ``` |
| 77 | Create a justfile for my Node project to handle lint, test, and dev |
| 78 | ``` |
| 79 | |
| 80 | You would: |
| 81 | 1. Create a `justfile`: |
| 82 | ```just |
| 83 | default: |
| 84 | @just --list |
| 85 | |
| 86 | lint: |
| 87 | npm run lint |
| 88 | |
| 89 | test: |
| 90 | npm test |
| 91 | |
| 92 | dev: |
| 93 | npm run dev |
| 94 | ``` |
| 95 | 2. Tell the user they can now run `just dev` or `just test`. |
| 96 | |
| 97 | ### Example 2: Recipe with Parameters |
| 98 | |
| 99 | User request: |
| 100 | ``` |
| 101 | Add a recipe to just to deploy to a specific environment |
| 102 | ``` |
| 103 | |
| 104 | You would: |
| 105 | 1. Edit the `justfile`: |
| 106 | ```just |
| 107 | deploy env: |
| 108 | echo "Deploying to {{env}}..." |
| 109 | ./scripts/deploy.sh --target {{env}} |
| 110 | ``` |
| 111 | 2. Inform the user they can run `just deploy production`. |
| 112 | |
| 113 | ### Example 3: Listing Recipes |
| 114 | |
| 115 | User request: |
| 116 | ``` |
| 117 | What commands are available in this project? |
| 118 | ``` |
| 119 | |
| 120 | You would: |
| 121 | 1. Run `just --list` to see available recipes and their comments. |