Skip to content

Commit 833190f

Browse files
committed
docs: add prereq script to setup instructions, check just + node
- Add 'just' and 'node' (>=20) to check-dev-prereqs.sh required checks - Update README, CONTRIBUTING, AGENTS.md, CLAUDE.md to mention running 'bash scripts/check-dev-prereqs.sh' before 'just setup' since just itself may not be installed yet
1 parent 5113966 commit 833190f

5 files changed

Lines changed: 26 additions & 7 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ just run <args> # Run CLI with arguments (e.g., just run status)
5252
just dev # Start local runtime (local submodule + cached sandbox rebuild)
5353
```
5454

55-
Run `just setup` before any other project command after cloning this repo. In new worktrees, initialize the submodule first with `git submodule update --init --recursive`, then run `just setup`.
55+
Run `bash scripts/check-dev-prereqs.sh` to verify all required and optional tools are installed. Then run `just setup` before any other project command after cloning this repo. In new worktrees, initialize the submodule first with `git submodule update --init --recursive`, then run `just setup`.
5656

5757
Setup reference:
5858
- Rust toolchain: `1.89` (from `rust-toolchain.toml`)

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ just run <args> # Run CLI with arguments (e.g., just run status)
5252
just dev # Start local runtime (local submodule + cached sandbox rebuild)
5353
```
5454

55-
Run `just setup` before any other project command after cloning this repo. In new worktrees, initialize the submodule first with `git submodule update --init --recursive`, then run `just setup`.
55+
Run `bash scripts/check-dev-prereqs.sh` to verify all required and optional tools are installed. Then run `just setup` before any other project command after cloning this repo. In new worktrees, initialize the submodule first with `git submodule update --init --recursive`, then run `just setup`.
5656

5757
Setup reference:
5858
- Rust toolchain: `1.89` (from `rust-toolchain.toml`)

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ git clone https://github.com/pRizz/opencode-cloud.git
3333
git clone https://gitea.com/pRizz/opencode-cloud.git
3434
cd opencode-cloud
3535

36-
# Bun is required for this repo
37-
bun --version
36+
# Check prerequisites (can run before installing just)
37+
bash scripts/check-dev-prereqs.sh
3838

3939
# First command after clone/worktree init (hooks + deps + submodule bootstrap)
4040
just setup

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ git clone https://github.com/pRizz/opencode-cloud.git
282282
git clone https://gitea.com/pRizz/opencode-cloud.git
283283
cd opencode-cloud
284284

285-
# Bun is required for this repo
286-
bun --version
285+
# Check prerequisites (run this before anything else)
286+
bash scripts/check-dev-prereqs.sh
287287

288-
# First command after clone/worktree init
288+
# First command after clone/worktree init (hooks + deps + submodule bootstrap)
289289
just setup
290290
just build
291291
just dev # Recommended local dev start shortcut
@@ -587,6 +587,9 @@ Data (PID files, etc.) is stored at:
587587
- **Node.js 20+** — for the Node CLI wrapper
588588
589589
```bash
590+
# Check prerequisites (can run before installing just)
591+
bash scripts/check-dev-prereqs.sh
592+
590593
# First command after clone/worktree init (hooks + deps + submodule bootstrap)
591594
just setup
592595

scripts/check-dev-prereqs.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,25 @@ warn_if_missing() {
7070
echo "Checking development prerequisites..."
7171

7272
require_command "git" "Install Git (https://git-scm.com/downloads)."
73+
require_command "just" "Install just: 'brew install just' or 'cargo install just' (https://github.com/casey/just)."
7374
require_command "bun" "Install Bun (https://bun.sh)."
7475
require_command "cargo" "Install Rust via rustup (https://rustup.rs)."
7576
require_command "rustc" "Install Rust via rustup (https://rustup.rs)."
77+
require_command "node" "Install Node.js 20+ (https://nodejs.org)."
78+
79+
if command -v node >/dev/null 2>&1; then
80+
node_raw="$(node --version | sed 's/^v//')"
81+
node_version="$(version_parts_or_empty "$node_raw")"
82+
if [[ -z "$node_version" ]]; then
83+
print_error "Could not parse Node.js version from: $node_raw"
84+
required_failures=$((required_failures + 1))
85+
elif version_ge "$node_version" "20.0.0"; then
86+
print_ok "node version $node_version >= 20.0.0"
87+
else
88+
print_error "node version $node_version is too old. Required: >= 20.0.0"
89+
required_failures=$((required_failures + 1))
90+
fi
91+
fi
7692

7793
if command -v bun >/dev/null 2>&1; then
7894
bun_raw="$(bun --version | head -n1)"

0 commit comments

Comments
 (0)