-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathroe-cli
More file actions
executable file
·62 lines (47 loc) · 1.09 KB
/
Copy pathroe-cli
File metadata and controls
executable file
·62 lines (47 loc) · 1.09 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
#!/bin/bash
# roe-cli - Development CLI for the Roe Python SDK
# Usage: ./roe-cli <command> [options]
set -e
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
show_help() {
cat << EOF
roe-cli - Development CLI for the Roe Python SDK
Usage: ./roe-cli <command>
Commands:
format Run code formatter and linter (Ruff)
help Show this help message
Examples:
./roe-cli format # Format and lint the codebase
EOF
}
cmd_format() {
cd "$SCRIPT_DIR"
echo "Running Ruff linter..."
uv run --group dev ruff check --fix .
echo "Running Ruff formatter..."
uv run --group dev ruff format .
echo "✨ Code is properly formatted and linted!"
}
main() {
if [[ $# -eq 0 ]]; then
show_help
exit 1
fi
local command="$1"
shift
case "$command" in
format)
cmd_format "$@"
;;
help|--help|-h)
show_help
;;
*)
echo "Unknown command: $command" >&2
echo ""
show_help
exit 1
;;
esac
}
main "$@"