Loading...
Loading...
This skill should be used when the user asks to "create a justfile", "write just recipes", "configure just settings", "add just modules", "use just attributes", "set up task automation", mentions justfile, just command runner, or task automation with just.
npx skill4agent add paulrberg/agent-skills cli-justset allow-duplicate-recipes # Allow recipes to override imported ones
set allow-duplicate-variables # Allow variables to override imported ones
set shell := ["bash", "-euo", "pipefail", "-c"] # Strict bash with error handling
set unstable # Enable unstable features (modules, script attribute)
set dotenv-load # Auto-load .env file
set positional-arguments # Pass recipe args as $1, $2, etc.| Attribute | Purpose |
|---|---|
| Configure parameter as |
| Constrain parameter to match regex pattern |
| Group recipes in |
| Don't change to justfile directory |
| Hide from |
| Execute recipe as single script block |
| Use specific interpreter (bash, python, etc.) |
| Require user confirmation before running |
| Override recipe documentation |
| Enable positional args for this recipe only |
[arg()]# Long option (--target)
[arg("target", long)]
build target:
cargo build --target {{ target }}
# Short option (-v)
[arg("verbose", short="v")]
run verbose="false":
echo "Verbose: {{ verbose }}"
# Combined long + short
[arg("output", long, short="o")]
compile output:
gcc main.c -o {{ output }}
# Flag without value (presence sets to "true")
[arg("release", long, value="true")]
build release="false":
cargo build {{ if release == "true" { "--release" } else { "" } }}
# Help string (shown in `just --usage`)
[arg("target", long, help="Build target architecture")]
build target:
cargo build --target {{ target }}just build --target x86_64
just build --target=x86_64
just compile -o main
just build --release
just --usage build # Show recipe argument help[no-cd, private]
[group("checks")]
recipe:
echo "hello"| Constant | Description |
|---|---|
| Text colors |
| Text styles |
| Reset formatting |
| Background colors (BG_RED, BG_GREEN, etc.) |
| Hexadecimal digits |
@status:
echo -e '{{ GREEN }}Success!{{ NORMAL }}'
echo -e '{{ BOLD + CYAN }}Building...{{ NORMAL }}'# Require executable exists (fails recipe if not found)
jq := require("jq")
# Get environment variable with default
log_level := env("LOG_LEVEL", "info")
# Get justfile directory path
root := justfile_dir()@_run-with-status recipe *args:
echo ""
echo -e '{{ CYAN }}→ Running {{ recipe }}...{{ NORMAL }}'
just {{ recipe }} {{ args }}
echo -e '{{ GREEN }}✓ {{ recipe }} completed{{ NORMAL }}'
alias rws := _run-with-status[group("checks")]
@biome-check +globs=".":
na biome check {{ globs }}
alias bc := biome-check
[group("checks")]
@biome-write +globs=".":
na biome check --write {{ globs }}
alias bw := biome-write[group("checks")]
@full-check:
just _run-with-status biome-check
just _run-with-status prettier-check
just _run-with-status tsc-check
echo ""
echo -e '{{ GREEN }}All code checks passed!{{ NORMAL }}'
alias fc := full-check
[group("checks")]
@full-write:
just _run-with-status biome-write
just _run-with-status prettier-write
echo ""
echo -e '{{ GREEN }}All code fixes applied!{{ NORMAL }}'
alias fw := full-write| Recipe | Alias | Recipe | Alias |
|---|---|---|---|
| full-check | fc | full-write | fw |
| biome-check | bc | biome-write | bw |
| prettier-check | pc | prettier-write | pw |
| mdformat-check | mc | mdformat-write | mw |
| tsc-check | tc | ruff-check | rc |
| test | t | build | b |
[script("interpreter")][script("node")]
fetch-data:
const response = await fetch('https://api.example.com/data');
const data = await response.json();
console.log(data);
[script("python3")]
analyze:
import json
with open('package.json') as f:
pkg = json.load(f)
print(f"Package: {pkg['name']}@{pkg['version']}")
[script("bash")]
deploy:
set -e
npm run build
aws s3 sync dist/ s3://bucket/#!/usr/bin/env interpreternode-script:
#!/usr/bin/env node
console.log(`Node ${process.version}`);
console.log(JSON.stringify(process.env, null, 2));
python-script:
#!/usr/bin/env python3
import sys
print(f"Python {sys.version}")
bash-script:
#!/usr/bin/env bash
set -euo pipefail
echo "Running on $(uname -s)"[script()]set unstableimport "./just/settings.just"
import "./just/base.just"
import? "./local.just" # Optional (no error if missing)set unstablemod foo # Loads foo.just or foo/justfile
mod bar "path/to/bar" # Custom path
mod? optional # Optional module
# Call module recipes
just foo::build@sablier/devkitimport "./node_modules/@sablier/devkit/just/base.just"
import "./node_modules/@sablier/devkit/just/npm.just"# ---------------------------------------------------------------------------- #
# DEPENDENCIES #
# ---------------------------------------------------------------------------- ## Show available commands
default:
@just --list# ---------------------------------------------------------------------------- #
# DEPENDENCIES #
# ---------------------------------------------------------------------------- #
# Bun: https://bun.sh
bun := require("bun")
# Ni: https://github.com/antfu-collective/ni
na := require("na")
ni := require("ni")
nlx := require("nlx")
# Usage: invoke directly in recipes (not with interpolation)
build:
bun next buildrequire()bun{{ bun }}Use context7 MCP with library ID `/websites/just_systems-man` to get up-to-date Just documentation.modules import modsettingsattributesfunctionsscript recipesreferences/settings.mdreferences/recipes.mdreferences/syntax.mdreferences/patterns.mdexamples/devkit.juststandalone.just/websites/just_systems-man@@echo "quiet"+test +args*build *flagsGLOBS := "\"**/*.json\""[no-cd]_[private]