@vyuhlabs/dxkit 2.4.8 → 2.5.1
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/CHANGELOG.md +312 -0
- package/README.md +360 -439
- package/dist/analyzers/security/aggregator.d.ts.map +1 -1
- package/dist/analyzers/security/aggregator.js +4 -46
- package/dist/analyzers/security/aggregator.js.map +1 -1
- package/dist/analyzers/tools/fingerprint.d.ts +91 -26
- package/dist/analyzers/tools/fingerprint.d.ts.map +1 -1
- package/dist/analyzers/tools/fingerprint.js +111 -22
- package/dist/analyzers/tools/fingerprint.js.map +1 -1
- package/dist/analyzers/tools/generic.d.ts.map +1 -1
- package/dist/analyzers/tools/generic.js +6 -1
- package/dist/analyzers/tools/generic.js.map +1 -1
- package/dist/analyzers/tools/gitleaks.d.ts +24 -1
- package/dist/analyzers/tools/gitleaks.d.ts.map +1 -1
- package/dist/analyzers/tools/gitleaks.js +20 -11
- package/dist/analyzers/tools/gitleaks.js.map +1 -1
- package/dist/analyzers/tools/graphify.d.ts.map +1 -1
- package/dist/analyzers/tools/graphify.js +9 -5
- package/dist/analyzers/tools/graphify.js.map +1 -1
- package/dist/analyzers/tools/tool-registry.d.ts +19 -1
- package/dist/analyzers/tools/tool-registry.d.ts.map +1 -1
- package/dist/analyzers/tools/tool-registry.js +25 -0
- package/dist/analyzers/tools/tool-registry.js.map +1 -1
- package/dist/analyzers/types.d.ts +6 -4
- package/dist/analyzers/types.d.ts.map +1 -1
- package/dist/baseline/baseline-file.d.ts +104 -0
- package/dist/baseline/baseline-file.d.ts.map +1 -0
- package/dist/baseline/baseline-file.js +110 -0
- package/dist/baseline/baseline-file.js.map +1 -0
- package/dist/baseline/check-renderers.d.ts +108 -0
- package/dist/baseline/check-renderers.d.ts.map +1 -0
- package/dist/baseline/check-renderers.js +379 -0
- package/dist/baseline/check-renderers.js.map +1 -0
- package/dist/baseline/check.d.ts +127 -0
- package/dist/baseline/check.d.ts.map +1 -0
- package/dist/baseline/check.js +462 -0
- package/dist/baseline/check.js.map +1 -0
- package/dist/baseline/content-hash.d.ts +83 -0
- package/dist/baseline/content-hash.d.ts.map +1 -0
- package/dist/baseline/content-hash.js +131 -0
- package/dist/baseline/content-hash.js.map +1 -0
- package/dist/baseline/create.d.ts +96 -0
- package/dist/baseline/create.d.ts.map +1 -0
- package/dist/baseline/create.js +339 -0
- package/dist/baseline/create.js.map +1 -0
- package/dist/baseline/entry-to-located.d.ts +35 -0
- package/dist/baseline/entry-to-located.d.ts.map +1 -0
- package/dist/baseline/entry-to-located.js +72 -0
- package/dist/baseline/entry-to-located.js.map +1 -0
- package/dist/baseline/finding-identity.d.ts +47 -0
- package/dist/baseline/finding-identity.d.ts.map +1 -0
- package/dist/baseline/finding-identity.js +292 -0
- package/dist/baseline/finding-identity.js.map +1 -0
- package/dist/baseline/git-aware-match.d.ts +146 -0
- package/dist/baseline/git-aware-match.d.ts.map +1 -0
- package/dist/baseline/git-aware-match.js +439 -0
- package/dist/baseline/git-aware-match.js.map +1 -0
- package/dist/baseline/policy.d.ts +171 -0
- package/dist/baseline/policy.d.ts.map +1 -0
- package/dist/baseline/policy.js +206 -0
- package/dist/baseline/policy.js.map +1 -0
- package/dist/baseline/producers/health.d.ts +30 -0
- package/dist/baseline/producers/health.d.ts.map +1 -0
- package/dist/baseline/producers/health.js +42 -0
- package/dist/baseline/producers/health.js.map +1 -0
- package/dist/baseline/producers/index.d.ts +164 -0
- package/dist/baseline/producers/index.d.ts.map +1 -0
- package/dist/baseline/producers/index.js +200 -0
- package/dist/baseline/producers/index.js.map +1 -0
- package/dist/baseline/producers/licenses.d.ts +23 -0
- package/dist/baseline/producers/licenses.d.ts.map +1 -0
- package/dist/baseline/producers/licenses.js +46 -0
- package/dist/baseline/producers/licenses.js.map +1 -0
- package/dist/baseline/producers/quality.d.ts +39 -0
- package/dist/baseline/producers/quality.d.ts.map +1 -0
- package/dist/baseline/producers/quality.js +84 -0
- package/dist/baseline/producers/quality.js.map +1 -0
- package/dist/baseline/producers/secret-hmac.d.ts +45 -0
- package/dist/baseline/producers/secret-hmac.d.ts.map +1 -0
- package/dist/baseline/producers/secret-hmac.js +70 -0
- package/dist/baseline/producers/secret-hmac.js.map +1 -0
- package/dist/baseline/producers/security.d.ts +59 -0
- package/dist/baseline/producers/security.d.ts.map +1 -0
- package/dist/baseline/producers/security.js +135 -0
- package/dist/baseline/producers/security.js.map +1 -0
- package/dist/baseline/producers/tests.d.ts +36 -0
- package/dist/baseline/producers/tests.d.ts.map +1 -0
- package/dist/baseline/producers/tests.js +69 -0
- package/dist/baseline/producers/tests.js.map +1 -0
- package/dist/baseline/salt.d.ts +45 -0
- package/dist/baseline/salt.d.ts.map +1 -0
- package/dist/baseline/salt.js +113 -0
- package/dist/baseline/salt.js.map +1 -0
- package/dist/baseline/show.d.ts +79 -0
- package/dist/baseline/show.d.ts.map +1 -0
- package/dist/baseline/show.js +233 -0
- package/dist/baseline/show.js.map +1 -0
- package/dist/baseline/types.d.ts +482 -0
- package/dist/baseline/types.d.ts.map +1 -0
- package/dist/baseline/types.js +53 -0
- package/dist/baseline/types.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +398 -82
- package/dist/cli.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +0 -4
- package/dist/constants.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +39 -35
- package/dist/doctor.js.map +1 -1
- package/dist/fail-on.d.ts +84 -0
- package/dist/fail-on.d.ts.map +1 -0
- package/dist/fail-on.js +128 -0
- package/dist/fail-on.js.map +1 -0
- package/dist/generator.d.ts +1 -1
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +81 -274
- package/dist/generator.js.map +1 -1
- package/dist/hooks-cli.d.ts +20 -0
- package/dist/hooks-cli.d.ts.map +1 -0
- package/dist/hooks-cli.js +145 -0
- package/dist/hooks-cli.js.map +1 -0
- package/dist/languages/csharp.d.ts.map +1 -1
- package/dist/languages/csharp.js +4 -9
- package/dist/languages/csharp.js.map +1 -1
- package/dist/languages/go.d.ts.map +1 -1
- package/dist/languages/go.js +3 -14
- package/dist/languages/go.js.map +1 -1
- package/dist/languages/index.d.ts +19 -1
- package/dist/languages/index.d.ts.map +1 -1
- package/dist/languages/index.js +32 -0
- package/dist/languages/index.js.map +1 -1
- package/dist/languages/java.d.ts.map +1 -1
- package/dist/languages/java.js +4 -6
- package/dist/languages/java.js.map +1 -1
- package/dist/languages/kotlin.d.ts.map +1 -1
- package/dist/languages/kotlin.js +9 -11
- package/dist/languages/kotlin.js.map +1 -1
- package/dist/languages/python.d.ts.map +1 -1
- package/dist/languages/python.js +4 -15
- package/dist/languages/python.js.map +1 -1
- package/dist/languages/ruby.d.ts.map +1 -1
- package/dist/languages/ruby.js +4 -6
- package/dist/languages/ruby.js.map +1 -1
- package/dist/languages/rust.d.ts.map +1 -1
- package/dist/languages/rust.js +4 -4
- package/dist/languages/rust.js.map +1 -1
- package/dist/languages/types.d.ts +29 -28
- package/dist/languages/types.d.ts.map +1 -1
- package/dist/languages/typescript.d.ts.map +1 -1
- package/dist/languages/typescript.js +31 -4
- package/dist/languages/typescript.js.map +1 -1
- package/dist/lib.d.ts +2 -3
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +3 -6
- package/dist/lib.js.map +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +0 -10
- package/dist/prompts.js.map +1 -1
- package/dist/report-schema.d.ts +42 -0
- package/dist/report-schema.d.ts.map +1 -0
- package/dist/report-schema.js +54 -0
- package/dist/report-schema.js.map +1 -0
- package/dist/ship-installers.d.ts +112 -0
- package/dist/ship-installers.d.ts.map +1 -0
- package/dist/ship-installers.js +530 -0
- package/dist/ship-installers.js.map +1 -0
- package/dist/tools-cli.d.ts.map +1 -1
- package/dist/tools-cli.js +45 -9
- package/dist/tools-cli.js.map +1 -1
- package/dist/types.d.ts +0 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +0 -4
- package/dist/update.js.map +1 -1
- package/package.json +17 -11
- package/templates/.claude/skills/dxkit-action/SKILL.md +150 -0
- package/templates/.claude/skills/dxkit-config/SKILL.md +124 -0
- package/templates/.claude/skills/dxkit-hooks/SKILL.md +109 -0
- package/templates/.claude/skills/dxkit-init/SKILL.md +93 -0
- package/templates/.claude/skills/dxkit-learn/SKILL.md +84 -0
- package/templates/.claude/skills/dxkit-reports/SKILL.md +111 -0
- package/templates/.devcontainer/devcontainer.json +55 -0
- package/templates/.devcontainer/install-agent-clis.sh +42 -0
- package/templates/.devcontainer/post-create.sh +81 -0
- package/templates/.githooks/pre-commit +55 -0
- package/templates/.githooks/pre-push +63 -0
- package/templates/.github/workflows/dxkit-baseline-refresh.yml +78 -0
- package/templates/.github/workflows/dxkit-guardrails.yml +98 -0
- package/templates/AGENTS.md.template +137 -0
- package/templates/CLAUDE.md.template +16 -245
- package/dist/codebase-scanner.d.ts +0 -36
- package/dist/codebase-scanner.d.ts.map +0 -1
- package/dist/codebase-scanner.js +0 -688
- package/dist/codebase-scanner.js.map +0 -1
- package/dist/project-yaml.d.ts +0 -13
- package/dist/project-yaml.d.ts.map +0 -1
- package/dist/project-yaml.js +0 -188
- package/dist/project-yaml.js.map +0 -1
- package/templates/.ai/README.md +0 -117
- package/templates/.ai/prompts/execution-prompt.md +0 -9
- package/templates/.ai/prompts/planning-prompt.md +0 -18
- package/templates/.ai/prompts/session-end-template.md +0 -182
- package/templates/.ai/prompts/session-end.md +0 -132
- package/templates/.ai/prompts/session-start.md +0 -109
- package/templates/.ai/prompts/step-by-step.md +0 -113
- package/templates/.ai/sessions/.gitkeep +0 -0
- package/templates/.claude/agents/doc-writer.md +0 -107
- package/templates/.claude/agents/knowledge-bot.md +0 -64
- package/templates/.claude/agents/onboarding.md +0 -61
- package/templates/.claude/agents/quality-reviewer.md +0 -85
- package/templates/.claude/agents-available/code-reviewer.md +0 -29
- package/templates/.claude/agents-available/codebase-explorer.md +0 -100
- package/templates/.claude/agents-available/dashboard-builder.md +0 -433
- package/templates/.claude/agents-available/debugger.md +0 -29
- package/templates/.claude/agents-available/dependency-mapper.md +0 -80
- package/templates/.claude/agents-available/dev-report.md +0 -108
- package/templates/.claude/agents-available/doc-writer.md +0 -107
- package/templates/.claude/agents-available/feature-builder.md +0 -163
- package/templates/.claude/agents-available/feature-planner.md +0 -185
- package/templates/.claude/agents-available/health-auditor.md +0 -95
- package/templates/.claude/agents-available/hooks-configurator.md +0 -211
- package/templates/.claude/agents-available/knowledge-bot.md +0 -62
- package/templates/.claude/agents-available/plan-executor.md +0 -133
- package/templates/.claude/agents-available/strategic-planner.md +0 -141
- package/templates/.claude/agents-available/test-gap-finder.md +0 -67
- package/templates/.claude/agents-available/test-writer.md +0 -34
- package/templates/.claude/agents-available/vulnerability-scanner.md +0 -173
- package/templates/.claude/commands/ask.md +0 -7
- package/templates/.claude/commands/build-feature.md +0 -26
- package/templates/.claude/commands/build.md.template +0 -30
- package/templates/.claude/commands/check.md.template +0 -43
- package/templates/.claude/commands/dashboard.md +0 -28
- package/templates/.claude/commands/deps.md +0 -15
- package/templates/.claude/commands/dev-report.md +0 -50
- package/templates/.claude/commands/docs.md +0 -21
- package/templates/.claude/commands/doctor.md +0 -21
- package/templates/.claude/commands/enable-agent.md +0 -12
- package/templates/.claude/commands/execute-plan.md +0 -25
- package/templates/.claude/commands/explore-codebase.md +0 -12
- package/templates/.claude/commands/export-pdf.md +0 -30
- package/templates/.claude/commands/feature.md +0 -25
- package/templates/.claude/commands/fix-issue.md +0 -12
- package/templates/.claude/commands/fix.md.template +0 -32
- package/templates/.claude/commands/health.md +0 -58
- package/templates/.claude/commands/help.md +0 -36
- package/templates/.claude/commands/learn.md +0 -48
- package/templates/.claude/commands/onboarding.md +0 -21
- package/templates/.claude/commands/plan.md +0 -20
- package/templates/.claude/commands/quality.md.template +0 -65
- package/templates/.claude/commands/session-end.md +0 -40
- package/templates/.claude/commands/session-start.md +0 -30
- package/templates/.claude/commands/setup-hooks.md +0 -18
- package/templates/.claude/commands/setup-pr-review.md +0 -72
- package/templates/.claude/commands/stealth-mode.md +0 -17
- package/templates/.claude/commands/test-gaps.md +0 -49
- package/templates/.claude/commands/test.md.template +0 -40
- package/templates/.claude/commands/vulnerabilities.md +0 -49
- package/templates/.claude/skills/build/SKILL.md.template +0 -98
- package/templates/.claude/skills/deploy/SKILL.md.template +0 -131
- package/templates/.claude/skills/deploy/references/gotchas.md +0 -5
- package/templates/.claude/skills/doctor/SKILL.md +0 -54
- package/templates/.claude/skills/gcloud/SKILL.md +0 -66
- package/templates/.claude/skills/gcloud/references/gotchas.md +0 -5
- package/templates/.claude/skills/learned/SKILL.md +0 -55
- package/templates/.claude/skills/learned/references/conventions.md +0 -11
- package/templates/.claude/skills/learned/references/deny-recommendations.md +0 -18
- package/templates/.claude/skills/learned/references/gotchas.md +0 -11
- package/templates/.claude/skills/pulumi/SKILL.md +0 -73
- package/templates/.claude/skills/quality/SKILL.md.template +0 -108
- package/templates/.claude/skills/quality/references/gotchas.md +0 -5
- package/templates/.claude/skills/review/SKILL.md.template +0 -73
- package/templates/.claude/skills/scaffold/SKILL.md.template +0 -123
- package/templates/.claude/skills/secrets/SKILL.md +0 -52
- package/templates/.claude/skills/session/SKILL.md +0 -43
- package/templates/.claude/skills/test/SKILL.md.template +0 -122
- package/templates/.claude/skills/test/references/gotchas.md +0 -5
- package/templates/.devcontainer/Dockerfile.dev.template +0 -89
- package/templates/.devcontainer/devcontainer.json.template +0 -184
- package/templates/.devcontainer/docker-compose.yml.template +0 -105
- package/templates/.devcontainer/init-scripts/01-init.sql.template +0 -12
- package/templates/.devcontainer/post-create.sh.template +0 -298
- package/templates/.github/workflows/ci.yml.template +0 -399
- package/templates/.github/workflows/quality.yml.template +0 -376
- package/templates/.pre-commit-config.yaml.template +0 -106
- package/templates/.project/config/edit_config.py +0 -275
- package/templates/.project/config/project_config.py +0 -894
- package/templates/.project/scripts/codegen/generate-all.sh +0 -20
- package/templates/.project/scripts/codegen/validate-all.sh +0 -17
- package/templates/.project/scripts/docs/generate-all.sh +0 -30
- package/templates/.project/scripts/docs/serve.sh +0 -20
- package/templates/.project/scripts/quality/fix-all.sh +0 -138
- package/templates/.project/scripts/quality/lint-go.sh +0 -34
- package/templates/.project/scripts/quality/lint-python.sh +0 -54
- package/templates/.project/scripts/quality/run-all.sh +0 -497
- package/templates/.project/scripts/session/commit.sh +0 -70
- package/templates/.project/scripts/session/create-pr.sh +0 -165
- package/templates/.project/scripts/session/end.sh +0 -207
- package/templates/.project/scripts/session/start.sh +0 -233
- package/templates/.project/scripts/setup/doctor.sh +0 -404
- package/templates/.project/scripts/setup/interactive-setup.sh +0 -585
- package/templates/.project/scripts/sync/sync-template.sh +0 -328
- package/templates/.project/scripts/test/run-all.sh +0 -179
- package/templates/.project/scripts/test/run-quick.sh +0 -25
- package/templates/Makefile +0 -514
- package/templates/config/versions.yaml +0 -57
- package/templates/configs/go/.golangci.yml.template +0 -172
- package/templates/configs/go/go.mod.template +0 -15
- package/templates/configs/java/README.md +0 -6
- package/templates/configs/kotlin/README.md +0 -6
- package/templates/configs/node/package.json.template +0 -67
- package/templates/configs/node/tsconfig.json.template +0 -53
- package/templates/configs/python/pyproject.toml.template +0 -92
- package/templates/configs/python/pytest.ini.template +0 -64
- package/templates/configs/python/ruff.toml.template +0 -79
- package/templates/configs/ruby/README.md +0 -6
- package/templates/configs/rust/Cargo.toml.template +0 -51
- package/templates/configs/shared/.editorconfig +0 -67
- package/templates/scripts/validate-templates.sh +0 -449
|
@@ -1,404 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
# Doctor Script - Diagnose common setup issues
|
|
4
|
-
# =============================================
|
|
5
|
-
#
|
|
6
|
-
# Checks:
|
|
7
|
-
# - Required files exist (.project.yaml, Makefile, etc.)
|
|
8
|
-
# - Language toolchains match enabled languages
|
|
9
|
-
# - Quality tools installed
|
|
10
|
-
# - Git hooks configured (if precommit enabled)
|
|
11
|
-
# - Config syntax valid
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
set -e
|
|
15
|
-
|
|
16
|
-
# Colors
|
|
17
|
-
CYAN='\033[36m'
|
|
18
|
-
GREEN='\033[32m'
|
|
19
|
-
YELLOW='\033[33m'
|
|
20
|
-
RED='\033[31m'
|
|
21
|
-
BOLD='\033[1m'
|
|
22
|
-
DIM='\033[2m'
|
|
23
|
-
RESET='\033[0m'
|
|
24
|
-
|
|
25
|
-
# Counters
|
|
26
|
-
CHECKS_PASSED=0
|
|
27
|
-
CHECKS_WARNED=0
|
|
28
|
-
CHECKS_FAILED=0
|
|
29
|
-
|
|
30
|
-
# ============================================================================
|
|
31
|
-
# Helper Functions
|
|
32
|
-
# ============================================================================
|
|
33
|
-
|
|
34
|
-
print_header() {
|
|
35
|
-
echo ""
|
|
36
|
-
echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}"
|
|
37
|
-
echo -e "${CYAN} $1${RESET}"
|
|
38
|
-
echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}"
|
|
39
|
-
echo ""
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
check_pass() {
|
|
43
|
-
echo -e " ${GREEN}✓${RESET} $1"
|
|
44
|
-
CHECKS_PASSED=$((CHECKS_PASSED + 1))
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
check_warn() {
|
|
48
|
-
echo -e " ${YELLOW}!${RESET} $1"
|
|
49
|
-
if [ -n "$2" ]; then
|
|
50
|
-
echo -e " ${DIM}→ $2${RESET}"
|
|
51
|
-
fi
|
|
52
|
-
CHECKS_WARNED=$((CHECKS_WARNED + 1))
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
check_fail() {
|
|
56
|
-
echo -e " ${RED}✗${RESET} $1"
|
|
57
|
-
if [ -n "$2" ]; then
|
|
58
|
-
echo -e " ${DIM}→ $2${RESET}"
|
|
59
|
-
fi
|
|
60
|
-
CHECKS_FAILED=$((CHECKS_FAILED + 1))
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
# ============================================================================
|
|
64
|
-
# Core File Checks
|
|
65
|
-
# ============================================================================
|
|
66
|
-
|
|
67
|
-
check_core_files() {
|
|
68
|
-
echo -e "${BOLD}Core Files${RESET}"
|
|
69
|
-
echo ""
|
|
70
|
-
|
|
71
|
-
# .project.yaml
|
|
72
|
-
if [ -f ".project.yaml" ]; then
|
|
73
|
-
check_pass ".project.yaml exists"
|
|
74
|
-
|
|
75
|
-
# Validate YAML syntax
|
|
76
|
-
if python3 -c "import yaml; yaml.safe_load(open('.project.yaml'))" 2>/dev/null; then
|
|
77
|
-
check_pass ".project.yaml is valid YAML"
|
|
78
|
-
else
|
|
79
|
-
check_fail ".project.yaml has invalid YAML syntax" "Run: python3 -c \"import yaml; yaml.safe_load(open('.project.yaml'))\""
|
|
80
|
-
fi
|
|
81
|
-
else
|
|
82
|
-
check_fail ".project.yaml not found" "Run: ./bootstrap.sh to initialize"
|
|
83
|
-
fi
|
|
84
|
-
|
|
85
|
-
# Makefile
|
|
86
|
-
if [ -f "Makefile" ]; then
|
|
87
|
-
check_pass "Makefile exists"
|
|
88
|
-
else
|
|
89
|
-
check_fail "Makefile not found" "Run: ./bootstrap.sh to initialize"
|
|
90
|
-
fi
|
|
91
|
-
|
|
92
|
-
# .project directory
|
|
93
|
-
if [ -d ".project" ]; then
|
|
94
|
-
check_pass ".project/ directory exists"
|
|
95
|
-
|
|
96
|
-
# Check key scripts
|
|
97
|
-
if [ -f ".project/config/project_config.py" ]; then
|
|
98
|
-
check_pass "project_config.py exists"
|
|
99
|
-
else
|
|
100
|
-
check_warn "project_config.py missing" "Some make commands may not work"
|
|
101
|
-
fi
|
|
102
|
-
else
|
|
103
|
-
check_fail ".project/ directory not found" "Run: ./bootstrap.sh to initialize"
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
echo ""
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
# ============================================================================
|
|
110
|
-
# Language Toolchain Checks
|
|
111
|
-
# ============================================================================
|
|
112
|
-
|
|
113
|
-
check_language_toolchains() {
|
|
114
|
-
echo -e "${BOLD}Language Toolchains${RESET}"
|
|
115
|
-
echo ""
|
|
116
|
-
|
|
117
|
-
# Helper function to extract major.minor version
|
|
118
|
-
get_major_minor() {
|
|
119
|
-
echo "$1" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
# Read enabled languages from config
|
|
123
|
-
if [ -f ".project.yaml" ]; then
|
|
124
|
-
# Python
|
|
125
|
-
PYTHON_ENABLED=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print('true' if c.get('languages',{}).get('python',{}).get('enabled', False) else 'false')" 2>/dev/null || echo "false")
|
|
126
|
-
PYTHON_VERSION_CONFIG=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print(c.get('languages',{}).get('python',{}).get('version', '3.12'))" 2>/dev/null || echo "3.12")
|
|
127
|
-
|
|
128
|
-
if [ "$PYTHON_ENABLED" = "true" ]; then
|
|
129
|
-
if command -v python3 &> /dev/null; then
|
|
130
|
-
ACTUAL_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
|
|
131
|
-
# Compare only major.minor versions (ignore patch)
|
|
132
|
-
CONFIG_MAJOR_MINOR=$(get_major_minor "$PYTHON_VERSION_CONFIG")
|
|
133
|
-
ACTUAL_MAJOR_MINOR=$(get_major_minor "$ACTUAL_VERSION")
|
|
134
|
-
if [[ "$ACTUAL_MAJOR_MINOR" == "$CONFIG_MAJOR_MINOR" ]]; then
|
|
135
|
-
check_pass "Python $ACTUAL_VERSION installed (config: $PYTHON_VERSION_CONFIG)"
|
|
136
|
-
else
|
|
137
|
-
check_warn "Python version mismatch" "Config: $PYTHON_VERSION_CONFIG, Installed: $ACTUAL_VERSION"
|
|
138
|
-
fi
|
|
139
|
-
else
|
|
140
|
-
check_fail "Python not found but enabled in config" "Install Python $PYTHON_VERSION_CONFIG"
|
|
141
|
-
fi
|
|
142
|
-
else
|
|
143
|
-
echo -e " ${DIM}○ Python not enabled${RESET}"
|
|
144
|
-
fi
|
|
145
|
-
|
|
146
|
-
# Go
|
|
147
|
-
GO_ENABLED=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print('true' if c.get('languages',{}).get('go',{}).get('enabled', False) else 'false')" 2>/dev/null || echo "false")
|
|
148
|
-
GO_VERSION=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print(c.get('languages',{}).get('go',{}).get('version', '1.24.0'))" 2>/dev/null || echo "1.24.0")
|
|
149
|
-
|
|
150
|
-
if [ "$GO_ENABLED" = "true" ]; then
|
|
151
|
-
if command -v go &> /dev/null; then
|
|
152
|
-
ACTUAL_VERSION=$(go version | awk '{print $3}' | sed 's/go//')
|
|
153
|
-
check_pass "Go $ACTUAL_VERSION installed (config: $GO_VERSION)"
|
|
154
|
-
else
|
|
155
|
-
check_fail "Go not found but enabled in config" "Install Go $GO_VERSION"
|
|
156
|
-
fi
|
|
157
|
-
else
|
|
158
|
-
echo -e " ${DIM}○ Go not enabled${RESET}"
|
|
159
|
-
fi
|
|
160
|
-
|
|
161
|
-
# Node.js
|
|
162
|
-
NODE_ENABLED=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print('true' if c.get('languages',{}).get('node',{}).get('enabled', False) else 'false')" 2>/dev/null || echo "false")
|
|
163
|
-
NODE_VERSION_CONFIG=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print(c.get('languages',{}).get('node',{}).get('version', '20'))" 2>/dev/null || echo "20")
|
|
164
|
-
|
|
165
|
-
if [ "$NODE_ENABLED" = "true" ]; then
|
|
166
|
-
if command -v node &> /dev/null; then
|
|
167
|
-
ACTUAL_VERSION=$(node --version | sed 's/v//')
|
|
168
|
-
# Compare major version only for Node.js (config typically specifies major only)
|
|
169
|
-
ACTUAL_MAJOR=$(echo "$ACTUAL_VERSION" | cut -d. -f1)
|
|
170
|
-
CONFIG_MAJOR=$(echo "$NODE_VERSION_CONFIG" | cut -d. -f1)
|
|
171
|
-
if [[ "$ACTUAL_MAJOR" == "$CONFIG_MAJOR" ]]; then
|
|
172
|
-
check_pass "Node.js $ACTUAL_VERSION installed (config: $NODE_VERSION_CONFIG)"
|
|
173
|
-
else
|
|
174
|
-
check_warn "Node.js version mismatch" "Config: $NODE_VERSION_CONFIG, Installed: $ACTUAL_VERSION"
|
|
175
|
-
fi
|
|
176
|
-
else
|
|
177
|
-
check_fail "Node.js not found but enabled in config" "Install Node.js $NODE_VERSION_CONFIG"
|
|
178
|
-
fi
|
|
179
|
-
else
|
|
180
|
-
echo -e " ${DIM}○ Node.js not enabled${RESET}"
|
|
181
|
-
fi
|
|
182
|
-
|
|
183
|
-
# Rust
|
|
184
|
-
RUST_ENABLED=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print('true' if c.get('languages',{}).get('rust',{}).get('enabled', False) else 'false')" 2>/dev/null || echo "false")
|
|
185
|
-
|
|
186
|
-
if [ "$RUST_ENABLED" = "true" ]; then
|
|
187
|
-
if command -v rustc &> /dev/null; then
|
|
188
|
-
ACTUAL_VERSION=$(rustc --version | awk '{print $2}')
|
|
189
|
-
check_pass "Rust $ACTUAL_VERSION installed"
|
|
190
|
-
else
|
|
191
|
-
check_fail "Rust not found but enabled in config" "Install Rust via rustup"
|
|
192
|
-
fi
|
|
193
|
-
else
|
|
194
|
-
echo -e " ${DIM}○ Rust not enabled${RESET}"
|
|
195
|
-
fi
|
|
196
|
-
else
|
|
197
|
-
check_warn "Cannot check toolchains" ".project.yaml not found"
|
|
198
|
-
fi
|
|
199
|
-
|
|
200
|
-
echo ""
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
# ============================================================================
|
|
204
|
-
# Quality Tools Checks
|
|
205
|
-
# ============================================================================
|
|
206
|
-
|
|
207
|
-
check_quality_tools() {
|
|
208
|
-
echo -e "${BOLD}Quality Tools${RESET}"
|
|
209
|
-
echo ""
|
|
210
|
-
|
|
211
|
-
if [ -f ".project.yaml" ]; then
|
|
212
|
-
# Python quality tools
|
|
213
|
-
PYTHON_ENABLED=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print('true' if c.get('languages',{}).get('python',{}).get('enabled', False) else 'false')" 2>/dev/null || echo "false")
|
|
214
|
-
|
|
215
|
-
if [ "$PYTHON_ENABLED" = "true" ]; then
|
|
216
|
-
# ruff
|
|
217
|
-
if command -v ruff &> /dev/null; then
|
|
218
|
-
check_pass "ruff installed (Python linter)"
|
|
219
|
-
else
|
|
220
|
-
check_warn "ruff not installed" "pip install ruff"
|
|
221
|
-
fi
|
|
222
|
-
|
|
223
|
-
# mypy
|
|
224
|
-
if command -v mypy &> /dev/null; then
|
|
225
|
-
check_pass "mypy installed (Python type checker)"
|
|
226
|
-
else
|
|
227
|
-
check_warn "mypy not installed" "pip install mypy"
|
|
228
|
-
fi
|
|
229
|
-
|
|
230
|
-
# pytest
|
|
231
|
-
if python3 -c "import pytest" 2>/dev/null; then
|
|
232
|
-
check_pass "pytest installed (Python testing)"
|
|
233
|
-
else
|
|
234
|
-
check_warn "pytest not installed" "pip install pytest pytest-cov"
|
|
235
|
-
fi
|
|
236
|
-
fi
|
|
237
|
-
|
|
238
|
-
# Go quality tools
|
|
239
|
-
GO_ENABLED=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print('true' if c.get('languages',{}).get('go',{}).get('enabled', False) else 'false')" 2>/dev/null || echo "false")
|
|
240
|
-
|
|
241
|
-
if [ "$GO_ENABLED" = "true" ]; then
|
|
242
|
-
if command -v golangci-lint &> /dev/null; then
|
|
243
|
-
check_pass "golangci-lint installed (Go linter)"
|
|
244
|
-
else
|
|
245
|
-
check_warn "golangci-lint not installed" "go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest"
|
|
246
|
-
fi
|
|
247
|
-
fi
|
|
248
|
-
|
|
249
|
-
# Node quality tools
|
|
250
|
-
NODE_ENABLED=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print('true' if c.get('languages',{}).get('node',{}).get('enabled', False) else 'false')" 2>/dev/null || echo "false")
|
|
251
|
-
|
|
252
|
-
if [ "$NODE_ENABLED" = "true" ]; then
|
|
253
|
-
if command -v eslint &> /dev/null || [ -f "node_modules/.bin/eslint" ]; then
|
|
254
|
-
check_pass "eslint available (Node linter)"
|
|
255
|
-
else
|
|
256
|
-
check_warn "eslint not installed" "npm install -D eslint"
|
|
257
|
-
fi
|
|
258
|
-
fi
|
|
259
|
-
else
|
|
260
|
-
check_warn "Cannot check quality tools" ".project.yaml not found"
|
|
261
|
-
fi
|
|
262
|
-
|
|
263
|
-
echo ""
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
# ============================================================================
|
|
267
|
-
# Git Hooks Checks
|
|
268
|
-
# ============================================================================
|
|
269
|
-
|
|
270
|
-
check_git_hooks() {
|
|
271
|
-
echo -e "${BOLD}Git Configuration${RESET}"
|
|
272
|
-
echo ""
|
|
273
|
-
|
|
274
|
-
# Check if we're in a git repo
|
|
275
|
-
if [ -d ".git" ]; then
|
|
276
|
-
check_pass "Git repository initialized"
|
|
277
|
-
|
|
278
|
-
# Check git user config
|
|
279
|
-
if git config user.name &> /dev/null; then
|
|
280
|
-
check_pass "Git user.name configured: $(git config user.name)"
|
|
281
|
-
else
|
|
282
|
-
check_warn "Git user.name not set" "git config user.name 'Your Name'"
|
|
283
|
-
fi
|
|
284
|
-
|
|
285
|
-
if git config user.email &> /dev/null; then
|
|
286
|
-
check_pass "Git user.email configured"
|
|
287
|
-
else
|
|
288
|
-
check_warn "Git user.email not set" "git config user.email 'you@example.com'"
|
|
289
|
-
fi
|
|
290
|
-
|
|
291
|
-
# Check pre-commit hooks if enabled
|
|
292
|
-
if [ -f ".project.yaml" ]; then
|
|
293
|
-
PRECOMMIT_ENABLED=$(python3 -c "import yaml; c=yaml.safe_load(open('.project.yaml')); print('true' if c.get('precommit', False) else 'false')" 2>/dev/null || echo "false")
|
|
294
|
-
|
|
295
|
-
if [ "$PRECOMMIT_ENABLED" = "true" ]; then
|
|
296
|
-
if [ -f ".git/hooks/pre-commit" ]; then
|
|
297
|
-
check_pass "Pre-commit hook installed"
|
|
298
|
-
else
|
|
299
|
-
check_warn "Pre-commit hook not installed" "Run: pre-commit install"
|
|
300
|
-
fi
|
|
301
|
-
|
|
302
|
-
if command -v pre-commit &> /dev/null; then
|
|
303
|
-
check_pass "pre-commit tool installed"
|
|
304
|
-
else
|
|
305
|
-
check_warn "pre-commit tool not installed" "pip install pre-commit"
|
|
306
|
-
fi
|
|
307
|
-
else
|
|
308
|
-
echo -e " ${DIM}○ Pre-commit hooks not enabled${RESET}"
|
|
309
|
-
fi
|
|
310
|
-
fi
|
|
311
|
-
else
|
|
312
|
-
check_warn "Not a git repository" "Run: git init"
|
|
313
|
-
fi
|
|
314
|
-
|
|
315
|
-
echo ""
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
# ============================================================================
|
|
319
|
-
# Environment Checks
|
|
320
|
-
# ============================================================================
|
|
321
|
-
|
|
322
|
-
check_environment() {
|
|
323
|
-
echo -e "${BOLD}Environment${RESET}"
|
|
324
|
-
echo ""
|
|
325
|
-
|
|
326
|
-
# Make
|
|
327
|
-
if command -v make &> /dev/null; then
|
|
328
|
-
check_pass "make available"
|
|
329
|
-
else
|
|
330
|
-
check_warn "make not installed" "Install via package manager"
|
|
331
|
-
fi
|
|
332
|
-
|
|
333
|
-
# PyYAML (required for config tools)
|
|
334
|
-
if python3 -c "import yaml" 2>/dev/null; then
|
|
335
|
-
check_pass "PyYAML installed"
|
|
336
|
-
else
|
|
337
|
-
check_fail "PyYAML not installed" "pip install pyyaml"
|
|
338
|
-
fi
|
|
339
|
-
|
|
340
|
-
# Docker (optional)
|
|
341
|
-
if command -v docker &> /dev/null; then
|
|
342
|
-
check_pass "Docker available"
|
|
343
|
-
else
|
|
344
|
-
echo -e " ${DIM}○ Docker not installed (optional)${RESET}"
|
|
345
|
-
fi
|
|
346
|
-
|
|
347
|
-
echo ""
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
# ============================================================================
|
|
351
|
-
# Summary
|
|
352
|
-
# ============================================================================
|
|
353
|
-
|
|
354
|
-
print_summary() {
|
|
355
|
-
print_header "DIAGNOSTIC SUMMARY"
|
|
356
|
-
|
|
357
|
-
TOTAL=$((CHECKS_PASSED + CHECKS_WARNED + CHECKS_FAILED))
|
|
358
|
-
|
|
359
|
-
echo -e " ${GREEN}✓ Passed:${RESET} $CHECKS_PASSED"
|
|
360
|
-
echo -e " ${YELLOW}! Warnings:${RESET} $CHECKS_WARNED"
|
|
361
|
-
echo -e " ${RED}✗ Failed:${RESET} $CHECKS_FAILED"
|
|
362
|
-
echo ""
|
|
363
|
-
|
|
364
|
-
if [ $CHECKS_FAILED -gt 0 ]; then
|
|
365
|
-
echo -e " ${RED}${BOLD}Some checks failed.${RESET}"
|
|
366
|
-
echo -e " ${DIM}Fix the issues above and run 'make doctor' again.${RESET}"
|
|
367
|
-
echo ""
|
|
368
|
-
exit 1
|
|
369
|
-
elif [ $CHECKS_WARNED -gt 0 ]; then
|
|
370
|
-
echo -e " ${YELLOW}${BOLD}Setup complete with warnings.${RESET}"
|
|
371
|
-
echo -e " ${DIM}Consider fixing warnings for best experience.${RESET}"
|
|
372
|
-
echo ""
|
|
373
|
-
else
|
|
374
|
-
echo -e " ${GREEN}${BOLD}All checks passed!${RESET}"
|
|
375
|
-
echo -e " ${DIM}Your environment is ready for development.${RESET}"
|
|
376
|
-
echo ""
|
|
377
|
-
fi
|
|
378
|
-
|
|
379
|
-
echo -e " ${CYAN}Next steps:${RESET}"
|
|
380
|
-
echo -e " • Run ${CYAN}make info${RESET} to see your configuration"
|
|
381
|
-
echo -e " • Run ${CYAN}make help${RESET} to see available commands"
|
|
382
|
-
echo -e " • Run ${CYAN}make test${RESET} to verify everything works"
|
|
383
|
-
echo ""
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
# ============================================================================
|
|
387
|
-
# Main
|
|
388
|
-
# ============================================================================
|
|
389
|
-
|
|
390
|
-
main() {
|
|
391
|
-
print_header "PROJECT DIAGNOSTICS"
|
|
392
|
-
echo -e " ${DIM}Checking your development environment...${RESET}"
|
|
393
|
-
echo ""
|
|
394
|
-
|
|
395
|
-
check_core_files
|
|
396
|
-
check_language_toolchains
|
|
397
|
-
check_quality_tools
|
|
398
|
-
check_git_hooks
|
|
399
|
-
check_environment
|
|
400
|
-
|
|
401
|
-
print_summary
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
main "$@"
|