Skip to content

Justfile Commands

All available commands in generated projects.

Quick Reference

just --list  # Show all commands

Development Setup

install

Install all dependencies including dev tools.

just install
# Runs: uv sync --all-extras

install-prod

Install only production dependencies.

just install-prod
# Runs: uv sync

Running

serve

Start the API server.

just serve
just serve --port 3000  # With arguments

dev

Start development server with auto-reload.

just dev
# Runs: uvicorn my_project.api.main:app --reload

cli

Run CLI commands.

just cli --help
just cli version
just cli create "My Entity" -d "Description"

Code Quality

check

Run all quality checks (lint, typecheck, test).

just check

lint

Run Ruff linter.

just lint
# Runs: uv run ruff check src/ tests/

lint-fix

Fix linting issues automatically.

just lint-fix
# Runs: uv run ruff check src/ tests/ --fix

format

Format code with Ruff.

just format
# Runs: uv run ruff format src/ tests/

format-check

Check formatting without changes.

just format-check

typecheck

Run MyPy type checker.

just typecheck
# Runs: uv run mypy src/

security

Run Bandit security scanner.

just security
# Runs: uv run bandit -r src/

Testing

test

Run all tests.

just test
just test -v              # Verbose
just test tests/unit/     # Specific directory

test-cov

Run tests with coverage report.

just test-cov
# Generates terminal and HTML reports

test-watch

Run tests in watch mode.

just test-watch
# Requires pytest-watch

test-unit

Run only unit tests.

just test-unit

test-integration

Run only integration tests.

just test-integration

Documentation

docs-serve

Serve documentation locally.

just docs-serve
# Opens http://localhost:8000

docs-build

Build static documentation.

just docs-build
# Output in site/

docs-deploy

Deploy to GitHub Pages.

just docs-deploy
# Runs: mkdocs gh-deploy --force

docs-check

Build with strict mode to catch errors.

just docs-check

Build & Release

build

Build the package.

just build
# Runs: uv build
# Output in dist/

clean

Remove build artifacts.

just clean
# Removes: build/, dist/, __pycache__, etc.

version

Show current version.

just version
# From hatch-vcs (git tags)

Docker

docker-build

Build Docker image.

just docker-build

docker-run

Run Docker container.

just docker-run

up

Start all services with Docker Compose.

just up

down

Stop all services.

just down

logs

View container logs.

just logs
just logs app -f  # Follow specific service

Database

db-up

Start database services.

just db-up

db-down

Stop database services.

just db-down

Git Shortcuts

save

Quick commit all changes.

just save "commit message"
# Runs: git add -A && git commit -m "message"

undo

Undo last commit (keep changes).

just undo
# Runs: git reset --soft HEAD~1

Customizing

Edit justfile to add your own commands:

# My custom command
deploy:
    ssh server "cd /app && git pull && docker compose up -d"