Skip to content

Commit 395c41b

Browse files
authored
add command to debug config (ultraworkers#2962)
1 parent a11a608 commit 395c41b

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Config } from "../../../config/config"
2+
import { bootstrap } from "../../bootstrap"
3+
import { cmd } from "../cmd"
4+
5+
export const ConfigCommand = cmd({
6+
command: "config",
7+
builder: (yargs) => yargs,
8+
async handler() {
9+
await bootstrap(process.cwd(), async () => {
10+
const config = await Config.get()
11+
console.log(JSON.stringify(config, null, 2))
12+
})
13+
},
14+
})

packages/opencode/src/cli/cmd/debug/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Global } from "../../../global"
22
import { bootstrap } from "../../bootstrap"
33
import { cmd } from "../cmd"
4+
import { ConfigCommand } from "./config"
45
import { FileCommand } from "./file"
56
import { LSPCommand } from "./lsp"
67
import { RipgrepCommand } from "./ripgrep"
@@ -11,6 +12,7 @@ export const DebugCommand = cmd({
1112
command: "debug",
1213
builder: (yargs) =>
1314
yargs
15+
.command(ConfigCommand)
1416
.command(LSPCommand)
1517
.command(RipgrepCommand)
1618
.command(FileCommand)

0 commit comments

Comments
 (0)