-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
140 lines (100 loc) · 3.65 KB
/
justfile
File metadata and controls
140 lines (100 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# forestage — opinionated Claude Code distribution
# Default: list recipes
default:
@just --list
# ─── Build & Run ───────────────────────────────────────
# Build the binary
build:
cargo build
# Build release binary
build-release:
cargo build --release
# Run forestage with arguments
run *args:
cargo run -- {{args}}
# Run in dev mode (same as run, for parity with old workflow)
dev *args:
cargo run -- {{args}}
# ─── Test ──────────────────────────────────────────────
# Run all tests
test:
cargo test
# Run doc tests
test-doc:
cargo test --doc 2>/dev/null || echo "no library target — skipping doc tests"
# Run a specific test by name
test-one name:
cargo test -- {{name}}
# ─── Quality Checks ───────────────────────────────────
# Pre-commit check (matches CI)
check: check-fmt check-clippy check-deny
# Full check including extras
check-all: check check-toml
# Check formatting (nightly rustfmt)
check-fmt:
cargo +nightly fmt --all -- --check
# Run clippy with warnings as errors
check-clippy:
cargo clippy --all-targets --all-features -- -D warnings
# Check licenses and advisories
check-deny:
cargo deny check advisories licenses bans
# Check TOML formatting
check-toml:
taplo fmt --check
# Alias
lint: check
# ─── Formatting ───────────────────────────────────────
# Format Rust code (nightly)
fmt:
cargo +nightly fmt --all
# Format TOML files
fmt-toml:
taplo fmt
# Format everything
fmt-all: fmt fmt-toml
# ─── CI Mirror ────────────────────────────────────────
# Run all CI jobs locally (fail-fast order)
ci: check-fmt check-clippy build check-deny test test-doc
# ─── Development ──────────────────────────────────────
# Watch mode: check + test on change
watch:
cargo watch -x 'check' -x 'test --lib'
# Generate docs
doc:
cargo doc --no-deps
# Generate and open docs
doc-open:
cargo doc --no-deps --open
# Clean build artifacts
clean:
cargo clean
# ─── tmux ─────────────────────────────────────────────
# Start tmux session
start:
tmux/start-session.sh
# ─── Persona ──────────────────────────────────────────
# List available personas
persona-list:
cargo run -- persona list
# Show a specific persona
persona-show name:
cargo run -- persona show {{name}}
# Show resolved config
config:
cargo run -- config
# ─── Setup ────────────────────────────────────────────
# First-time environment setup
setup:
rustup component add clippy
rustup toolchain install nightly --component rustfmt
cargo install cargo-watch cargo-deny cargo-insta
@echo "Optional: brew install taplo (TOML formatter)"
@echo "Optional: cargo install cargo-nextest (parallel tests)"
# Install git hooks
install-hooks:
lefthook install
# ─── Maintenance ──────────────────────────────────────
# Security audit
audit:
cargo audit