summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-07-03 11:49:15 -0500
committeradamdottv <[email protected]>2025-07-03 11:49:15 -0500
commit5a0910ea79b3f219c64f922fc775636b2bfdf07c (patch)
tree6f3288101eb3aa99fdc31cfaf5e07e4990cc8954 /scripts
parent1dffabcfdaeefd3bc08a51b625047185bade3a4d (diff)
downloadopencode-5a0910ea79b3f219c64f922fc775636b2bfdf07c.tar.gz
opencode-5a0910ea79b3f219c64f922fc775636b2bfdf07c.zip
chore: better local dev with stainless script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/stainless26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/stainless b/scripts/stainless
new file mode 100755
index 000000000..dae9016f3
--- /dev/null
+++ b/scripts/stainless
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -e
+
+echo "Starting opencode server on port 4096..."
+bun run ./packages/opencode/src/index.ts serve --port 4096 &
+SERVER_PID=$!
+
+echo "Waiting for server to start..."
+sleep 3
+
+echo "Fetching OpenAPI spec from http://localhost:4096/doc..."
+curl -s http://localhost:4096/doc > openapi.json
+
+echo "Stopping server..."
+kill $SERVER_PID
+
+echo "Running stl builds create..."
+stl builds create --branch dev --pull --allow-empty --targets go
+
+echo "Cleaning up..."
+rm -rf packages/tui/sdk
+mv opencode-go/ packages/tui/sdk/
+rm -rf packages/tui/sdk/.git
+
+echo "Done!"