aidevops 2.52.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/.agent/AGENTS.md +614 -0
- package/.agent/accounts.md +65 -0
- package/.agent/aidevops/add-new-mcp-to-aidevops.md +456 -0
- package/.agent/aidevops/api-integrations.md +335 -0
- package/.agent/aidevops/architecture.md +510 -0
- package/.agent/aidevops/configs.md +274 -0
- package/.agent/aidevops/docs.md +244 -0
- package/.agent/aidevops/extension.md +311 -0
- package/.agent/aidevops/mcp-integrations.md +340 -0
- package/.agent/aidevops/mcp-troubleshooting.md +162 -0
- package/.agent/aidevops/memory-patterns.md +172 -0
- package/.agent/aidevops/providers.md +217 -0
- package/.agent/aidevops/recommendations.md +321 -0
- package/.agent/aidevops/requirements.md +301 -0
- package/.agent/aidevops/resources.md +214 -0
- package/.agent/aidevops/security-requirements.md +174 -0
- package/.agent/aidevops/security.md +350 -0
- package/.agent/aidevops/service-links.md +400 -0
- package/.agent/aidevops/services.md +357 -0
- package/.agent/aidevops/setup.md +153 -0
- package/.agent/aidevops/troubleshooting.md +389 -0
- package/.agent/aidevops.md +124 -0
- package/.agent/build-plus.md +244 -0
- package/.agent/content/guidelines.md +109 -0
- package/.agent/content.md +87 -0
- package/.agent/health.md +59 -0
- package/.agent/legal.md +59 -0
- package/.agent/loop-state/full-loop.local.md +16 -0
- package/.agent/loop-state/ralph-loop.local.md +10 -0
- package/.agent/marketing.md +440 -0
- package/.agent/memory/README.md +260 -0
- package/.agent/onboarding.md +796 -0
- package/.agent/plan-plus.md +245 -0
- package/.agent/research.md +100 -0
- package/.agent/sales.md +333 -0
- package/.agent/scripts/101domains-helper.sh +701 -0
- package/.agent/scripts/add-missing-returns.sh +140 -0
- package/.agent/scripts/agent-browser-helper.sh +311 -0
- package/.agent/scripts/agno-setup.sh +712 -0
- package/.agent/scripts/ahrefs-mcp-wrapper.js +168 -0
- package/.agent/scripts/aidevops-update-check.sh +71 -0
- package/.agent/scripts/ampcode-cli.sh +522 -0
- package/.agent/scripts/auto-version-bump.sh +156 -0
- package/.agent/scripts/autogen-helper.sh +512 -0
- package/.agent/scripts/beads-sync-helper.sh +596 -0
- package/.agent/scripts/closte-helper.sh +5 -0
- package/.agent/scripts/cloudron-helper.sh +321 -0
- package/.agent/scripts/codacy-cli-chunked.sh +581 -0
- package/.agent/scripts/codacy-cli.sh +442 -0
- package/.agent/scripts/code-audit-helper.sh +5 -0
- package/.agent/scripts/coderabbit-cli.sh +417 -0
- package/.agent/scripts/coderabbit-pro-analysis.sh +238 -0
- package/.agent/scripts/commands/code-simplifier.md +86 -0
- package/.agent/scripts/commands/full-loop.md +246 -0
- package/.agent/scripts/commands/postflight-loop.md +103 -0
- package/.agent/scripts/commands/recall.md +182 -0
- package/.agent/scripts/commands/remember.md +132 -0
- package/.agent/scripts/commands/save-todo.md +175 -0
- package/.agent/scripts/commands/session-review.md +154 -0
- package/.agent/scripts/comprehensive-quality-fix.sh +106 -0
- package/.agent/scripts/context-builder-helper.sh +522 -0
- package/.agent/scripts/coolify-cli-helper.sh +674 -0
- package/.agent/scripts/coolify-helper.sh +380 -0
- package/.agent/scripts/crawl4ai-examples.sh +401 -0
- package/.agent/scripts/crawl4ai-helper.sh +1078 -0
- package/.agent/scripts/crewai-helper.sh +681 -0
- package/.agent/scripts/dev-browser-helper.sh +513 -0
- package/.agent/scripts/dns-helper.sh +396 -0
- package/.agent/scripts/domain-research-helper.sh +917 -0
- package/.agent/scripts/dspy-helper.sh +285 -0
- package/.agent/scripts/dspyground-helper.sh +291 -0
- package/.agent/scripts/eeat-score-helper.sh +1242 -0
- package/.agent/scripts/efficient-return-fix.sh +92 -0
- package/.agent/scripts/extract-opencode-prompts.sh +128 -0
- package/.agent/scripts/find-missing-returns.sh +113 -0
- package/.agent/scripts/fix-auth-headers.sh +104 -0
- package/.agent/scripts/fix-common-strings.sh +254 -0
- package/.agent/scripts/fix-content-type.sh +100 -0
- package/.agent/scripts/fix-error-messages.sh +130 -0
- package/.agent/scripts/fix-misplaced-returns.sh +74 -0
- package/.agent/scripts/fix-remaining-literals.sh +152 -0
- package/.agent/scripts/fix-return-statements.sh +41 -0
- package/.agent/scripts/fix-s131-default-cases.sh +249 -0
- package/.agent/scripts/fix-sc2155-simple.sh +102 -0
- package/.agent/scripts/fix-shellcheck-critical.sh +187 -0
- package/.agent/scripts/fix-string-literals.sh +273 -0
- package/.agent/scripts/full-loop-helper.sh +773 -0
- package/.agent/scripts/generate-opencode-agents.sh +497 -0
- package/.agent/scripts/generate-opencode-commands.sh +1629 -0
- package/.agent/scripts/generate-skills.sh +366 -0
- package/.agent/scripts/git-platforms-helper.sh +640 -0
- package/.agent/scripts/gitea-cli-helper.sh +743 -0
- package/.agent/scripts/github-cli-helper.sh +702 -0
- package/.agent/scripts/gitlab-cli-helper.sh +682 -0
- package/.agent/scripts/gsc-add-user-helper.sh +325 -0
- package/.agent/scripts/gsc-sitemap-helper.sh +678 -0
- package/.agent/scripts/hetzner-helper.sh +485 -0
- package/.agent/scripts/hostinger-helper.sh +229 -0
- package/.agent/scripts/keyword-research-helper.sh +1815 -0
- package/.agent/scripts/langflow-helper.sh +544 -0
- package/.agent/scripts/linkedin-automation.py +241 -0
- package/.agent/scripts/linter-manager.sh +599 -0
- package/.agent/scripts/linters-local.sh +434 -0
- package/.agent/scripts/list-keys-helper.sh +488 -0
- package/.agent/scripts/local-browser-automation.py +339 -0
- package/.agent/scripts/localhost-helper.sh +744 -0
- package/.agent/scripts/loop-common.sh +806 -0
- package/.agent/scripts/mainwp-helper.sh +728 -0
- package/.agent/scripts/markdown-formatter.sh +338 -0
- package/.agent/scripts/markdown-lint-fix.sh +311 -0
- package/.agent/scripts/mass-fix-returns.sh +58 -0
- package/.agent/scripts/mcp-diagnose.sh +167 -0
- package/.agent/scripts/mcp-inspector-helper.sh +449 -0
- package/.agent/scripts/memory-helper.sh +650 -0
- package/.agent/scripts/monitor-code-review.sh +255 -0
- package/.agent/scripts/onboarding-helper.sh +706 -0
- package/.agent/scripts/opencode-github-setup-helper.sh +797 -0
- package/.agent/scripts/opencode-test-helper.sh +213 -0
- package/.agent/scripts/pagespeed-helper.sh +464 -0
- package/.agent/scripts/pandoc-helper.sh +362 -0
- package/.agent/scripts/postflight-check.sh +555 -0
- package/.agent/scripts/pre-commit-hook.sh +259 -0
- package/.agent/scripts/pre-edit-check.sh +169 -0
- package/.agent/scripts/qlty-cli.sh +356 -0
- package/.agent/scripts/quality-cli-manager.sh +525 -0
- package/.agent/scripts/quality-feedback-helper.sh +462 -0
- package/.agent/scripts/quality-fix.sh +263 -0
- package/.agent/scripts/quality-loop-helper.sh +1108 -0
- package/.agent/scripts/ralph-loop-helper.sh +836 -0
- package/.agent/scripts/ralph-upstream-check.sh +341 -0
- package/.agent/scripts/secretlint-helper.sh +847 -0
- package/.agent/scripts/servers-helper.sh +241 -0
- package/.agent/scripts/ses-helper.sh +619 -0
- package/.agent/scripts/session-review-helper.sh +404 -0
- package/.agent/scripts/setup-linters-wizard.sh +379 -0
- package/.agent/scripts/setup-local-api-keys.sh +330 -0
- package/.agent/scripts/setup-mcp-integrations.sh +472 -0
- package/.agent/scripts/shared-constants.sh +246 -0
- package/.agent/scripts/site-crawler-helper.sh +1487 -0
- package/.agent/scripts/snyk-helper.sh +940 -0
- package/.agent/scripts/sonarcloud-autofix.sh +193 -0
- package/.agent/scripts/sonarcloud-cli.sh +191 -0
- package/.agent/scripts/sonarscanner-cli.sh +455 -0
- package/.agent/scripts/spaceship-helper.sh +747 -0
- package/.agent/scripts/stagehand-helper.sh +321 -0
- package/.agent/scripts/stagehand-python-helper.sh +321 -0
- package/.agent/scripts/stagehand-python-setup.sh +441 -0
- package/.agent/scripts/stagehand-setup.sh +439 -0
- package/.agent/scripts/system-cleanup.sh +340 -0
- package/.agent/scripts/terminal-title-helper.sh +388 -0
- package/.agent/scripts/terminal-title-setup.sh +549 -0
- package/.agent/scripts/test-stagehand-both-integration.sh +317 -0
- package/.agent/scripts/test-stagehand-integration.sh +309 -0
- package/.agent/scripts/test-stagehand-python-integration.sh +341 -0
- package/.agent/scripts/todo-ready.sh +263 -0
- package/.agent/scripts/tool-version-check.sh +362 -0
- package/.agent/scripts/toon-helper.sh +469 -0
- package/.agent/scripts/twilio-helper.sh +917 -0
- package/.agent/scripts/updown-helper.sh +279 -0
- package/.agent/scripts/validate-mcp-integrations.sh +250 -0
- package/.agent/scripts/validate-version-consistency.sh +131 -0
- package/.agent/scripts/vaultwarden-helper.sh +597 -0
- package/.agent/scripts/vercel-cli-helper.sh +816 -0
- package/.agent/scripts/verify-mirrors.sh +169 -0
- package/.agent/scripts/version-manager.sh +831 -0
- package/.agent/scripts/webhosting-helper.sh +471 -0
- package/.agent/scripts/webhosting-verify.sh +238 -0
- package/.agent/scripts/wordpress-mcp-helper.sh +508 -0
- package/.agent/scripts/worktree-helper.sh +595 -0
- package/.agent/scripts/worktree-sessions.sh +577 -0
- package/.agent/seo/dataforseo.md +215 -0
- package/.agent/seo/domain-research.md +532 -0
- package/.agent/seo/eeat-score.md +659 -0
- package/.agent/seo/google-search-console.md +366 -0
- package/.agent/seo/gsc-sitemaps.md +282 -0
- package/.agent/seo/keyword-research.md +521 -0
- package/.agent/seo/serper.md +278 -0
- package/.agent/seo/site-crawler.md +387 -0
- package/.agent/seo.md +236 -0
- package/.agent/services/accounting/quickfile.md +159 -0
- package/.agent/services/communications/telfon.md +470 -0
- package/.agent/services/communications/twilio.md +569 -0
- package/.agent/services/crm/fluentcrm.md +449 -0
- package/.agent/services/email/ses.md +399 -0
- package/.agent/services/hosting/101domains.md +378 -0
- package/.agent/services/hosting/closte.md +177 -0
- package/.agent/services/hosting/cloudflare.md +251 -0
- package/.agent/services/hosting/cloudron.md +478 -0
- package/.agent/services/hosting/dns-providers.md +335 -0
- package/.agent/services/hosting/domain-purchasing.md +344 -0
- package/.agent/services/hosting/hetzner.md +327 -0
- package/.agent/services/hosting/hostinger.md +287 -0
- package/.agent/services/hosting/localhost.md +419 -0
- package/.agent/services/hosting/spaceship.md +353 -0
- package/.agent/services/hosting/webhosting.md +330 -0
- package/.agent/social-media.md +69 -0
- package/.agent/templates/plans-template.md +114 -0
- package/.agent/templates/prd-template.md +129 -0
- package/.agent/templates/tasks-template.md +108 -0
- package/.agent/templates/todo-template.md +89 -0
- package/.agent/tools/ai-assistants/agno.md +471 -0
- package/.agent/tools/ai-assistants/capsolver.md +326 -0
- package/.agent/tools/ai-assistants/configuration.md +221 -0
- package/.agent/tools/ai-assistants/overview.md +209 -0
- package/.agent/tools/ai-assistants/status.md +171 -0
- package/.agent/tools/ai-assistants/windsurf.md +193 -0
- package/.agent/tools/ai-orchestration/autogen.md +406 -0
- package/.agent/tools/ai-orchestration/crewai.md +445 -0
- package/.agent/tools/ai-orchestration/langflow.md +405 -0
- package/.agent/tools/ai-orchestration/openprose.md +487 -0
- package/.agent/tools/ai-orchestration/overview.md +362 -0
- package/.agent/tools/ai-orchestration/packaging.md +647 -0
- package/.agent/tools/browser/agent-browser.md +464 -0
- package/.agent/tools/browser/browser-automation.md +400 -0
- package/.agent/tools/browser/chrome-devtools.md +282 -0
- package/.agent/tools/browser/crawl4ai-integration.md +422 -0
- package/.agent/tools/browser/crawl4ai-resources.md +277 -0
- package/.agent/tools/browser/crawl4ai-usage.md +416 -0
- package/.agent/tools/browser/crawl4ai.md +585 -0
- package/.agent/tools/browser/dev-browser.md +341 -0
- package/.agent/tools/browser/pagespeed.md +260 -0
- package/.agent/tools/browser/playwright.md +266 -0
- package/.agent/tools/browser/playwriter.md +310 -0
- package/.agent/tools/browser/stagehand-examples.md +456 -0
- package/.agent/tools/browser/stagehand-python.md +483 -0
- package/.agent/tools/browser/stagehand.md +421 -0
- package/.agent/tools/build-agent/agent-review.md +224 -0
- package/.agent/tools/build-agent/build-agent.md +784 -0
- package/.agent/tools/build-mcp/aidevops-plugin.md +476 -0
- package/.agent/tools/build-mcp/api-wrapper.md +445 -0
- package/.agent/tools/build-mcp/build-mcp.md +240 -0
- package/.agent/tools/build-mcp/deployment.md +401 -0
- package/.agent/tools/build-mcp/server-patterns.md +632 -0
- package/.agent/tools/build-mcp/transports.md +366 -0
- package/.agent/tools/code-review/auditing.md +383 -0
- package/.agent/tools/code-review/automation.md +219 -0
- package/.agent/tools/code-review/best-practices.md +203 -0
- package/.agent/tools/code-review/codacy.md +151 -0
- package/.agent/tools/code-review/code-simplifier.md +174 -0
- package/.agent/tools/code-review/code-standards.md +309 -0
- package/.agent/tools/code-review/coderabbit.md +101 -0
- package/.agent/tools/code-review/management.md +155 -0
- package/.agent/tools/code-review/qlty.md +248 -0
- package/.agent/tools/code-review/secretlint.md +565 -0
- package/.agent/tools/code-review/setup.md +250 -0
- package/.agent/tools/code-review/snyk.md +563 -0
- package/.agent/tools/code-review/tools.md +230 -0
- package/.agent/tools/content/summarize.md +353 -0
- package/.agent/tools/context/augment-context-engine.md +468 -0
- package/.agent/tools/context/context-builder-agent.md +76 -0
- package/.agent/tools/context/context-builder.md +375 -0
- package/.agent/tools/context/context7.md +371 -0
- package/.agent/tools/context/dspy.md +302 -0
- package/.agent/tools/context/dspyground.md +374 -0
- package/.agent/tools/context/llm-tldr.md +219 -0
- package/.agent/tools/context/osgrep.md +488 -0
- package/.agent/tools/context/prompt-optimization.md +338 -0
- package/.agent/tools/context/toon.md +292 -0
- package/.agent/tools/conversion/pandoc.md +304 -0
- package/.agent/tools/credentials/api-key-management.md +154 -0
- package/.agent/tools/credentials/api-key-setup.md +224 -0
- package/.agent/tools/credentials/environment-variables.md +180 -0
- package/.agent/tools/credentials/vaultwarden.md +382 -0
- package/.agent/tools/data-extraction/outscraper.md +974 -0
- package/.agent/tools/deployment/coolify-cli.md +388 -0
- package/.agent/tools/deployment/coolify-setup.md +353 -0
- package/.agent/tools/deployment/coolify.md +345 -0
- package/.agent/tools/deployment/vercel.md +390 -0
- package/.agent/tools/git/authentication.md +132 -0
- package/.agent/tools/git/gitea-cli.md +193 -0
- package/.agent/tools/git/github-actions.md +207 -0
- package/.agent/tools/git/github-cli.md +223 -0
- package/.agent/tools/git/gitlab-cli.md +190 -0
- package/.agent/tools/git/opencode-github-security.md +350 -0
- package/.agent/tools/git/opencode-github.md +328 -0
- package/.agent/tools/git/opencode-gitlab.md +252 -0
- package/.agent/tools/git/security.md +196 -0
- package/.agent/tools/git.md +207 -0
- package/.agent/tools/opencode/oh-my-opencode.md +375 -0
- package/.agent/tools/opencode/opencode-anthropic-auth.md +446 -0
- package/.agent/tools/opencode/opencode.md +651 -0
- package/.agent/tools/social-media/bird.md +437 -0
- package/.agent/tools/task-management/beads.md +336 -0
- package/.agent/tools/terminal/terminal-title.md +251 -0
- package/.agent/tools/ui/shadcn.md +196 -0
- package/.agent/tools/ui/ui-skills.md +115 -0
- package/.agent/tools/wordpress/localwp.md +311 -0
- package/.agent/tools/wordpress/mainwp.md +391 -0
- package/.agent/tools/wordpress/scf.md +527 -0
- package/.agent/tools/wordpress/wp-admin.md +729 -0
- package/.agent/tools/wordpress/wp-dev.md +940 -0
- package/.agent/tools/wordpress/wp-preferred.md +398 -0
- package/.agent/tools/wordpress.md +95 -0
- package/.agent/workflows/branch/bugfix.md +63 -0
- package/.agent/workflows/branch/chore.md +95 -0
- package/.agent/workflows/branch/experiment.md +115 -0
- package/.agent/workflows/branch/feature.md +59 -0
- package/.agent/workflows/branch/hotfix.md +98 -0
- package/.agent/workflows/branch/refactor.md +92 -0
- package/.agent/workflows/branch/release.md +96 -0
- package/.agent/workflows/branch.md +347 -0
- package/.agent/workflows/bug-fixing.md +267 -0
- package/.agent/workflows/changelog.md +129 -0
- package/.agent/workflows/code-audit-remote.md +279 -0
- package/.agent/workflows/conversation-starter.md +69 -0
- package/.agent/workflows/error-feedback.md +578 -0
- package/.agent/workflows/feature-development.md +355 -0
- package/.agent/workflows/git-workflow.md +702 -0
- package/.agent/workflows/multi-repo-workspace.md +268 -0
- package/.agent/workflows/plans.md +709 -0
- package/.agent/workflows/postflight.md +604 -0
- package/.agent/workflows/pr.md +571 -0
- package/.agent/workflows/preflight.md +278 -0
- package/.agent/workflows/ralph-loop.md +773 -0
- package/.agent/workflows/release.md +498 -0
- package/.agent/workflows/session-manager.md +254 -0
- package/.agent/workflows/session-review.md +311 -0
- package/.agent/workflows/sql-migrations.md +631 -0
- package/.agent/workflows/version-bump.md +283 -0
- package/.agent/workflows/wiki-update.md +333 -0
- package/.agent/workflows/worktree.md +477 -0
- package/LICENSE +21 -0
- package/README.md +1446 -0
- package/VERSION +1 -0
- package/aidevops.sh +1746 -0
- package/bin/aidevops +21 -0
- package/package.json +75 -0
- package/scripts/npm-postinstall.js +60 -0
- package/setup.sh +2366 -0
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# shellcheck disable=SC2034,SC2155,SC2317,SC2329,SC2016,SC2181,SC1091,SC2154,SC2015,SC2086,SC2129,SC2030,SC2031,SC2119,SC2120,SC2001,SC2162,SC2088,SC2089,SC2090,SC2029,SC2006,SC2153
|
|
3
|
+
|
|
4
|
+
# Quality CLI Manager Script
|
|
5
|
+
# Unified management for CodeRabbit, Codacy, SonarScanner, and Snyk CLIs
|
|
6
|
+
#
|
|
7
|
+
# Usage: ./quality-cli-manager.sh [command] [cli] [options]
|
|
8
|
+
# Commands:
|
|
9
|
+
# install - Install specified CLI or all CLIs
|
|
10
|
+
# init - Initialize configuration for specified CLI or all CLIs
|
|
11
|
+
# analyze - Run analysis with specified CLI or all CLIs
|
|
12
|
+
# status - Check status of specified CLI or all CLIs
|
|
13
|
+
# help - Show this help message
|
|
14
|
+
#
|
|
15
|
+
# CLIs:
|
|
16
|
+
# coderabbit - CodeRabbit CLI for AI-powered code review
|
|
17
|
+
# codacy - Codacy CLI v2 for comprehensive code analysis
|
|
18
|
+
# sonar - SonarScanner CLI for SonarQube Cloud analysis
|
|
19
|
+
# snyk - Snyk CLI for security vulnerability scanning
|
|
20
|
+
# all - All quality CLIs (default)
|
|
21
|
+
#
|
|
22
|
+
# Author: AI DevOps Framework
|
|
23
|
+
# Version: 1.2.0
|
|
24
|
+
# License: MIT
|
|
25
|
+
|
|
26
|
+
# Colors for output
|
|
27
|
+
readonly GREEN='\033[0;32m'
|
|
28
|
+
readonly BLUE='\033[0;34m'
|
|
29
|
+
readonly YELLOW='\033[1;33m'
|
|
30
|
+
readonly RED='\033[0;31m'
|
|
31
|
+
readonly PURPLE='\033[0;35m'
|
|
32
|
+
readonly NC='\033[0m' # No Color
|
|
33
|
+
|
|
34
|
+
# Common constants
|
|
35
|
+
readonly ERROR_UNKNOWN_COMMAND="Unknown command:"
|
|
36
|
+
# CLI Scripts
|
|
37
|
+
readonly CODERABBIT_SCRIPT=".agent/scripts/coderabbit-cli.sh"
|
|
38
|
+
readonly CODACY_SCRIPT=".agent/scripts/codacy-cli.sh"
|
|
39
|
+
readonly SONAR_SCRIPT=".agent/scripts/sonarscanner-cli.sh"
|
|
40
|
+
readonly SNYK_SCRIPT=".agent/scripts/snyk-helper.sh"
|
|
41
|
+
|
|
42
|
+
# CLI Names
|
|
43
|
+
readonly CLI_CODERABBIT="coderabbit"
|
|
44
|
+
readonly CLI_SNYK="snyk"
|
|
45
|
+
|
|
46
|
+
# Print functions
|
|
47
|
+
print_success() {
|
|
48
|
+
local message="$1"
|
|
49
|
+
echo -e "${GREEN}✅ $message${NC}"
|
|
50
|
+
return 0
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
print_info() {
|
|
54
|
+
local message="$1"
|
|
55
|
+
echo -e "${BLUE}ℹ️ $message${NC}"
|
|
56
|
+
return 0
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
print_warning() {
|
|
60
|
+
local message="$1"
|
|
61
|
+
echo -e "${YELLOW}⚠️ $message${NC}"
|
|
62
|
+
return 0
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
print_error() {
|
|
66
|
+
local message="$1"
|
|
67
|
+
echo -e "${RED}❌ $message${NC}" >&2
|
|
68
|
+
return 0
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
print_header() {
|
|
72
|
+
local message="$1"
|
|
73
|
+
echo -e "${PURPLE}🔧 $message${NC}"
|
|
74
|
+
return 0
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
# Execute CLI command
|
|
78
|
+
execute_cli_command() {
|
|
79
|
+
local cli="$1"
|
|
80
|
+
local command="$2"
|
|
81
|
+
shift 2
|
|
82
|
+
local args="$*"
|
|
83
|
+
|
|
84
|
+
local script=""
|
|
85
|
+
local cli_name=""
|
|
86
|
+
|
|
87
|
+
case "$cli" in
|
|
88
|
+
"$CLI_CODERABBIT")
|
|
89
|
+
script="$CODERABBIT_SCRIPT"
|
|
90
|
+
cli_name="CodeRabbit CLI"
|
|
91
|
+
;;
|
|
92
|
+
"codacy")
|
|
93
|
+
script="$CODACY_SCRIPT"
|
|
94
|
+
cli_name="Codacy CLI"
|
|
95
|
+
;;
|
|
96
|
+
"sonar")
|
|
97
|
+
script="$SONAR_SCRIPT"
|
|
98
|
+
cli_name="SonarScanner CLI"
|
|
99
|
+
;;
|
|
100
|
+
"$CLI_SNYK")
|
|
101
|
+
script="$SNYK_SCRIPT"
|
|
102
|
+
cli_name="Snyk CLI"
|
|
103
|
+
;;
|
|
104
|
+
*)
|
|
105
|
+
print_error "Unknown CLI: $cli"
|
|
106
|
+
return 1
|
|
107
|
+
;;
|
|
108
|
+
esac
|
|
109
|
+
|
|
110
|
+
if [[ ! -f "$script" ]]; then
|
|
111
|
+
print_error "$cli_name script not found: $script"
|
|
112
|
+
return 1
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
print_info "Executing: $cli_name $command $args"
|
|
116
|
+
bash "$script" "$command" "$args"
|
|
117
|
+
return $?
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
# Install CLIs
|
|
121
|
+
install_clis() {
|
|
122
|
+
local target_cli="$1"
|
|
123
|
+
|
|
124
|
+
print_header "Installing Quality CLIs"
|
|
125
|
+
|
|
126
|
+
local success_count=0
|
|
127
|
+
local total_count=0
|
|
128
|
+
|
|
129
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "$CLI_CODERABBIT" ]]; then
|
|
130
|
+
print_info "Installing CodeRabbit CLI..."
|
|
131
|
+
if execute_cli_command "$CLI_CODERABBIT" "install"; then
|
|
132
|
+
((success_count++))
|
|
133
|
+
fi
|
|
134
|
+
((total_count++))
|
|
135
|
+
echo ""
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "codacy" ]]; then
|
|
139
|
+
print_info "Installing Codacy CLI..."
|
|
140
|
+
if execute_cli_command "codacy" "install"; then
|
|
141
|
+
((success_count++))
|
|
142
|
+
fi
|
|
143
|
+
((total_count++))
|
|
144
|
+
echo ""
|
|
145
|
+
fi
|
|
146
|
+
|
|
147
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "sonar" ]]; then
|
|
148
|
+
print_info "Installing SonarScanner CLI..."
|
|
149
|
+
if execute_cli_command "sonar" "install"; then
|
|
150
|
+
((success_count++))
|
|
151
|
+
fi
|
|
152
|
+
((total_count++))
|
|
153
|
+
echo ""
|
|
154
|
+
fi
|
|
155
|
+
|
|
156
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "qlty" ]]; then
|
|
157
|
+
print_info "Installing Qlty CLI..."
|
|
158
|
+
if execute_cli_command "qlty" "install"; then
|
|
159
|
+
((success_count++))
|
|
160
|
+
fi
|
|
161
|
+
((total_count++))
|
|
162
|
+
echo ""
|
|
163
|
+
fi
|
|
164
|
+
|
|
165
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "$CLI_SNYK" ]]; then
|
|
166
|
+
print_info "Installing Snyk CLI..."
|
|
167
|
+
if execute_cli_command "$CLI_SNYK" "install"; then
|
|
168
|
+
((success_count++))
|
|
169
|
+
fi
|
|
170
|
+
((total_count++))
|
|
171
|
+
echo ""
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "linters" ]]; then
|
|
175
|
+
print_info "Installing CodeFactor-inspired linters..."
|
|
176
|
+
if bash "$(dirname "$0")/linter-manager.sh" install-detected; then
|
|
177
|
+
((success_count++))
|
|
178
|
+
fi
|
|
179
|
+
((total_count++))
|
|
180
|
+
echo ""
|
|
181
|
+
fi
|
|
182
|
+
|
|
183
|
+
print_info "Installation Summary: $success_count/$total_count CLIs installed successfully"
|
|
184
|
+
|
|
185
|
+
if [[ $success_count -eq $total_count ]]; then
|
|
186
|
+
print_success "All requested CLIs installed successfully"
|
|
187
|
+
return 0
|
|
188
|
+
else
|
|
189
|
+
print_warning "Some CLI installations failed"
|
|
190
|
+
return 1
|
|
191
|
+
fi
|
|
192
|
+
return 0
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
# Initialize CLI configurations
|
|
196
|
+
init_clis() {
|
|
197
|
+
local target_cli="$1"
|
|
198
|
+
|
|
199
|
+
print_header "Initializing Quality CLI Configurations"
|
|
200
|
+
|
|
201
|
+
local success_count=0
|
|
202
|
+
local total_count=0
|
|
203
|
+
|
|
204
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "$CLI_CODERABBIT" ]]; then
|
|
205
|
+
print_info "Initializing CodeRabbit CLI..."
|
|
206
|
+
if execute_cli_command "$CLI_CODERABBIT" "setup"; then
|
|
207
|
+
((success_count++))
|
|
208
|
+
fi
|
|
209
|
+
((total_count++))
|
|
210
|
+
echo ""
|
|
211
|
+
fi
|
|
212
|
+
|
|
213
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "codacy" ]]; then
|
|
214
|
+
print_info "Initializing Codacy CLI..."
|
|
215
|
+
if execute_cli_command "codacy" "init"; then
|
|
216
|
+
((success_count++))
|
|
217
|
+
fi
|
|
218
|
+
((total_count++))
|
|
219
|
+
echo ""
|
|
220
|
+
fi
|
|
221
|
+
|
|
222
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "sonar" ]]; then
|
|
223
|
+
print_info "Initializing SonarScanner CLI..."
|
|
224
|
+
if execute_cli_command "sonar" "init"; then
|
|
225
|
+
((success_count++))
|
|
226
|
+
fi
|
|
227
|
+
((total_count++))
|
|
228
|
+
echo ""
|
|
229
|
+
fi
|
|
230
|
+
|
|
231
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "qlty" ]]; then
|
|
232
|
+
print_info "Initializing Qlty CLI..."
|
|
233
|
+
if execute_cli_command "qlty" "init"; then
|
|
234
|
+
((success_count++))
|
|
235
|
+
fi
|
|
236
|
+
((total_count++))
|
|
237
|
+
echo ""
|
|
238
|
+
fi
|
|
239
|
+
|
|
240
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "$CLI_SNYK" ]]; then
|
|
241
|
+
print_info "Initializing Snyk CLI..."
|
|
242
|
+
if execute_cli_command "$CLI_SNYK" "auth"; then
|
|
243
|
+
((success_count++))
|
|
244
|
+
fi
|
|
245
|
+
((total_count++))
|
|
246
|
+
echo ""
|
|
247
|
+
fi
|
|
248
|
+
|
|
249
|
+
print_info "Initialization Summary: $success_count/$total_count CLIs initialized successfully"
|
|
250
|
+
|
|
251
|
+
if [[ $success_count -eq $total_count ]]; then
|
|
252
|
+
print_success "All requested CLIs initialized successfully"
|
|
253
|
+
return 0
|
|
254
|
+
else
|
|
255
|
+
print_warning "Some CLI initializations failed"
|
|
256
|
+
return 1
|
|
257
|
+
fi
|
|
258
|
+
return 0
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
# Run analysis with CLIs
|
|
262
|
+
analyze_with_clis() {
|
|
263
|
+
local target_cli="$1"
|
|
264
|
+
shift
|
|
265
|
+
local args="$*"
|
|
266
|
+
|
|
267
|
+
print_header "Running Quality Analysis"
|
|
268
|
+
|
|
269
|
+
local success_count=0
|
|
270
|
+
local total_count=0
|
|
271
|
+
|
|
272
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "$CLI_CODERABBIT" ]]; then
|
|
273
|
+
print_info "Running CodeRabbit analysis..."
|
|
274
|
+
if execute_cli_command "$CLI_CODERABBIT" "review" "$args"; then
|
|
275
|
+
((success_count++))
|
|
276
|
+
fi
|
|
277
|
+
((total_count++))
|
|
278
|
+
echo ""
|
|
279
|
+
fi
|
|
280
|
+
|
|
281
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "codacy" ]]; then
|
|
282
|
+
print_info "Running Codacy analysis..."
|
|
283
|
+
if execute_cli_command "codacy" "analyze" "$args"; then
|
|
284
|
+
((success_count++))
|
|
285
|
+
fi
|
|
286
|
+
((total_count++))
|
|
287
|
+
echo ""
|
|
288
|
+
fi
|
|
289
|
+
|
|
290
|
+
# Add auto-fix option for Codacy
|
|
291
|
+
if [[ "$target_cli" == "codacy-fix" ]]; then
|
|
292
|
+
print_info "Running Codacy analysis with auto-fix..."
|
|
293
|
+
if execute_cli_command "codacy" "analyze" "--fix"; then
|
|
294
|
+
((success_count++))
|
|
295
|
+
fi
|
|
296
|
+
((total_count++))
|
|
297
|
+
echo ""
|
|
298
|
+
fi
|
|
299
|
+
|
|
300
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "sonar" ]]; then
|
|
301
|
+
print_info "Running SonarQube analysis..."
|
|
302
|
+
if execute_cli_command "sonar" "analyze" "$args"; then
|
|
303
|
+
((success_count++))
|
|
304
|
+
fi
|
|
305
|
+
((total_count++))
|
|
306
|
+
echo ""
|
|
307
|
+
fi
|
|
308
|
+
|
|
309
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "qlty" ]]; then
|
|
310
|
+
print_info "Running Qlty analysis..."
|
|
311
|
+
# Add organization parameter if provided
|
|
312
|
+
local qlty_args="$args"
|
|
313
|
+
if [[ -n "$QLTY_ORG" ]]; then
|
|
314
|
+
qlty_args="$args $QLTY_ORG"
|
|
315
|
+
fi
|
|
316
|
+
if execute_cli_command "qlty" "check" "$qlty_args"; then
|
|
317
|
+
((success_count++))
|
|
318
|
+
fi
|
|
319
|
+
((total_count++))
|
|
320
|
+
echo ""
|
|
321
|
+
fi
|
|
322
|
+
|
|
323
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "$CLI_SNYK" ]]; then
|
|
324
|
+
print_info "Running Snyk security analysis..."
|
|
325
|
+
if execute_cli_command "$CLI_SNYK" "full" "$args"; then
|
|
326
|
+
((success_count++))
|
|
327
|
+
fi
|
|
328
|
+
((total_count++))
|
|
329
|
+
echo ""
|
|
330
|
+
fi
|
|
331
|
+
|
|
332
|
+
# Add Snyk-specific scan options
|
|
333
|
+
if [[ "$target_cli" == "snyk-sca" ]]; then
|
|
334
|
+
print_info "Running Snyk SCA (dependency) scan..."
|
|
335
|
+
if execute_cli_command "$CLI_SNYK" "test" "$args"; then
|
|
336
|
+
((success_count++))
|
|
337
|
+
fi
|
|
338
|
+
((total_count++))
|
|
339
|
+
echo ""
|
|
340
|
+
fi
|
|
341
|
+
|
|
342
|
+
if [[ "$target_cli" == "snyk-code" ]]; then
|
|
343
|
+
print_info "Running Snyk Code (SAST) scan..."
|
|
344
|
+
if execute_cli_command "$CLI_SNYK" "code" "$args"; then
|
|
345
|
+
((success_count++))
|
|
346
|
+
fi
|
|
347
|
+
((total_count++))
|
|
348
|
+
echo ""
|
|
349
|
+
fi
|
|
350
|
+
|
|
351
|
+
if [[ "$target_cli" == "snyk-iac" ]]; then
|
|
352
|
+
print_info "Running Snyk IaC scan..."
|
|
353
|
+
if execute_cli_command "$CLI_SNYK" "iac" "$args"; then
|
|
354
|
+
((success_count++))
|
|
355
|
+
fi
|
|
356
|
+
((total_count++))
|
|
357
|
+
echo ""
|
|
358
|
+
fi
|
|
359
|
+
|
|
360
|
+
print_info "Analysis Summary: $success_count/$total_count analyses completed successfully"
|
|
361
|
+
|
|
362
|
+
if [[ $success_count -eq $total_count ]]; then
|
|
363
|
+
print_success "All requested analyses completed successfully"
|
|
364
|
+
return 0
|
|
365
|
+
else
|
|
366
|
+
print_warning "Some analyses failed"
|
|
367
|
+
return 1
|
|
368
|
+
fi
|
|
369
|
+
return 0
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
# Show CLI status
|
|
373
|
+
show_cli_status() {
|
|
374
|
+
local target_cli="$1"
|
|
375
|
+
|
|
376
|
+
print_header "Quality CLI Status Report"
|
|
377
|
+
|
|
378
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "$CLI_CODERABBIT" ]]; then
|
|
379
|
+
print_info "CodeRabbit CLI Status:"
|
|
380
|
+
execute_cli_command "$CLI_CODERABBIT" "status"
|
|
381
|
+
echo ""
|
|
382
|
+
fi
|
|
383
|
+
|
|
384
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "codacy" ]]; then
|
|
385
|
+
print_info "Codacy CLI Status:"
|
|
386
|
+
execute_cli_command "codacy" "status"
|
|
387
|
+
echo ""
|
|
388
|
+
fi
|
|
389
|
+
|
|
390
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "sonar" ]]; then
|
|
391
|
+
print_info "SonarScanner CLI Status:"
|
|
392
|
+
execute_cli_command "sonar" "status"
|
|
393
|
+
echo ""
|
|
394
|
+
fi
|
|
395
|
+
|
|
396
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "qlty" ]]; then
|
|
397
|
+
print_info "Qlty CLI Status:"
|
|
398
|
+
if command -v qlty &> /dev/null; then
|
|
399
|
+
echo "✅ Qlty CLI installed: $(qlty --version 2>/dev/null || echo 'version unknown')"
|
|
400
|
+
if [[ -f ".qlty/qlty.toml" ]]; then
|
|
401
|
+
echo "✅ Qlty initialized in repository"
|
|
402
|
+
else
|
|
403
|
+
echo "⚠️ Qlty not initialized (run 'qlty init')"
|
|
404
|
+
fi
|
|
405
|
+
else
|
|
406
|
+
echo "❌ Qlty CLI not installed"
|
|
407
|
+
fi
|
|
408
|
+
echo ""
|
|
409
|
+
fi
|
|
410
|
+
|
|
411
|
+
if [[ "$target_cli" == "all" || "$target_cli" == "$CLI_SNYK" ]]; then
|
|
412
|
+
print_info "Snyk CLI Status:"
|
|
413
|
+
if command -v snyk &> /dev/null; then
|
|
414
|
+
echo "✅ Snyk CLI installed: $(snyk --version 2>/dev/null || echo 'version unknown')"
|
|
415
|
+
if [[ -n "${SNYK_TOKEN:-}" ]] || snyk config get api &>/dev/null 2>&1; then
|
|
416
|
+
echo "✅ Snyk authenticated"
|
|
417
|
+
else
|
|
418
|
+
echo "⚠️ Snyk not authenticated (run 'snyk auth' or set SNYK_TOKEN)"
|
|
419
|
+
fi
|
|
420
|
+
else
|
|
421
|
+
echo "❌ Snyk CLI not installed"
|
|
422
|
+
fi
|
|
423
|
+
echo ""
|
|
424
|
+
fi
|
|
425
|
+
|
|
426
|
+
return 0
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
# Show help message
|
|
430
|
+
show_help() {
|
|
431
|
+
print_header "Quality CLI Manager Help"
|
|
432
|
+
echo ""
|
|
433
|
+
echo "Usage: $0 [command] [cli] [options]"
|
|
434
|
+
echo ""
|
|
435
|
+
echo "Commands:"
|
|
436
|
+
echo " install [cli] - Install specified CLI or all CLIs"
|
|
437
|
+
echo " init [cli] - Initialize configuration for specified CLI or all CLIs"
|
|
438
|
+
echo " analyze [cli] [opts] - Run analysis with specified CLI or all CLIs"
|
|
439
|
+
echo " status [cli] - Check status of specified CLI or all CLIs"
|
|
440
|
+
echo " help - Show this help message"
|
|
441
|
+
echo ""
|
|
442
|
+
echo "CLIs:"
|
|
443
|
+
echo " coderabbit - CodeRabbit CLI for AI-powered code review"
|
|
444
|
+
echo " codacy - Codacy CLI v2 for comprehensive code analysis"
|
|
445
|
+
echo " codacy-fix - Codacy CLI with auto-fix (applies fixes when available)"
|
|
446
|
+
echo " sonar - SonarScanner CLI for SonarQube Cloud analysis"
|
|
447
|
+
echo " snyk - Snyk CLI for security vulnerability scanning"
|
|
448
|
+
echo " snyk-sca - Snyk dependency vulnerability scan only"
|
|
449
|
+
echo " snyk-code - Snyk source code scan (SAST) only"
|
|
450
|
+
echo " snyk-iac - Snyk Infrastructure as Code scan only"
|
|
451
|
+
echo " qlty - Qlty CLI for universal linting and auto-formatting"
|
|
452
|
+
echo " linters - Linter Manager for CodeFactor-inspired multi-language linters"
|
|
453
|
+
echo " all - All quality CLIs (default)"
|
|
454
|
+
echo ""
|
|
455
|
+
echo "Examples:"
|
|
456
|
+
echo " $0 install all"
|
|
457
|
+
echo " $0 init codacy"
|
|
458
|
+
echo " $0 analyze coderabbit"
|
|
459
|
+
echo " $0 analyze codacy-fix # Auto-fix issues when possible"
|
|
460
|
+
echo " $0 analyze qlty # Universal linting and formatting"
|
|
461
|
+
echo " $0 analyze snyk # Full Snyk security scan (SCA + SAST + IaC)"
|
|
462
|
+
echo " $0 analyze snyk-code # Snyk source code scan only"
|
|
463
|
+
echo " $0 install linters # Install CodeFactor-inspired linters"
|
|
464
|
+
echo " $0 analyze all"
|
|
465
|
+
echo " $0 status sonar"
|
|
466
|
+
echo " $0 status snyk"
|
|
467
|
+
echo ""
|
|
468
|
+
echo "Environment Variables:"
|
|
469
|
+
echo " CodeRabbit:"
|
|
470
|
+
echo " CODERABBIT_API_KEY - CodeRabbit API key"
|
|
471
|
+
echo ""
|
|
472
|
+
echo " Codacy:"
|
|
473
|
+
echo " CODACY_API_TOKEN - Codacy API token"
|
|
474
|
+
echo " CODACY_PROJECT_TOKEN - Codacy project token"
|
|
475
|
+
echo " CODACY_PROVIDER - Provider (gh, gl, bb)"
|
|
476
|
+
echo " CODACY_ORGANIZATION - Organization name"
|
|
477
|
+
echo " CODACY_REPOSITORY - Repository name"
|
|
478
|
+
echo ""
|
|
479
|
+
echo " SonarQube:"
|
|
480
|
+
echo " SONAR_TOKEN - SonarCloud authentication token"
|
|
481
|
+
echo " SONAR_ORGANIZATION - SonarCloud organization key"
|
|
482
|
+
echo " SONAR_PROJECT_KEY - Project key"
|
|
483
|
+
echo ""
|
|
484
|
+
echo " Snyk:"
|
|
485
|
+
echo " SNYK_TOKEN - Snyk API token"
|
|
486
|
+
echo " SNYK_ORG - Snyk organization ID"
|
|
487
|
+
echo ""
|
|
488
|
+
echo "This script provides unified management for all quality analysis CLIs"
|
|
489
|
+
echo "in the AI DevOps Framework."
|
|
490
|
+
return 0
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
# Main function
|
|
494
|
+
main() {
|
|
495
|
+
local command="${1:-help}"
|
|
496
|
+
local cli="${2:-all}"
|
|
497
|
+
shift 2 2>/dev/null || shift $# # Remove processed arguments
|
|
498
|
+
|
|
499
|
+
case "$command" in
|
|
500
|
+
"install")
|
|
501
|
+
install_clis "$cli"
|
|
502
|
+
;;
|
|
503
|
+
"init")
|
|
504
|
+
init_clis "$cli"
|
|
505
|
+
;;
|
|
506
|
+
"analyze")
|
|
507
|
+
analyze_with_clis "$cli" "$@"
|
|
508
|
+
;;
|
|
509
|
+
"status")
|
|
510
|
+
show_cli_status "$cli"
|
|
511
|
+
;;
|
|
512
|
+
"help"|"--help"|"-h")
|
|
513
|
+
show_help
|
|
514
|
+
;;
|
|
515
|
+
*)
|
|
516
|
+
print_error "$ERROR_UNKNOWN_COMMAND $command"
|
|
517
|
+
show_help
|
|
518
|
+
return 1
|
|
519
|
+
;;
|
|
520
|
+
esac
|
|
521
|
+
return 0
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
# Execute main function with all arguments
|
|
525
|
+
main "$@"
|