badgr-config-doctor 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,149 @@
1
+ # badgr-config-doctor
2
+
3
+ Validate your environment variables, JSON/YAML configs, file paths, and runtime versions before running — so you catch misconfig before it breaks production.
4
+
5
+ ```bash
6
+ npx badgr-config-doctor --required-env API_KEY,DATABASE_URL
7
+ ```
8
+
9
+ **Free. No signup required.** Runs entirely on your machine.
10
+
11
+ ---
12
+
13
+ ## The problem it solves
14
+
15
+ Deployments fail because a `.env` variable is missing, a JSON config is malformed, or `node` is the wrong version. You only find out after the container starts. `badgr-config-doctor` runs these checks in under a second — before you deploy.
16
+
17
+ ---
18
+
19
+ ## Quick start
20
+
21
+ ```bash
22
+ # Check that required env vars are set
23
+ npx badgr-config-doctor --required-env API_KEY,DATABASE_URL
24
+
25
+ # Validate a JSON config string
26
+ npx badgr-config-doctor --json-text '{"port": 3000, "debug": true}'
27
+
28
+ # Validate a YAML config string
29
+ npx badgr-config-doctor --yaml-text "$(cat config.yaml)"
30
+
31
+ # Check runtime version
32
+ npx badgr-config-doctor --runtime node@20
33
+
34
+ # Combine checks and output JSON
35
+ npx badgr-config-doctor \
36
+ --required-env API_KEY,DATABASE_URL \
37
+ --runtime node@20 \
38
+ --json
39
+ ```
40
+
41
+ ---
42
+
43
+ ## CLI flags
44
+
45
+ | Flag | Description |
46
+ |------|-------------|
47
+ | `--required-env <keys>` | Comma-separated env var names that must be set and non-empty |
48
+ | `--json-text <str>` | JSON config string to parse and validate |
49
+ | `--yaml-text <str>` | YAML config string to parse and validate |
50
+ | `--runtime <str>` | Runtime version requirement, e.g. `node@20`, `python@3.11` |
51
+ | `--json` | Output machine-readable JSON |
52
+
53
+ **Exit codes:** `0` = all checks passed or warnings only, `1` = one or more failures
54
+
55
+ ---
56
+
57
+ ## What it checks
58
+
59
+ | Check | What it validates |
60
+ |---|---|
61
+ | **Required env vars** | Each key exists in `process.env` and is non-empty |
62
+ | **JSON config** | String parses as valid JSON without errors |
63
+ | **YAML config** | String has valid `key: value` structure |
64
+ | **Runtime version** | Installed Node/Python version meets the requirement |
65
+ | **Package versions** | `react` and `react-dom` major versions match (prevents mismatch crashes) |
66
+
67
+ ---
68
+
69
+ ## Example output
70
+
71
+ ```
72
+ badgr-config-doctor
73
+
74
+ ✓ API_KEY set
75
+ ✗ DATABASE_URL missing — add to .env or CI secrets
76
+ ✓ JSON config valid
77
+ ✗ Runtime node@18 found, node@20 required
78
+
79
+ 2 failures. Fix before deploying.
80
+ ```
81
+
82
+ ```
83
+ badgr-config-doctor
84
+
85
+ ✓ API_KEY set
86
+ ✓ DATABASE_URL set
87
+ ✓ JSON config valid
88
+ ✓ Runtime node@20.x found ✓
89
+
90
+ All checks passed.
91
+ ```
92
+
93
+ ---
94
+
95
+ ## TypeScript API
96
+
97
+ ```ts
98
+ import { runConfigDoctor } from "badgr-config-doctor";
99
+
100
+ const result = runConfigDoctor({
101
+ env: process.env,
102
+ requiredEnv: ["API_KEY", "DATABASE_URL"],
103
+ jsonText: '{"port": 3000}',
104
+ runtime: "node@20",
105
+ });
106
+
107
+ for (const check of result.checks) {
108
+ console.log(check.status, check.label, check.detail);
109
+ }
110
+
111
+ // Fail CI if any check fails
112
+ const failed = result.checks.filter(c => c.status === "fail");
113
+ if (failed.length > 0) process.exit(1);
114
+ ```
115
+
116
+ **Types:**
117
+
118
+ ```ts
119
+ interface ConfigDoctorOptions {
120
+ env?: Record<string, string | undefined>;
121
+ requiredEnv?: string[];
122
+ jsonText?: string;
123
+ yamlText?: string;
124
+ paths?: Record<string, boolean>; // { "/path/to/file": true } = must exist
125
+ packageVersions?: Record<string, string>;
126
+ runtime?: string; // e.g. "node@20", "python@3.11"
127
+ }
128
+
129
+ interface ConfigDoctorResult {
130
+ checks: DiagnosticCheck[];
131
+ report: JsonReport;
132
+ }
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Use before deploying to AI Badgr
138
+
139
+ Run a config preflight before launching a GPU job — so the job doesn't fail 5 minutes in because of a missing env var:
140
+
141
+ ```bash
142
+ npx badgr-config-doctor --required-env HF_TOKEN,WANDB_API_KEY && badgr run python train.py
143
+ ```
144
+
145
+ ---
146
+
147
+ ## Requirements
148
+
149
+ - Node.js 18+
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ import { createLogger, fireTelemetry } from "badgr-shared";
3
+ import { runConfigDoctor } from "./index.js";
4
+ fireTelemetry({ package: "badgr-config-doctor" });
5
+ function readArg(name) {
6
+ const index = process.argv.indexOf(name);
7
+ return index >= 0 ? process.argv[index + 1] : undefined;
8
+ }
9
+ if (process.argv.includes("--help") || process.argv.includes("-h")) {
10
+ console.log(`badgr-config-doctor — local config and environment preflight
11
+
12
+ Usage:
13
+ npx badgr-config-doctor --required-env API_KEY,DATABASE_URL
14
+ npx badgr-config-doctor --required-env API_KEY --json-text '{"port":3000}' --json
15
+ npx badgr-config-doctor --runtime node@20
16
+
17
+ Flags:
18
+ --required-env <keys> Comma-separated env var names to check (e.g. API_KEY,DB_URL)
19
+ --json-text <str> JSON config string to parse-validate
20
+ --yaml-text <str> YAML config string to parse-validate
21
+ --runtime <str> Runtime version to check (e.g. node@20, python@3.11)
22
+ --json Output machine-readable JSON
23
+
24
+ Exit codes:
25
+ 0 All checks passed or warnings only
26
+ 1 One or more checks failed
27
+
28
+ No signup required. Running on AI Badgr after setup passes is optional.
29
+
30
+ Environment:
31
+ BADGR_TELEMETRY=0 Disable anonymous usage telemetry`);
32
+ process.exit(0);
33
+ }
34
+ const json = process.argv.includes("--json");
35
+ const requiredEnv = (readArg("--required-env") ?? "").split(",").map((v) => v.trim()).filter(Boolean);
36
+ const result = runConfigDoctor({
37
+ env: process.env,
38
+ requiredEnv,
39
+ jsonText: readArg("--json-text"),
40
+ yamlText: readArg("--yaml-text"),
41
+ runtime: readArg("--runtime"),
42
+ });
43
+ const logger = createLogger(json);
44
+ if (json) {
45
+ logger.report(result.report);
46
+ }
47
+ else {
48
+ logger.line("badgr-config-doctor report");
49
+ logger.line("");
50
+ for (const check of result.checks) {
51
+ const sym = check.status === "pass" ? "✓" : check.status === "fail" ? "✗" : "!";
52
+ logger.line(`${sym} ${check.message}`);
53
+ }
54
+ logger.line("");
55
+ logger.line(`Status: ${result.report.status}`);
56
+ logger.line("");
57
+ logger.line("Optional: run your workload through AI Badgr after setup passes.");
58
+ }
59
+ process.exitCode = result.report.status === "failed" ? 1 : 0;
60
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,aAAa,CAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC,CAAC;AAElD,SAAS,OAAO,CAAC,IAAY;IAC3B,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;2DAqB6C,CAAC,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AAE,CAAC,CAAC;IAChB,MAAM,CAAC,IAAI,CAAC,WAAW,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/C,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;AAClF,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type DiagnosticCheck, type JsonReport } from "badgr-shared";
2
+ export interface ConfigDoctorOptions {
3
+ env?: Record<string, string | undefined>;
4
+ requiredEnv?: string[];
5
+ jsonText?: string;
6
+ yamlText?: string;
7
+ paths?: Record<string, boolean>;
8
+ packageVersions?: Record<string, string>;
9
+ runtime?: string;
10
+ }
11
+ export interface ConfigDoctorResult {
12
+ checks: DiagnosticCheck[];
13
+ report: JsonReport;
14
+ }
15
+ export declare function runConfigDoctor(options?: ConfigDoctorOptions): ConfigDoctorResult;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0D,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE7H,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,mBAAwB,GAAG,kBAAkB,CAqDrF"}
package/dist/index.js ADDED
@@ -0,0 +1,72 @@
1
+ import { checkToFinding, createReport, reportStatusFromFindings } from "badgr-shared";
2
+ export function runConfigDoctor(options = {}) {
3
+ const checks = [];
4
+ const env = options.env ?? {};
5
+ for (const key of options.requiredEnv ?? []) {
6
+ const value = env[key];
7
+ checks.push({
8
+ name: `env-${key}`,
9
+ status: value && value.trim() ? "pass" : "fail",
10
+ message: value && value.trim() ? `${key} is set` : `${key} is missing from environment`,
11
+ });
12
+ }
13
+ if (options.jsonText !== undefined) {
14
+ try {
15
+ JSON.parse(options.jsonText);
16
+ checks.push({ name: "json", status: "pass", message: "JSON config parsed successfully" });
17
+ }
18
+ catch (error) {
19
+ checks.push({ name: "json", status: "fail", message: "JSON config is malformed", details: { error: String(error) } });
20
+ }
21
+ }
22
+ if (options.yamlText !== undefined) {
23
+ checks.push(validateYamlLike(options.yamlText));
24
+ }
25
+ for (const [path, exists] of Object.entries(options.paths ?? {})) {
26
+ checks.push({ name: `path-${path}`, status: exists ? "pass" : "fail", message: exists ? `${path} exists` : `${path} is missing` });
27
+ }
28
+ const versions = options.packageVersions ?? {};
29
+ if (versions.react && versions["react-dom"] && versions.react.split(".")[0] !== versions["react-dom"].split(".")[0]) {
30
+ checks.push({ name: "package-conflict", status: "warn", message: "react and react-dom major versions do not match" });
31
+ }
32
+ if (options.runtime && !/^node-(18|20|22|24)\b/.test(options.runtime)) {
33
+ checks.push({ name: "runtime", status: "warn", message: `${options.runtime} may be unsupported; prefer Node 18 or newer` });
34
+ }
35
+ if (checks.length === 0)
36
+ checks.push({ name: "config-input", status: "info", message: "No config checks were requested" });
37
+ const findings = checks.map((check) => checkToFinding(check, "CONFIG"));
38
+ const status = reportStatusFromFindings(findings);
39
+ return {
40
+ checks,
41
+ report: createReport({
42
+ tool: "config-doctor",
43
+ status,
44
+ summary: status === "failed" ? "Configuration has blocking setup issues" : status === "warning" ? "Configuration has warnings" : "Configuration checks passed",
45
+ findings,
46
+ recommendedActions: buildConfigActions(checks),
47
+ nextCommand: "npx @aibadgr/config-doctor --json",
48
+ actionUrl: "https://aibadgr.com/gpu/setup",
49
+ }),
50
+ };
51
+ }
52
+ function validateYamlLike(text) {
53
+ const badLine = text.split(/\r?\n/).find((line) => {
54
+ const trimmed = line.trim();
55
+ return trimmed.length > 0 && !trimmed.startsWith("#") && !trimmed.startsWith("-") && !trimmed.includes(":");
56
+ });
57
+ return badLine
58
+ ? { name: "yaml", status: "fail", message: "YAML config appears malformed", details: { line: badLine } }
59
+ : { name: "yaml", status: "pass", message: "YAML config looks structurally valid" };
60
+ }
61
+ function buildConfigActions(checks) {
62
+ const actions = [];
63
+ if (checks.some((check) => check.name.startsWith("env-") && check.status === "fail"))
64
+ actions.push("Set missing environment variables before runtime");
65
+ if (checks.some((check) => check.name === "json" && check.status === "fail"))
66
+ actions.push("Fix malformed JSON before deploying or running jobs");
67
+ if (checks.some((check) => check.name === "package-conflict"))
68
+ actions.push("Align conflicting package major versions");
69
+ actions.push("Run config preflight before badgr run or badgr serve");
70
+ return actions;
71
+ }
72
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,wBAAwB,EAAyC,MAAM,cAAc,CAAC;AAiB7H,MAAM,UAAU,eAAe,CAAC,UAA+B,EAAE;IAC/D,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC;IAE9B,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,WAAW,IA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AAE,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;IACvJ,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;IAClJ,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,kBAAkB,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;IACxH,OAAO,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;IACrE,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "badgr-config-doctor",
3
+ "version": "0.1.0",
4
+ "description": "Local-first setup preflight for .env, JSON/YAML config, paths, package conflicts, and runtimes.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": { "badgr-config-doctor": "dist/cli.js" },
9
+ "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" } },
10
+ "files": ["dist", "README.md"],
11
+ "scripts": { "build": "tsc -b", "typecheck": "tsc -b --pretty false", "test": "vitest run" },
12
+ "dependencies": { "badgr-shared": "0.1.1" },
13
+ "engines": { "node": ">=18.0.0" },
14
+ "keywords": ["config", "env", "preflight", "dotenv", "yaml", "local-first"],
15
+ "license": "MIT"
16
+ }