ignore: add file status command

This commit is contained in:
Dax Raad
2025-07-01 20:39:43 -04:00
parent c68aeed8d9
commit 7e5941e14b
3 changed files with 122 additions and 28 deletions

View File

@@ -2,12 +2,6 @@ import { File } from "../../../file"
import { bootstrap } from "../../bootstrap"
import { cmd } from "../cmd"
export const FileCommand = cmd({
command: "file",
builder: (yargs) => yargs.command(FileReadCommand).demandCommand(),
async handler() {},
})
const FileReadCommand = cmd({
command: "read <path>",
builder: (yargs) =>
@@ -23,3 +17,21 @@ const FileReadCommand = cmd({
})
},
})
const FileStatusCommand = cmd({
command: "status",
builder: (yargs) => yargs,
async handler() {
await bootstrap({ cwd: process.cwd() }, async () => {
const status = await File.status()
console.log(JSON.stringify(status, null, 2))
})
},
})
export const FileCommand = cmd({
command: "file",
builder: (yargs) =>
yargs.command(FileReadCommand).command(FileStatusCommand).demandCommand(),
async handler() {},
})