just : lanceur de commandes projet

VérifiéSûr

Guide d'utilisation de just, un lanceur de commandes Rust qui remplace Makefile : installation, syntaxe du justfile, arguments, dépendances et groupes de recettes.

Spar Skills Guide Bot
DeveloppementDébutant
17/11/2026
Claude CodeCursorWindsurfCopilotCodex
#just#command-runner#justfile#task-automation#dev-scripts

Recommandé pour

Synthèse automatique

Cette compétence documente just, un exécuteur de commandes qui regroupe les tâches d'un projet dans un fichier justfile et les lance via `just <recipe>`.

Points forts

  • Couvre l'installation sur toutes les plateformes (brew, cargo, apt, winget) avec vérification de la somme SHA256 des archives
  • Explique clairement la syntaxe des recettes : arguments par défaut, `*args`/`+args`, dépendances avant/après et arguments passés aux dépendances
  • Détaille les options utiles du quotidien : `set dotenv-load`, `--list`, `--show`, `--dry-run`, `--fmt` et les commentaires de documentation
  • Signale les pièges concrets : indentation mixte interdite, une ligne = un shell, nécessité d'un shebang ou de `[script]` pour les scripts multi-lignes

Limites

  • Le contenu fourni s'arrête au milieu d'une phrase sur `just --fmt --check`, donc la section finale est incomplète
  • Les modules et le découpage de recettes, annoncés dans la description, ne sont pas réellement traités
  • Aucune indication sur le comportement sous Windows (shell par défaut, chemins) ni section de dépannage
Quand l'utiliser

À utiliser quand il faut remplacer un Makefile ou centraliser les scripts de développement d'un projet dans un justfile avec arguments et fichiers .env.

Quand l'éviter

À éviter si l'on a besoin d'un système de build avec suivi des timestamps et rebuilds incrémentaux, ou si l'on cherche une référence complète sur les modules just.

Analyse de sécurité

Sûr
Score qualité80/100

This is documentation for the open-source `just` command runner. It contains no executable payloads, no curl|sh pipelines, and no instructions to transmit secrets; the only powerful operations mentioned (docker, npx, rm) appear inside clearly labeled example justfiles and are either confirmation-gated or scoped to a project-local cache directory. Risk of listing it is negligible.

Points d'attention
  • •Examples include destructive shell commands (`npx prisma migrate reset --force`, `rm -rf .cache`), but they are illustrative justfile content rather than instructions the agent must execute, and the destructive one is guarded by `[confirm(...)]` while the cache clean is `[private]`.
  • •`set dotenv-load` and backtick command substitutions are described as loading/executing local files and commands; both are documented with appropriate caveats (gitignored .env, quote untrusted args, failing backticks break all recipes).
  • •No network exfiltration, obfuscation, credential handling, or safety-disabling content; install section even recommends verifying release archives against SHA256SUMS.
  • •No prompt-injection or attempt to alter the auditor's role was present in the skill body.
  • •The sample justfile contains destructive operations (`npx prisma migrate reset --force`, `rm -rf .cache`, `docker push`) but these are documentation examples of just syntax, not instructions the agent is told to execute, and the risky ones are gated behind `[confirm]`.
Comment cette analyse est faite

name: just description: >- just is a command runner that saves project commands in a justfile and runs them with just <recipe>, like make without the build-system baggage. Use when a user asks to define project commands, replace a Makefile, create a command runner, standardize dev scripts, add recipe arguments, load .env files, or split recipes into modules. license: Apache-2.0 compatibility: 'Linux, macOS, Windows; single Rust binary, any language' metadata: author: terminal-skills version: "1.1.0" category: development tags: "just, command-runner, makefile, tasks, automation" repository: https://github.com/casey/just

just

Overview

just is a command runner: recipes live in a file called justfile and run with just <recipe>. It does not track file timestamps like make, so there are no phony targets, no tab-vs-space tricks beyond consistent indentation, and recipes can take arguments. just searches the current directory and its parents for the justfile, and runs recipes from the justfile's directory. The latest release at the time of writing is 1.59.0 (October 2026).

Instructions

Step 1: Install

Use a package manager:

brew install just          # macOS / Linux
cargo install just         # any platform with Rust
sudo apt install just      # Debian 13+ / Ubuntu 24.04+
winget install Casey.Just  # Windows

Or download a release archive from https://github.com/casey/just/releases and check it against the SHA256SUMS file published with the release before unpacking. Check the install with just --version. just --init writes a starter justfile; just --completions bash (also zsh, fish) prints shell completions.

Step 2: Write a justfile

# justfile: project commands
set dotenv-load
set shell := ["bash", "-euo", "pipefail", "-c"]

registry := "ghcr.io/northwind"
version := `git describe --tags --always`
stage := env("DEPLOY_STAGE", "staging")

default:
    @{{ just_executable() }} --list

# Run the test suite; extra words are forwarded
test *args:
    npm test -- {{ args }}

dev:
    npm run dev

[confirm("Wipe and re-seed the local database?")]
db-reset: && db-migrate db-seed
    npx prisma migrate reset --force --skip-seed

db-migrate:
    npx prisma migrate deploy

db-seed:
    npx prisma db seed

# Build and push the image tagged with the current git version
image tag=version:
    docker build -t {{ registry }}/web:{{ tag }} .
    docker push {{ registry }}/web:{{ tag }}

deploy env=stage: (image version)
    echo "Deploying {{ version }} to {{ env }}"
    npx vercel deploy --target {{ env }}

[group('docker')]
up:
    docker compose up -d

[group('docker')]
logs service="app":
    docker compose logs -f {{ service }}

Notes on the syntax:

  • Indent recipe lines consistently with spaces or tabs; mixing them is an error.
  • name arg="default" gives an argument a default; *args takes zero or more words, +args one or more.
  • a: b c runs dependencies first; a: && b c runs b and c after a; (image version) passes an argument to a dependency.
  • `cmd` in an assignment captures command output; env("NAME", "fallback") reads an environment variable.
  • A line starting with @ (or a recipe named @name:) is not echoed before it runs.
  • set dotenv-load loads .env from the justfile directory (or a parent) into the recipe environment.
  • Each recipe line runs in its own shell. For multi-line scripts put #!/usr/bin/env bash as the first line of the recipe body, or mark it [script].

Step 3: Run it

just                     # first recipe (here: default, which lists recipes)
just test --watch        # arguments after the recipe name
just deploy production   # override the default
just --list              # recipes with doc comments; --unsorted keeps file order
just --show deploy       # print one recipe
just --dry-run deploy    # print commands without running
just --fmt               # reformat the justfile in place; --check only reports
just --choose            # pick a recipe interactively (needs fzf or a chooser)
just -f ops/justfile -d .   # explicit justfile and working directory

Step 4: Attributes, modules and platforms

mod docs                      # loads docs.just, docs/justfile or docs/mod.just
alias t := test

[linux]
open:
    xdg-open http://localhost:3000

[macos]
open:
    open http://localhost:3000

[working-directory: 'frontend']
build:
    npm run build

[private]
_clean-cache:
    rm -rf .cache

Run module recipes with just docs build or just docs::build. Recipes whose names start with _ and recipes marked [private] are hidden from --list. [confirm] asks before running (answer y); --yes (or JUST_YES=true) skips the prompt, and --dry-run still asks, so a script or CI job that runs a confirmed recipe needs --yes or the process waits for input. [parallel] on a recipe runs its dependencies concurrently.

Examples

Example 1: Replace a Makefile in a Node project

Request: "Move our Makefile targets into something simpler and add a test recipe that takes flags."

Create the justfile with dev, build and test *args: recipes as above, then:

$ just test --coverage
npm test -- --coverage
 PASS  src/cart.test.ts
$ just --list
Available recipes:
    build
    dev
    test *args # Run the test suite; extra words are forwarded

just prints each command before running it; prefix a line with @ to silence it.

Example 2: Deploy with a confirmation and a default environment

Request: "Make just deploy default to staging, and ask before touching production."

[confirm("Deploy to production?")]
deploy-prod: (deploy "production")

deploy env="staging":
    ./scripts/deploy.sh {{ env }}
$ just deploy
./scripts/deploy.sh staging
$ just deploy-prod
Deploy to production? y
./scripts/deploy.sh production

Guidelines

  • just is a command runner, not a build system: it never skips a recipe because files are up to date. Keep make, Ninja or Bazel for incremental builds.
  • Call the same justfile from default with @{{ just_executable() }} --list rather than a bare just, so a recipe still works when just is not on PATH under that name.
  • Interpolate arguments with {{ arg }} only inside shell-safe contexts; for untrusted values use "{{ quote(arg) }}" or set positional-arguments and "$1".
  • Put set dotenv-load only where a .env file exists and is gitignored; a recipe sees its variables as environment variables, not just just variables.
  • Windows needs a shell: set windows-shell := ["powershell.exe", "-NoLogo", "-Command"], or use [script] recipes with an explicit interpreter.
  • 1.59.0 requires Unicode (UTF-8) paths; non-Unicode file names now raise an error.
  • Backtick assignments are evaluated whenever any recipe runs, so a failing one (for example git describe outside a repository) breaks every recipe; --list does not evaluate them.
  • Run just --fmt --check in CI to keep the file formatted.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/just-project-command-runner-mwirmdww/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/just-project-command-runner-mwirmdww' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/just-project-command-runner-mwirmdww/download' --output '.skill-downloads/just-project-command-runner-mwirmdww/SKILL.md.part' && mv '.skill-downloads/just-project-command-runner-mwirmdww/SKILL.md.part' '.skill-downloads/just-project-command-runner-mwirmdww/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Environnement déclaré par l’auteur : Linux, macOS, Windows; single Rust binary, any language

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/just-project-command-runner-mwirmdww/SKILL.md' && test -s '.skill-downloads/just-project-command-runner-mwirmdww/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/just' && cp -R '.skill-downloads/just-project-command-runner-mwirmdww' '.claude/skills/just'

Cursor
test -f '.skill-downloads/just-project-command-runner-mwirmdww/SKILL.md' && test -s '.skill-downloads/just-project-command-runner-mwirmdww/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/just' && cp -R '.skill-downloads/just-project-command-runner-mwirmdww' '.cursor/skills/just'

Codex
test -f '.skill-downloads/just-project-command-runner-mwirmdww/SKILL.md' && test -s '.skill-downloads/just-project-command-runner-mwirmdww/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/just' && cp -R '.skill-downloads/just-project-command-runner-mwirmdww' '.agents/skills/just'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/just-project-command-runner-mwirmdww'

openskills read 'just-project-command-runner-mwirmdww'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/just-project-command-runner-mwirmdww/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires