claude-config-doctor 0.2.2

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.
@@ -0,0 +1,45 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributorcovenant.org/version/1/4/code-of-conduct.html.
44
+
45
+ [homepage]: https://www.contributorcovenant.org
@@ -0,0 +1,39 @@
1
+ name: Bug Report
2
+ description: Report a bug to help us improve.
3
+ labels: [bug]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thanks for taking the time to report a bug! Please fill out the information below.
9
+ - type: textarea
10
+ id: description
11
+ attributes:
12
+ label: Description
13
+ description: A clear and concise description of what the bug is.
14
+ validations:
15
+ required: true
16
+ - type: textarea
17
+ id: reproduction
18
+ attributes:
19
+ label: Reproduction Steps
20
+ description: Steps to recreate the issue.
21
+ placeholder: |
22
+ 1. Run `npx claude-config-doctor check`
23
+ 2. Observer error...
24
+ validations:
25
+ required: true
26
+ - type: textarea
27
+ id: expected
28
+ attributes:
29
+ label: Expected Behavior
30
+ description: What should happen instead.
31
+ validations:
32
+ required: true
33
+ - type: textarea
34
+ id: context
35
+ attributes:
36
+ label: Environment Info
37
+ description: OS version, Bun/Node version, etc.
38
+ validations:
39
+ required: true
@@ -0,0 +1,23 @@
1
+ name: Feature Request
2
+ description: Suggest an enhancement.
3
+ labels: [enhancement]
4
+ body:
5
+ - type: textarea
6
+ id: feature
7
+ attributes:
8
+ label: Summary
9
+ description: A clear and concise description of the feature request.
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: use-case
14
+ attributes:
15
+ label: Use Case
16
+ description: What problem would this solve for you?
17
+ validations:
18
+ required: true
19
+ - type: textarea
20
+ id: alternative
21
+ attributes:
22
+ label: Alternatives Considered
23
+ description: Any other ways you've tried to achieve this.
@@ -0,0 +1,19 @@
1
+ # PR Template
2
+
3
+ ## šŸš€ Impact
4
+
5
+ Describe the problem this solves and how it improves the experience for Claude Code users.
6
+
7
+ Fixes # (issue)
8
+
9
+ ## 🩺 Verification & Tests
10
+
11
+ How did you verify this change?
12
+
13
+ - [ ] `bun run test` passes.
14
+ - [ ] `bun run lint` passes.
15
+ - [ ] I've manually verified with a sample config (share command/output if relevant).
16
+
17
+ ## šŸ“ø CLI Output (Optional)
18
+
19
+ If this changes the CLI output, share a quick snippet or screenshot of the new report format!
@@ -0,0 +1,27 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - name: Setup Bun
16
+ uses: oven-sh/setup-bun@v2
17
+ with:
18
+ bun-version: latest
19
+
20
+ - name: Install dependencies
21
+ run: bun install
22
+
23
+ - name: Lint and Format
24
+ run: bun run lint
25
+
26
+ - name: Run tests
27
+ run: bun test
@@ -0,0 +1,66 @@
1
+ name: Release & Publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ with:
16
+ fetch-depth: 0
17
+
18
+ - name: Setup Bun
19
+ uses: oven-sh/setup-bun@v2
20
+ with:
21
+ bun-version: latest
22
+
23
+ - name: Install dependencies
24
+ run: bun install
25
+
26
+ - name: Run tests
27
+ run: bun test
28
+
29
+ - name: Check version change
30
+ id: check_version
31
+ run: |
32
+ VERSION=v$(cat package.json | jq -r .version)
33
+ if git rev-parse "$VERSION" >/dev/null 2>&1; then
34
+ echo "CHANGED=false" >> $GITHUB_OUTPUT
35
+ echo "Skipping release: Version $VERSION already released."
36
+ else
37
+ echo "CHANGED=true" >> $GITHUB_OUTPUT
38
+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
39
+ echo "Found new version: $VERSION"
40
+ fi
41
+
42
+ - name: Push Tag
43
+ if: steps.check_version.outputs.CHANGED == 'true'
44
+ run: |
45
+ git config user.name "github-actions"
46
+ git config user.email "github-actions@github.com"
47
+ git tag ${{ steps.check_version.outputs.VERSION }}
48
+ git push origin ${{ steps.check_version.outputs.VERSION }}
49
+
50
+ - name: Create GitHub Release
51
+ if: steps.check_version.outputs.CHANGED == 'true'
52
+ uses: softprops/action-gh-release@v1
53
+ with:
54
+ tag_name: ${{ steps.check_version.outputs.VERSION }}
55
+ generate_release_notes: true
56
+ env:
57
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58
+
59
+ - name: Publish to NPM
60
+ if: steps.check_version.outputs.CHANGED == 'true'
61
+ run: |
62
+ echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
63
+ bun run build # (if any build steps were needed, currently we use bun/ts directly)
64
+ npm publish --access public
65
+ env:
66
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1 @@
1
+ bun run lint
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 24
package/CHANGELOG.md ADDED
@@ -0,0 +1,29 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.2.2] - 2026-03-19
9
+
10
+ - OSS release
11
+ - Added GitHub Actions for CI/CD and Releases.
12
+ - Added `CONTRIBUTING.md`, Code of Conduct, and Security Policy.
13
+ - Added status badges to `README.md`.
14
+
15
+ ## [0.2.1] - 2026-03-19
16
+
17
+ - Improved diagnostic messages to be more actionable.
18
+ - Updated OpenRouter, Model Suffix, Telemetry, and Connectivity rules.
19
+
20
+ ## [0.2.0] - 2026-03-19
21
+
22
+ - Initial stable CLI configuration.
23
+ - Basic health check implementation.
24
+ - `check`, `fix`, and `init` commands.
25
+
26
+ ## [0.1.0] - 2026-03-19
27
+
28
+ - Prototype of Claude Config Doctor.
29
+ - Basic schema validation.
package/CLAUDE.md ADDED
@@ -0,0 +1,106 @@
1
+
2
+ Default to using Bun instead of Node.js.
3
+
4
+ - Use `bun <file>` instead of `node <file>` or `ts-node <file>`
5
+ - Use `bun test` instead of `jest` or `vitest`
6
+ - Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
7
+ - Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
8
+ - Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
9
+ - Use `bunx <package> <command>` instead of `npx <package> <command>`
10
+ - Bun automatically loads .env, so don't use dotenv.
11
+
12
+ ## APIs
13
+
14
+ - `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
15
+ - `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
16
+ - `Bun.redis` for Redis. Don't use `ioredis`.
17
+ - `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
18
+ - `WebSocket` is built-in. Don't use `ws`.
19
+ - Prefer `Bun.file` over `node:fs`'s readFile/writeFile
20
+ - Bun.$`ls` instead of execa.
21
+
22
+ ## Testing
23
+
24
+ Use `bun test` to run tests.
25
+
26
+ ```ts#index.test.ts
27
+ import { test, expect } from "bun:test";
28
+
29
+ test("hello world", () => {
30
+ expect(1).toBe(1);
31
+ });
32
+ ```
33
+
34
+ ## Frontend
35
+
36
+ Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.
37
+
38
+ Server:
39
+
40
+ ```ts#index.ts
41
+ import index from "./index.html"
42
+
43
+ Bun.serve({
44
+ routes: {
45
+ "/": index,
46
+ "/api/users/:id": {
47
+ GET: (req) => {
48
+ return new Response(JSON.stringify({ id: req.params.id }));
49
+ },
50
+ },
51
+ },
52
+ // optional websocket support
53
+ websocket: {
54
+ open: (ws) => {
55
+ ws.send("Hello, world!");
56
+ },
57
+ message: (ws, message) => {
58
+ ws.send(message);
59
+ },
60
+ close: (ws) => {
61
+ // handle close
62
+ }
63
+ },
64
+ development: {
65
+ hmr: true,
66
+ console: true,
67
+ }
68
+ })
69
+ ```
70
+
71
+ HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. `<link>` tags can point to stylesheets and Bun's CSS bundler will bundle.
72
+
73
+ ```html#index.html
74
+ <html>
75
+ <body>
76
+ <h1>Hello, world!</h1>
77
+ <script type="module" src="./frontend.tsx"></script>
78
+ </body>
79
+ </html>
80
+ ```
81
+
82
+ With the following `frontend.tsx`:
83
+
84
+ ```tsx#frontend.tsx
85
+ import React from "react";
86
+ import { createRoot } from "react-dom/client";
87
+
88
+ // import .css files directly and it works
89
+ import './index.css';
90
+
91
+ const root = createRoot(document.body);
92
+
93
+ export default function Frontend() {
94
+ return <h1>Hello, world!</h1>;
95
+ }
96
+
97
+ root.render(<Frontend />);
98
+ ```
99
+
100
+ Then, run index.ts
101
+
102
+ ```sh
103
+ bun --hot ./index.ts
104
+ ```
105
+
106
+ For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.
@@ -0,0 +1,73 @@
1
+ # Contributing to Claude Config Doctor 🩺
2
+
3
+ First off, thank you for considering contributing to Claude Config Doctor! It's people like you that make Claude Config Doctor such a great tool.
4
+
5
+ ## Code of Conduct
6
+
7
+ By participating in this project, you are expected to uphold our [Code of Conduct](.github/CODE_OF_CONDUCT.md).
8
+
9
+ ## How Can I Contribute?
10
+
11
+ ### Reporting Bugs
12
+
13
+ - **Search first**. Before creating a new issue, please check if the bug has already been reported.
14
+ - **Provide details**. If you find a bug, please create an issue with a clear description of the problem, expected behavior, and steps to reproduce.
15
+ - **Environment info**. Mention your OS, Node.js/Bun version, and any relevant configuration snippets (redact sensitive information like API keys!).
16
+
17
+ ### Suggesting Enhancements
18
+
19
+ - **Open an issue**. Describe the feature you'd like to see and why it would be useful.
20
+ - **Provide context**. How does this solve a problem for users of Claude Code?
21
+
22
+ ### Pull Requests
23
+
24
+ 1. **Check for existing issues**. If you're planning a major change, it's best to open an issue for discussion first.
25
+ 2. **Fork the repo** and create your branch from `main`.
26
+ 3. **Install dependencies**: `bun install`.
27
+ 4. **Make your changes**. Write clean, documented code.
28
+ 5. **Lint and Format**: Run `bun run lint` to ensure your code matches the style. Biome will automatically check for common issues.
29
+ 6. **Run tests**: `bun test`. Ensure all tests pass before submitting.
30
+ 7. **Submit PR**. Provide a clear description of your changes and link to any related issues.
31
+
32
+ ## Development Setup
33
+
34
+ To set up the development environment, you will need:
35
+ - [Bun](https://bun.sh/) installed.
36
+ - [Biome](https://biomejs.dev/) (installed via dependencies).
37
+ - Any modern code editor (VS Code recommended with the Biome extension).
38
+
39
+ ```bash
40
+ # Clone the repository
41
+ git clone https://github.com/mirogta/claude-config-doctor.git
42
+ cd claude-config-doctor
43
+
44
+ # Install dependencies
45
+ bun install
46
+
47
+ # Lint and Format
48
+ bun run lint
49
+ bun run format
50
+
51
+ # Run tests
52
+ bun test
53
+ ```
54
+
55
+ ## Commit Message Guidelines
56
+
57
+ We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for our commit messages. This helps us generate clean and automated changelogs.
58
+
59
+ Format: `<type>(<scope>): <description>`
60
+
61
+ Common types:
62
+
63
+ - `feat`: A new feature
64
+ - `fix`: A bug fix
65
+ - `docs`: Documentation only changes
66
+ - `style`: Changes that do not affect the meaning of the code (white-space, formatting, etc)
67
+ - `refactor`: A code change that neither fixes a bug nor adds a feature
68
+ - `test`: Adding missing tests or correcting existing tests
69
+ - `chore`: Changes to the build process or auxiliary tools and libraries
70
+
71
+ ## License
72
+
73
+ By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mirogta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # Claude Config Doctor 🩺
2
+
3
+ [![CI Status](https://github.com/mirogta/claude-config-doctor/actions/workflows/ci.yml/badge.svg)](https://github.com/mirogta/claude-config-doctor/actions)
4
+ [![License: MIT](https://img.shields.io/github/license/mirogta/claude-config-doctor)](LICENSE)
5
+ [![npm version](https://img.shields.io/npm/v/claude-config-doctor)](https://www.npmjs.com/package/claude-config-doctor)
6
+
7
+ An **extra diagnostic tool** designed specifically to find and fix common community-reported pitfalls in Claude Code configuration files. It acts as a specialized extension to the built-in Claude doctor.
8
+
9
+ ## šŸš€ Usage
10
+
11
+ Run the doctor instantly with `npx` in either your repo root or home directory:
12
+
13
+ ```bash
14
+ # Check for common configuration issues
15
+ npx claude-config-doctor check
16
+
17
+ # Apply autofixes for known model-naming and API key conflicts
18
+ npx claude-config-doctor fix
19
+
20
+ # Initialize a fresh repo-level config template
21
+ npx claude-config-doctor init
22
+ ```
23
+
24
+ ## šŸ” Targeted Diagnostics
25
+
26
+ The Doctor focuses on some specific frustration points:
27
+
28
+ - āœ… **Schema Guard**: Validates your configuration against official JSON standards.
29
+ - āœ… **OpenRouter Bridge Verification**: Ensures correct variable separation for OpenRouter integrations.
30
+ - āœ… **Model Name Errors**: Detects and strips accidental `:free` suffixes that cause "Model not found" errors.
31
+
32
+ ## šŸ› ļø Pro Workflow
33
+
34
+ The tool automatically prioritizes `./.claude/settings.local.json` but checks `~/.claude/settings.json` too.
35
+
36
+ ```bash
37
+ # Output raw results for scriptable diagnostics or CI/CD
38
+ npx claude-config-doctor check --json
39
+ ```
40
+
41
+ ## šŸ“œ License
42
+
43
+ MIT.
44
+ For more information, please read our [Contributing Guide](CONTRIBUTING.md).
package/SECURITY.md ADDED
@@ -0,0 +1,24 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Currently, only the latest version of Claude Config Doctor is supported for security updates.
6
+
7
+ | Version | Supported |
8
+ | ------- | ------------------ |
9
+ | latest | :white_check_mark: |
10
+
11
+ ## Reporting a Vulnerability
12
+
13
+ If you discover a potential security vulnerability in this project, please **do not open a public issue**. Instead, please report it by opening a private security advisory on GitHub or by contacting the maintainer directly via GitHub.
14
+
15
+ We will acknowledge your report and work with you to understand and resolve the issue.
16
+
17
+ Please include the following information in your report:
18
+
19
+ - A description of the vulnerability.
20
+ - The potential impact of the vulnerability.
21
+ - Steps to reproduce the vulnerability (if known).
22
+ - Your recommended fix or mitigation (if known).
23
+
24
+ Thank you for helping keep this project secure!
Binary file
package/bin/cli.js ADDED
@@ -0,0 +1,108 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
5
+ import chalk from 'chalk';
6
+ import yargs from 'yargs';
7
+ import { hideBin } from 'yargs/helpers';
8
+ import { checkConfig, fixConfig, initConfigWizard } from '../lib/healthcheck.js';
9
+
10
+ const DEFAULT_LOCAL = path.join(process.cwd(), '.claude/settings.local.json');
11
+ const DEFAULT_GLOBAL = path.join(os.homedir(), '.claude/settings.json');
12
+
13
+ const parser = yargs(hideBin(process.argv))
14
+ .scriptName('claude-config-doctor')
15
+ .usage('$0 <command> [options]')
16
+ .command(['check [file]', '$0 [file]'], 'Run diagnostics on Claude settings (default)', (y) => {
17
+ y.positional('file', { describe: 'Path to config file', type: 'string' });
18
+ })
19
+ .command('fix [file]', 'Apply autofixes for known model and API issues', (y) => {
20
+ y.positional('file', { describe: 'Path to config file', type: 'string' });
21
+ })
22
+ .command('init [file]', 'Initialize a new config template', (y) => {
23
+ y.positional('file', { describe: 'Path to create config', type: 'string' });
24
+ })
25
+ .option('json', { type: 'boolean', describe: 'Output raw JSON results', global: true })
26
+ .help();
27
+
28
+ const argv = parser.parseSync();
29
+
30
+ async function showReport(filePath, result) {
31
+ console.log(chalk.bold(`\n🩺 Diagnostic Report (Extra): ${chalk.cyan(filePath)}`));
32
+ if (result.issues.length === 0) {
33
+ console.log(` ${chalk.green('āœ“')} No issues detected by the Doctor.`);
34
+ return;
35
+ }
36
+
37
+ result.issues.forEach((issue) => {
38
+ let icon = chalk.red('āœ–');
39
+ let color = chalk.red;
40
+ if (issue.type === 'telemetry') {
41
+ icon = chalk.yellow('⚠');
42
+ color = chalk.yellow;
43
+ }
44
+ if (issue.type === 'model_suffix') {
45
+ icon = chalk.blue('🩹');
46
+ color = chalk.blue;
47
+ }
48
+ if (issue.type === 'connectivity') {
49
+ icon = chalk.yellow('☁');
50
+ color = chalk.yellow;
51
+ }
52
+ if (issue.type === 'api_key') {
53
+ icon = chalk.red('šŸ”');
54
+ color = chalk.red;
55
+ }
56
+ if (issue.type === 'read_error') {
57
+ icon = chalk.red('🚫');
58
+ color = chalk.red;
59
+ }
60
+ if (issue.type === 'gitignore') {
61
+ icon = chalk.yellow('🪵');
62
+ color = chalk.yellow;
63
+ }
64
+
65
+ console.log(` ${icon} ${color(issue.message)}`);
66
+ });
67
+ }
68
+
69
+ (async () => {
70
+ const cmd = argv._[0] || 'check';
71
+
72
+ if (cmd === 'init') {
73
+ const file = path.resolve(argv.file || DEFAULT_LOCAL);
74
+ const result = await initConfigWizard(file);
75
+ if (result.success) console.log(chalk.green(`\n✨ Template @ ${chalk.cyan(result.filePath)}`));
76
+ return;
77
+ }
78
+
79
+ const filesToCheck = [];
80
+ if (argv.file) {
81
+ filesToCheck.push(path.resolve(argv.file));
82
+ } else {
83
+ if (fs.existsSync(DEFAULT_LOCAL)) filesToCheck.push(DEFAULT_LOCAL);
84
+ if (fs.existsSync(DEFAULT_GLOBAL)) filesToCheck.push(DEFAULT_GLOBAL);
85
+ }
86
+
87
+ if (filesToCheck.length === 0) {
88
+ console.log(chalk.red(`\nāœ– No config files found in standard locations.`));
89
+ process.exit(1);
90
+ }
91
+
92
+ let hasIssues = false;
93
+ for (const file of filesToCheck) {
94
+ const result = cmd === 'fix' ? await fixConfig(file) : await checkConfig(file);
95
+ if (result.issues.length > 0) hasIssues = true;
96
+
97
+ if (argv.json) {
98
+ console.log(JSON.stringify({ file, ...result }, null, 2));
99
+ } else {
100
+ await showReport(file, result);
101
+ if (cmd === 'fix' && result.fixed) {
102
+ console.log(chalk.green(` ${chalk.bold('āœ”')} Auto-fixes applied successfully.`));
103
+ }
104
+ }
105
+ }
106
+
107
+ if (cmd !== 'fix' && hasIssues) process.exit(1);
108
+ })();
package/biome.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.4.3/schema.json",
3
+ "vcs": {
4
+ "enabled": true,
5
+ "clientKind": "git",
6
+ "useIgnoreFile": true
7
+ },
8
+ "formatter": {
9
+ "enabled": true,
10
+ "indentStyle": "space",
11
+ "indentWidth": 2,
12
+ "lineWidth": 100
13
+ },
14
+ "linter": {
15
+ "enabled": true,
16
+ "rules": {
17
+ "recommended": true
18
+ }
19
+ },
20
+ "javascript": {
21
+ "formatter": {
22
+ "quoteStyle": "single",
23
+ "semicolons": "always",
24
+ "trailingCommas": "es5"
25
+ }
26
+ }
27
+ }