Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,18 @@ Read the full vision in the [roadmap](docs/content/docs/(deployment)/roadmap.mdx
### Build and Run

```bash
git clone https://github.com/spacedriveapp/spacebot
git clone https://github.com/spacedriveapp/spacebot.git
cd spacebot

# Optional: build the OpenCode embedded UI (requires Node 22+ and bun)
# Without this, OpenCode workers still work — the Workers tab shows a transcript view instead.
# ./scripts/build-opencode-embed.sh
# Build the web UI (React + Vite, embedded into the binary)
cd interface && bun install && npm i && bun build && cd ..
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Avoid mixing npm i into interface/ quickstart flow

Including npm i in the default quickstart contradicts the repo’s bun-only frontend package-management policy and may introduce lockfile drift/confusing state for contributors. Keep the default path bun-only, and if needed, document npm as a clearly labeled last-resort troubleshooting step.

Based on learnings: “Use bun for all JavaScript/TypeScript package management and scripts in spacebot/interface/. Never use npm, pnpm, or yarn unless explicitly requested by the user.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 429, Remove the `npm i` step from the quickstart command
sequence in the README (the line containing "cd interface && bun install && npm
i && bun build && cd ..") so the default flow uses bun-only; update the line to
use only "bun install" and "bun build", and add a short, clearly labeled
troubleshooting note elsewhere stating that npm may be used only as a
last-resort option (with explicit warning about lockfile drift) if contributors
encounter Bun-specific issues.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify the interface build script exists and should be invoked via `bun run build`
pkg="$(fd -i '^package\.json$' interface | head -n 1)"
echo "package.json: $pkg"
jq -r '.scripts.build // "<missing>"' "$pkg"

# Confirm README command currently used
rg -n 'cd interface.*bun install.*bun build|bun run build' README.md

Repository: spacedriveapp/spacebot

Length of output: 176


Remove npm i and use bun run build instead of bun build

The command uses npm (violates the bun-only policy for interface/) and bun build (incorrect for a Vite-based build). The corrected command should be:

cd interface && bun install && bun run build && cd ..

This invokes the vite build script from package.json and adheres to the project's package manager policy.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 429, Update the README command that currently reads "cd
interface && bun install && npm i && bun build && cd ..": remove the npm
invocation and replace the direct bun build with the package.json script
invocation by changing it to use "bun run build" so it becomes "cd interface &&
bun install && bun run build && cd .."; ensure the README only references bun
for installs and uses the Vite build script via bun run build.


cargo build --release
# Optional: build the OpenCode embed (live coding UI in the Workers tab)
# Requires Node 22+ (use fnm: fnm install v24.14.0 && fnm use v24.14.0)
./scripts/build-opencode-embed.sh
Comment on lines +431 to +433
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

“Optional” step is currently executed in the pasted command block

Line 431 labels this step optional, but Line 433 runs it unconditionally if users copy/paste the block. Comment out the command or move it to a separate optional block.

Suggested doc tweak
 # Optional: build the OpenCode embed (live coding UI in the Workers tab)
 # Requires Node 22+ (use fnm: fnm install v24.14.0 && fnm use v24.14.0)
-./scripts/build-opencode-embed.sh
+# ./scripts/build-opencode-embed.sh
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Optional: build the OpenCode embed (live coding UI in the Workers tab)
# Requires Node 22+ (use fnm: fnm install v24.14.0 && fnm use v24.14.0)
./scripts/build-opencode-embed.sh
# Optional: build the OpenCode embed (live coding UI in the Workers tab)
# Requires Node 22+ (use fnm: fnm install v24.14.0 && fnm use v24.14.0)
# ./scripts/build-opencode-embed.sh
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 431 - 433, The README currently presents "Optional:
build the OpenCode embed (live coding UI in the Workers tab)" but then runs the
command unconditionally; modify the block that contains the heading "Optional:
build the OpenCode embed (live coding UI in the Workers tab)" and the command
"./scripts/build-opencode-embed.sh" so the optional step is not executed when
users copy/paste—either comment out the "./scripts/build-opencode-embed.sh" line
or move that command into a separate clearly labeled optional code block and
keep the header text, ensuring the command is not executed by default.


# Install the binary
cargo install --path .
```

### Minimal Config
Expand Down