Sandcode is a Bun CLI for ad hoc software research with OpenCode running inside Daytona sandboxes.
It does three things well:
sandcode analyzeruns evidence-based repository audits from URLs or link files.sandcode startboots an OpenCode web session in a fresh Daytona sandbox.sandcode setuplaunches an OpenTUI wizard for Obsidian integration and local credentials.
One-off use:
bunx sandcode --helpGlobal install:
bun add -g sandcodeBootstrap script:
curl -fsSL https://raw.githubusercontent.com/shpitdev/sandcode/main/scripts/install.sh | bashFirst-run setup:
bunx sandcode setupAnalyze a repository:
bunx sandcode https://github.com/octocat/Hello-WorldAnalyze repositories from a link file:
bunx sandcode links.mdLaunch a remote OpenCode web session:
bunx sandcode start- Bun 1.3+
DAYTONA_API_KEYOPENCODE_API_KEYfor the built-inopencode-go/*model defaults- Optional
DAYTONA_API_URLfor self-hosted Daytona - Optional
OPENCODE_SERVER_PASSWORDforsandcode start - Optional
obsidianCLI for desktop note opening - Optional
obCLI for headless Obsidian Sync workflows
sandcode --help
sandcode analyze --help
sandcode start --help
sandcode setup --helpExamples:
sandcode analyze --input example.md
sandcode analyze --out-dir findings --model opencode-go/kimi-k2.5 https://github.com/owner/repo
sandcode start --port 3000 --target us --keep-sandbox
sandcode setup --yes --vault-path ~/vaults/research --obsidian-integration headlesssandcode setup uses an OpenTUI wizard by default when a TTY is available.
It writes:
~/.config/sandcode/sandcode.toml~/.config/sandcode/.env
Project-level overrides are supported with:
sandcode.toml.sandcode.toml
Default Obsidian notes root:
[obsidian]
notes_root = "Research/Sandcode"Headless mode runs a real ob sync-list-remote preflight before it saves.
sandcode analyze:
- creates one Daytona sandbox per target
- clones the repo inside the sandbox
- installs OpenCode inside the sandbox
- runs a headless audit prompt
- writes findings locally
- optionally catalogs findings into Obsidian
Default output layout:
<out-dir>/index.md<out-dir>/<YYYY-MM-DD-NN-slug>/findings.md<out-dir>/<YYYY-MM-DD-NN-slug>/README.*<out-dir>/<YYYY-MM-DD-NN-slug>/opencode-run.log
If no URLs and no --input are provided, example.md is used when it exists.
The package is intended for npm distribution as sandcode.
Release automation, dist-tags, verification, and rollback notes live in RELEASE.md.
bun install
bun run check
bun run typecheck
bun test
bun run build