summaryrefslogtreecommitdiffhomepage
path: root/cloud/scripts
diff options
context:
space:
mode:
authorFrank <[email protected]>2025-09-11 19:10:53 -0400
committerFrank <[email protected]>2025-09-12 11:57:14 -0400
commitc3dc6d6df647f8e21dfcd9aeaf4d69bc45580020 (patch)
tree99c786fb2cefa4ec24142483035b768f330fb0cf /cloud/scripts
parentef3425a177d8bc431c69ef7350732723e0c37d62 (diff)
downloadopencode-c3dc6d6df647f8e21dfcd9aeaf4d69bc45580020.tar.gz
opencode-c3dc6d6df647f8e21dfcd9aeaf4d69bc45580020.zip
wip: zen
Diffstat (limited to 'cloud/scripts')
-rw-r--r--cloud/scripts/package.json5
-rw-r--r--cloud/scripts/src/backfill-usage-provider.ts10
-rw-r--r--cloud/scripts/src/placeholder.ts1
3 files changed, 13 insertions, 3 deletions
diff --git a/cloud/scripts/package.json b/cloud/scripts/package.json
index 03e8a11ae..0b8a5c5fd 100644
--- a/cloud/scripts/package.json
+++ b/cloud/scripts/package.json
@@ -5,8 +5,9 @@
"private": true,
"type": "module",
"scripts": {
- "start": "tsx",
- "shell": "sst shell"
+ "shell": "sst shell -- bun tsx",
+ "shell-dev": "sst shell --stage dev -- bun tsx",
+ "shell-prod": "sst shell --stage production -- bun tsx"
},
"dependencies": {
"@opencode/cloud-core": "workspace:*",
diff --git a/cloud/scripts/src/backfill-usage-provider.ts b/cloud/scripts/src/backfill-usage-provider.ts
new file mode 100644
index 000000000..553dcb478
--- /dev/null
+++ b/cloud/scripts/src/backfill-usage-provider.ts
@@ -0,0 +1,10 @@
+import { Database, eq } from "@opencode/cloud-core/drizzle/index.js"
+import { UsageTable } from "@opencode/cloud-core/schema/billing.sql.js"
+
+await Database.use(async (tx) => {
+ await tx
+ .update(UsageTable)
+ .set({ model: "grok-code" })
+ .where(eq(UsageTable.model, "x-ai/grok-code-fast-1"))
+ .limit(90000)
+})
diff --git a/cloud/scripts/src/placeholder.ts b/cloud/scripts/src/placeholder.ts
deleted file mode 100644
index ff7bd09c0..000000000
--- a/cloud/scripts/src/placeholder.ts
+++ /dev/null
@@ -1 +0,0 @@
-// placeholder