-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
262 lines (209 loc) · 5.72 KB
/
Justfile
File metadata and controls
262 lines (209 loc) · 5.72 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# Set project-wide variables
command_name := "toggle"
args := " "
# Text colors
BLACK := '\033[30m'
RED := '\033[31m'
GREEN := '\033[32m'
YELLOW := '\033[33m'
BLUE := '\033[34m'
MAGENTA := '\033[35m'
CYAN := '\033[36m'
WHITE := '\033[37m'
GRAY := '\033[90m'
# Background colors
BG_BLACK := '\033[40m'
BG_RED := '\033[41m'
BG_GREEN := '\033[42m'
BG_YELLOW := '\033[43m'
BG_BLUE := '\033[44m'
BG_MAGENTA := '\033[45m'
BG_CYAN := '\033[46m'
BG_WHITE := '\033[47m'
# Text styles
BOLD := '\033[1m'
DIM := '\033[2m'
ITALIC := '\033[3m'
UNDERLINE := '\033[4m'
# Reset all styles
NC := '\033[0m'
# Display a symbol
CHECK := "$(GREEN)✓$(NC)"
CROSS := "$(RED)✗$(NC)"
DASH := "$(GRAY)-$(NC)"
# List all available recipes
@default:
just --list --unsorted
# Check if required tools are installed
[group('check')]
@check-deps:
@#!/usr/bin/env sh
if ! command -v just >/dev/null 2>&1; then echo "just is not installed"; exit 1; fi
if ! command -v cargo >/dev/null 2>&1; then echo "cargo is not installed"; exit 1; fi
if ! command -v rustc >/dev/null 2>&1; then echo "rust is not installed"; exit 1; fi
echo "All required tools are installed"
alias c := check-deps
# Runs a complete dev cycle: formats code, runs linter, executes tests, builds the app
[group('dev'), group('quick start')]
@dev:
just format
just lint
just test
just build
# just run
# Alias for dev (full developer cycle: format → lint → test → build)
alias cycle := dev
# Format code
[group('check'), group('quick start')]
@format:
echo "Running formatter..."
echo " rustfmt"
cargo fmt --all
alias f := format
# Run linter (code style and quality checks)
[group('check')]
@lint:
echo "Running linter..."
echo " clippy"
cargo clippy -- -D warnings
alias l := lint
# Run tests
[group('check')]
@test *options:
cargo test {{options}}
alias t := test
# Run benchmarks
[group('check')]
@bench:
cargo bench
alias be := bench
# Run all checks
[group('check'), group('quick start')]
@check: test lint
echo "All checks passed!"
alias ca := check
# Run debug package command.
[group('run'), group('quick start')]
@run-debug *args=args:
cargo run -- {{args}}
alias rd := run-debug
# Run release package command.
[group('run')]
@run-release *args=args:
cargo run --release -- {{args}}
alias rr := run-release
# Build package
[group('build')]
@build: check
cargo build
alias b := build
# Set up pre-commit hooks (install lefthook hooks into .git)
[group('pre-commit')]
@pre-commit-setup:
lefthook install
echo "{{GREEN}}Pre-commit hooks installed via lefthook.{{NC}}"
# Run all pre-commit checks manually
[group('pre-commit')]
@pre-commit-run:
lefthook run pre-commit
alias pc := pre-commit-run
# Check installed package version
[group('check')]
@version cmd=command_name:
{{cmd}} --version
# Clean up temporary files and caches
[group('clean'), group('quick start')]
@clean:
cargo clean
rm -rf target/
rm -rf Cargo.lock
rm -rf **/*.rs.bk
rm -rf .cargo-cache/
rm -rf .rustc_info.json
# Install Sphinx and any necessary extensions
[group('docs')]
@install-docs:
@#!/usr/bin/env sh
if ! command -v cargo >/dev/null 2>&1; then echo "cargo is not installed"; exit 1; fi
echo "Installing mdBook..."
cargo install mdbook
echo "Installing required mdBook components..."
cargo install mdbook-linkcheck
cargo install mdbook-mermaid
echo "{{GREEN}} Documentation dependencies installed"
# Not usually needed, Initialize docs only if you are starting a new project
[group('docs')]
@init-docs:
cargo doc --document-private-items --open
# Show help for documentation
[group('docs')]
@docs-help:
cargo doc --help
# Build documentation
[group('docs')]
@docs target:
@#!/usr/bin/env sh
if ! command -v mdbook >/dev/null 2>&1; then \
echo "mdBook is not installed. Run 'just install-docs' first"; \
exit 1; \
fi
echo "Building documentation..."
mdbook build docs
echo "{{GREEN}}Documentation built successfully{{NC}}"
# Run documentation server with hot reloading
[group('docs'), group('quick start')]
@docs-dev:
cargo doc --document-private-items --open --watch
# Clean documentation build files
[group('docs')]
@docs-clean:
cargo clean
rm -rf docs/build
rm -rf docs/source
# Build release version and install locally
[group('build')]
@build-release:
cargo build --release
@echo "{{GREEN}}Built release binary at target/release/{{command_name}}{{NC}}"
@echo "To make it available system-wide, copy it to a directory in your PATH:"
@echo "cp target/release/{{command_name}} ~/.local/bin/ # or another directory in your PATH"
alias br := build-release
# Run the simple Python test case
[group('test')]
@test-python:
@echo "Running Python test case..."
./tests/test_simple_python.sh
alias tp := test-python
# Help for Task Master
[group('help')]
taskmaster-help:
@echo "Help Task Master"
task-master --help
# Docs for Task Master
[group('docs')]
taskmaster-docs:
@echo "Task Master Docs"
open "https://github.com/eyaltoledano/claude-task-master"
# Version of Task Master
[group('version')]
taskmaster-version:
@echo "Task Master Version"
task-master --version
# Print Task Master quickstart commands
[group('help')]
taskmaster-quickstart:
@echo "Task Master Quickstart Commands:"
@echo "# Initialize a new project"
@echo "task-master init"
@echo ""
@echo "# Parse a PRD and generate tasks"
@echo "task-master parse-prd your-prd.txt"
@echo ""
@echo "# List all tasks"
@echo "task-master list"
@echo ""
@echo "# Show the next task to work on"
@echo "task-master next"
@echo ""
@echo "# Generate task files"
@echo "task-master generate"