mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 02:04:22 +01:00
add command to debug config (#2962)
This commit is contained in:
14
packages/opencode/src/cli/cmd/debug/config.ts
Normal file
14
packages/opencode/src/cli/cmd/debug/config.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { Config } from "../../../config/config"
|
||||||
|
import { bootstrap } from "../../bootstrap"
|
||||||
|
import { cmd } from "../cmd"
|
||||||
|
|
||||||
|
export const ConfigCommand = cmd({
|
||||||
|
command: "config",
|
||||||
|
builder: (yargs) => yargs,
|
||||||
|
async handler() {
|
||||||
|
await bootstrap(process.cwd(), async () => {
|
||||||
|
const config = await Config.get()
|
||||||
|
console.log(JSON.stringify(config, null, 2))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import { Global } from "../../../global"
|
import { Global } from "../../../global"
|
||||||
import { bootstrap } from "../../bootstrap"
|
import { bootstrap } from "../../bootstrap"
|
||||||
import { cmd } from "../cmd"
|
import { cmd } from "../cmd"
|
||||||
|
import { ConfigCommand } from "./config"
|
||||||
import { FileCommand } from "./file"
|
import { FileCommand } from "./file"
|
||||||
import { LSPCommand } from "./lsp"
|
import { LSPCommand } from "./lsp"
|
||||||
import { RipgrepCommand } from "./ripgrep"
|
import { RipgrepCommand } from "./ripgrep"
|
||||||
@@ -11,6 +12,7 @@ export const DebugCommand = cmd({
|
|||||||
command: "debug",
|
command: "debug",
|
||||||
builder: (yargs) =>
|
builder: (yargs) =>
|
||||||
yargs
|
yargs
|
||||||
|
.command(ConfigCommand)
|
||||||
.command(LSPCommand)
|
.command(LSPCommand)
|
||||||
.command(RipgrepCommand)
|
.command(RipgrepCommand)
|
||||||
.command(FileCommand)
|
.command(FileCommand)
|
||||||
|
|||||||
Reference in New Issue
Block a user