-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathjustfile
More file actions
96 lines (76 loc) · 2.35 KB
/
justfile
File metadata and controls
96 lines (76 loc) · 2.35 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
# Opcode - NixOS Build & Development Commands
# Show available commands
default:
@just --list
# Enter the Nix development environment
shell:
nix-shell
# Install frontend dependencies
install:
npm install
# Build the React frontend
build-frontend:
npm run build
# Build the Tauri backend (debug)
build-backend:
cd src-tauri && cargo build
# Build the Tauri backend (release)
build-backend-release:
cd src-tauri && cargo build --release
# Build everything (frontend + backend)
build: install build-frontend build-backend
# Run the application in development mode
run: build-frontend
cd src-tauri && cargo run
# Run the application (release mode)
run-release: build-frontend build-backend-release
cd src-tauri && cargo run --release
# Clean all build artifacts
clean:
rm -rf node_modules dist
cd src-tauri && cargo clean
# Development server (requires frontend build first)
dev: build-frontend
cd src-tauri && cargo run
# Run tests
test:
cd src-tauri && cargo test
# Format Rust code
fmt:
cd src-tauri && cargo fmt
# Check Rust code
check:
cd src-tauri && cargo check
# Quick development cycle: build frontend and run
quick: build-frontend
cd src-tauri && cargo run
# Full rebuild from scratch
rebuild: clean build run
# Run web server mode for phone access
web: build-frontend
cd src-tauri && cargo run --bin opcode-web
# Run web server on custom port
web-port PORT: build-frontend
cd src-tauri && cargo run --bin opcode-web -- --port {{PORT}}
# Get local IP for phone access
ip:
@echo "🌐 Your PC's IP addresses:"
@ip route get 1.1.1.1 | grep -oP 'src \K\S+' || echo "Could not detect IP"
@echo ""
@echo "📱 Use this IP on your phone: http://YOUR_IP:8080"
# Show build information
info:
@echo "🚀 Opcode - Claude Code GUI Application"
@echo "Built for NixOS without Docker"
@echo ""
@echo "📦 Frontend: React + TypeScript + Vite"
@echo "🦀 Backend: Rust + Tauri"
@echo "🏗️ Build System: Nix + Just"
@echo ""
@echo "💡 Common commands:"
@echo " just run - Build and run (desktop)"
@echo " just web - Run web server for phone access"
@echo " just quick - Quick build and run"
@echo " just rebuild - Full clean rebuild"
@echo " just shell - Enter Nix environment"
@echo " just ip - Show IP for phone access"