summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax <[email protected]>2026-04-25 11:08:19 -0400
committerGitHub <[email protected]>2026-04-25 15:08:19 +0000
commit1d728fc627b44b34179d4e53963b643fac867bf1 (patch)
tree4b6eb5f607b785057db3d5e2c890085c8e21d248
parent62ef2a220723a6d6cb050e523fcdfaa974dafdda (diff)
downloadopencode-1d728fc627b44b34179d4e53963b643fac867bf1.tar.gz
opencode-1d728fc627b44b34179d4e53963b643fac867bf1.zip
feat: add startup debug command (#24310)
-rw-r--r--packages/opencode/src/cli/cmd/debug/index.ts2
-rw-r--r--packages/opencode/src/cli/cmd/debug/startup.ts11
2 files changed, 13 insertions, 0 deletions
diff --git a/packages/opencode/src/cli/cmd/debug/index.ts b/packages/opencode/src/cli/cmd/debug/index.ts
index 8da6ff559..e780c4ccb 100644
--- a/packages/opencode/src/cli/cmd/debug/index.ts
+++ b/packages/opencode/src/cli/cmd/debug/index.ts
@@ -9,6 +9,7 @@ import { ScrapCommand } from "./scrap"
import { SkillCommand } from "./skill"
import { SnapshotCommand } from "./snapshot"
import { AgentCommand } from "./agent"
+import { StartupCommand } from "./startup"
export const DebugCommand = cmd({
command: "debug",
@@ -22,6 +23,7 @@ export const DebugCommand = cmd({
.command(ScrapCommand)
.command(SkillCommand)
.command(SnapshotCommand)
+ .command(StartupCommand)
.command(AgentCommand)
.command(PathsCommand)
.command({
diff --git a/packages/opencode/src/cli/cmd/debug/startup.ts b/packages/opencode/src/cli/cmd/debug/startup.ts
new file mode 100644
index 000000000..27fd52469
--- /dev/null
+++ b/packages/opencode/src/cli/cmd/debug/startup.ts
@@ -0,0 +1,11 @@
+import { EOL } from "os"
+import { cmd } from "../cmd"
+
+export const StartupCommand = cmd({
+ command: "startup",
+ describe: "print startup timing",
+ builder: (yargs) => yargs,
+ handler() {
+ process.stdout.write(performance.now().toString() + EOL)
+ },
+})