feat(cli): add machine-readable CLI help, recommendation, and configuration flows

This commit is contained in:
2026-04-16 18:54:07 +00:00
parent f43f88a3cb
commit fd7a73398c
14 changed files with 2482 additions and 786 deletions
+20 -3
View File
@@ -1,14 +1,31 @@
import * as plugins from './mod.plugins.js';
import { FormatStats } from './classes.formatstats.js';
import * as plugins from "./mod.plugins.js";
import { FormatStats } from "./classes.formatstats.js";
interface IFormatContextOptions {
interactive?: boolean;
jsonOutput?: boolean;
}
export class FormatContext {
private formatStats: FormatStats;
private interactive: boolean;
private jsonOutput: boolean;
constructor() {
constructor(options: IFormatContextOptions = {}) {
this.formatStats = new FormatStats();
this.interactive = options.interactive ?? true;
this.jsonOutput = options.jsonOutput ?? false;
}
getFormatStats(): FormatStats {
return this.formatStats;
}
isInteractive(): boolean {
return this.interactive;
}
isJsonOutput(): boolean {
return this.jsonOutput;
}
}