mcpField
J
justfile

justfile

github.com/mizchiDevelopment41658 installsUpdated 1w ago
Repository

About justfile

A skill covering just, a command runner for project-specific tasks, and its justfile syntax. It is for developers organizing repeatable project commands, with examples for recipes, variables, settings, and conditional logic.

Key features

  1. 01Define default and named recipes
  2. 02Set variables and environment values
  3. 03Configure shell and dotenv loading
  4. 04Branch on OS and architecture
  5. 05List, preview, and format commands

Use cases

  1. 01Wrap common project build commands
  2. 02Create parameterized development tasks
  3. 03Choose install commands by OS or architecture
  4. 04Run just in GitHub Actions

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mizchi/skills --skill justfile

After installing, type/justfilein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
.claude-plugin/
manifest.json
assets/
gh_action_example.yaml
justfile

Details

From the project README

justfile Skill

just is a command runner for project-specific commands. Similar to Make but simpler.

Basic Syntax

# Default recipe (runs when just is called without arguments)
default:
  @echo "Available: just --list"

# Basic recipe
build:
  cargo build --release

# Dependencies
test: build
  cargo test

# Arguments
greet name:
  echo "Hello, {{name}}!"

# Default arguments
serve port="8080":
  python -m http.server {{port}}

# Variadic arguments
run *args:
  cargo run -- {{args}}

Variables

# String
version := "1.0.0"

# Shell command result
git_hash := `git rev-parse --short HEAD`

# Environment variable with default
home := env_var_or_default("HOME", "/tmp")

# Usage
info:
  echo "Version: {{version}}, Hash: {{git_hash}}"

Settings

# Shell
set shell := ["bash", "-cu"]

# Load .env
set dotenv-load

# Continue on error
set ignore-errors

# Suppress command echo
set quiet

# Working directory
set working-directory := "subdir"

Conditionals

# OS detection
install:
  {{if os() == "macos" { "brew install foo" } else { "apt install foo" }}}

# Architecture detection
build:
  {{if arch() == "aarch64" { "make arm" } else { "make x86" }}}

Built-in Functions

FunctionDescription
os()OS name (linux, macos, windows)
arch()Architecture (x86_64, aarch64)
env_var("NAME")Get environment variable
justfile_directory()Directory containing justfile
invocation_directory()Directory where just was invoked

Common Commands

just              # Run default recipe
just recipe       # Run specific recipe
just recipe arg   # Run with arguments
just --list       # List recipes
just --dry-run    # Show without running
just --choose     # Select with fzf
just --fmt        # Format justfile

GitHub Actions

Use extractions/setup-just@v4. See assets/gh_action_example.yaml for full example.

steps:
  - uses: actions/checkout@v7

  - uses: extractions/setup-just@v4
    # with:
    #   just-version: '1.58.0'  # Optional pin (latest as of 2026-09)

  - run: just build
  - run: just test

Practical Example

set dotenv-load
set shell := ["bash", "-cu"]

default:
  @just --list

# Dev server
dev:
  npm run dev

# Build
build:
  npm run build

# Test
test *args:
  npm test {{args}}

# Lint + format
check:
  npm run lint
  npm run format:check

# CI (called from GitHub Actions)
ci: check build test

# Release
release version:
  git tag -a v{{version}} -m "Release v{{version}}"
  git push origin v{{version}}

# Cleanup
clean:
  rm -rf dist node_modules

References

Comments

Markdown supported