Generate a justfile for this project with standard recipes based on the detected project type.
Instructions
-
Detect project type by checking for these files (in order):
mix.exs→ Elixir/Phoenixpackage.json→ Node.jspyproject.tomlorrequirements.txt→ Pythongo.mod→ GoCargo.toml→ Rust
-
Detect deployment method by checking for:
fly.toml→ usefly deployDockerfilewith no fly.toml → usedocker buildplaceholderpackage.jsonwith deploy script → use that scriptdeploy.sh→ use./deploy.sh- Otherwise → placeholder with TODO
- Generate justfile with these recipes:
Project-Specific Commands
Elixir/Phoenix
# Start development server
up:
mix phx.server
# Deploy to production
deploy:
fly deploy
# Run tests
test:
mix test
# Run quality checks
check:
mix check
# Compile the project
build:
mix compile
# Clean build artifacts
clean:
mix clean
rm -rf _build deps
Node.js
# Start development server
up:
npm run dev
# Deploy to production
deploy:
npm run deploy
# Run tests
test:
npm test
# Run linting
check:
npm run lint
# Build the project
build:
npm run build
# Clean build artifacts
clean:
rm -rf node_modules dist build .next
Python
# Start development server
up:
python -m uvicorn main:app --reload
# Deploy to production
deploy:
# TODO: Configure deployment
# Run tests
test:
pytest
# Run linting
check:
ruff check .
# Build the project
build:
pip install -e .
# Clean build artifacts
clean:
rm -rf __pycache__ .pytest_cache .ruff_cache dist build *.egg-info
Go
# Start development server
up:
go run .
# Deploy to production
deploy:
# TODO: Configure deployment
# Run tests
test:
go test ./...
# Run linting
check:
go vet ./...
# Build the project
build:
go build -o bin/app .
# Clean build artifacts
clean:
rm -rf bin
Rust
# Start development server
up:
cargo run
# Deploy to production
deploy:
# TODO: Configure deployment
# Run tests
test:
cargo test
# Run linting
check:
cargo clippy
# Build the project
build:
cargo build --release
# Clean build artifacts
clean:
cargo clean
Additional Guidelines
- If
fly.tomlexists, always usefly deployfor the deploy recipe - For Node.js, check
package.jsonscripts and use the actual script names (e.g.,dev,start,serve) - For Phoenix projects, check if
mix checkalias exists in mix.exs; if not, usemix credo --strict - Add a comment at the top of the justfile:
# Project automation recipes - If the project type cannot be determined, ask the user what type of project it is
Output
Write the justfile to the project root. If a justfile already exists, ask before overwriting.