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.
Files changed (329) hide show
  1. package/.agent/AGENTS.md +614 -0
  2. package/.agent/accounts.md +65 -0
  3. package/.agent/aidevops/add-new-mcp-to-aidevops.md +456 -0
  4. package/.agent/aidevops/api-integrations.md +335 -0
  5. package/.agent/aidevops/architecture.md +510 -0
  6. package/.agent/aidevops/configs.md +274 -0
  7. package/.agent/aidevops/docs.md +244 -0
  8. package/.agent/aidevops/extension.md +311 -0
  9. package/.agent/aidevops/mcp-integrations.md +340 -0
  10. package/.agent/aidevops/mcp-troubleshooting.md +162 -0
  11. package/.agent/aidevops/memory-patterns.md +172 -0
  12. package/.agent/aidevops/providers.md +217 -0
  13. package/.agent/aidevops/recommendations.md +321 -0
  14. package/.agent/aidevops/requirements.md +301 -0
  15. package/.agent/aidevops/resources.md +214 -0
  16. package/.agent/aidevops/security-requirements.md +174 -0
  17. package/.agent/aidevops/security.md +350 -0
  18. package/.agent/aidevops/service-links.md +400 -0
  19. package/.agent/aidevops/services.md +357 -0
  20. package/.agent/aidevops/setup.md +153 -0
  21. package/.agent/aidevops/troubleshooting.md +389 -0
  22. package/.agent/aidevops.md +124 -0
  23. package/.agent/build-plus.md +244 -0
  24. package/.agent/content/guidelines.md +109 -0
  25. package/.agent/content.md +87 -0
  26. package/.agent/health.md +59 -0
  27. package/.agent/legal.md +59 -0
  28. package/.agent/loop-state/full-loop.local.md +16 -0
  29. package/.agent/loop-state/ralph-loop.local.md +10 -0
  30. package/.agent/marketing.md +440 -0
  31. package/.agent/memory/README.md +260 -0
  32. package/.agent/onboarding.md +796 -0
  33. package/.agent/plan-plus.md +245 -0
  34. package/.agent/research.md +100 -0
  35. package/.agent/sales.md +333 -0
  36. package/.agent/scripts/101domains-helper.sh +701 -0
  37. package/.agent/scripts/add-missing-returns.sh +140 -0
  38. package/.agent/scripts/agent-browser-helper.sh +311 -0
  39. package/.agent/scripts/agno-setup.sh +712 -0
  40. package/.agent/scripts/ahrefs-mcp-wrapper.js +168 -0
  41. package/.agent/scripts/aidevops-update-check.sh +71 -0
  42. package/.agent/scripts/ampcode-cli.sh +522 -0
  43. package/.agent/scripts/auto-version-bump.sh +156 -0
  44. package/.agent/scripts/autogen-helper.sh +512 -0
  45. package/.agent/scripts/beads-sync-helper.sh +596 -0
  46. package/.agent/scripts/closte-helper.sh +5 -0
  47. package/.agent/scripts/cloudron-helper.sh +321 -0
  48. package/.agent/scripts/codacy-cli-chunked.sh +581 -0
  49. package/.agent/scripts/codacy-cli.sh +442 -0
  50. package/.agent/scripts/code-audit-helper.sh +5 -0
  51. package/.agent/scripts/coderabbit-cli.sh +417 -0
  52. package/.agent/scripts/coderabbit-pro-analysis.sh +238 -0
  53. package/.agent/scripts/commands/code-simplifier.md +86 -0
  54. package/.agent/scripts/commands/full-loop.md +246 -0
  55. package/.agent/scripts/commands/postflight-loop.md +103 -0
  56. package/.agent/scripts/commands/recall.md +182 -0
  57. package/.agent/scripts/commands/remember.md +132 -0
  58. package/.agent/scripts/commands/save-todo.md +175 -0
  59. package/.agent/scripts/commands/session-review.md +154 -0
  60. package/.agent/scripts/comprehensive-quality-fix.sh +106 -0
  61. package/.agent/scripts/context-builder-helper.sh +522 -0
  62. package/.agent/scripts/coolify-cli-helper.sh +674 -0
  63. package/.agent/scripts/coolify-helper.sh +380 -0
  64. package/.agent/scripts/crawl4ai-examples.sh +401 -0
  65. package/.agent/scripts/crawl4ai-helper.sh +1078 -0
  66. package/.agent/scripts/crewai-helper.sh +681 -0
  67. package/.agent/scripts/dev-browser-helper.sh +513 -0
  68. package/.agent/scripts/dns-helper.sh +396 -0
  69. package/.agent/scripts/domain-research-helper.sh +917 -0
  70. package/.agent/scripts/dspy-helper.sh +285 -0
  71. package/.agent/scripts/dspyground-helper.sh +291 -0
  72. package/.agent/scripts/eeat-score-helper.sh +1242 -0
  73. package/.agent/scripts/efficient-return-fix.sh +92 -0
  74. package/.agent/scripts/extract-opencode-prompts.sh +128 -0
  75. package/.agent/scripts/find-missing-returns.sh +113 -0
  76. package/.agent/scripts/fix-auth-headers.sh +104 -0
  77. package/.agent/scripts/fix-common-strings.sh +254 -0
  78. package/.agent/scripts/fix-content-type.sh +100 -0
  79. package/.agent/scripts/fix-error-messages.sh +130 -0
  80. package/.agent/scripts/fix-misplaced-returns.sh +74 -0
  81. package/.agent/scripts/fix-remaining-literals.sh +152 -0
  82. package/.agent/scripts/fix-return-statements.sh +41 -0
  83. package/.agent/scripts/fix-s131-default-cases.sh +249 -0
  84. package/.agent/scripts/fix-sc2155-simple.sh +102 -0
  85. package/.agent/scripts/fix-shellcheck-critical.sh +187 -0
  86. package/.agent/scripts/fix-string-literals.sh +273 -0
  87. package/.agent/scripts/full-loop-helper.sh +773 -0
  88. package/.agent/scripts/generate-opencode-agents.sh +497 -0
  89. package/.agent/scripts/generate-opencode-commands.sh +1629 -0
  90. package/.agent/scripts/generate-skills.sh +366 -0
  91. package/.agent/scripts/git-platforms-helper.sh +640 -0
  92. package/.agent/scripts/gitea-cli-helper.sh +743 -0
  93. package/.agent/scripts/github-cli-helper.sh +702 -0
  94. package/.agent/scripts/gitlab-cli-helper.sh +682 -0
  95. package/.agent/scripts/gsc-add-user-helper.sh +325 -0
  96. package/.agent/scripts/gsc-sitemap-helper.sh +678 -0
  97. package/.agent/scripts/hetzner-helper.sh +485 -0
  98. package/.agent/scripts/hostinger-helper.sh +229 -0
  99. package/.agent/scripts/keyword-research-helper.sh +1815 -0
  100. package/.agent/scripts/langflow-helper.sh +544 -0
  101. package/.agent/scripts/linkedin-automation.py +241 -0
  102. package/.agent/scripts/linter-manager.sh +599 -0
  103. package/.agent/scripts/linters-local.sh +434 -0
  104. package/.agent/scripts/list-keys-helper.sh +488 -0
  105. package/.agent/scripts/local-browser-automation.py +339 -0
  106. package/.agent/scripts/localhost-helper.sh +744 -0
  107. package/.agent/scripts/loop-common.sh +806 -0
  108. package/.agent/scripts/mainwp-helper.sh +728 -0
  109. package/.agent/scripts/markdown-formatter.sh +338 -0
  110. package/.agent/scripts/markdown-lint-fix.sh +311 -0
  111. package/.agent/scripts/mass-fix-returns.sh +58 -0
  112. package/.agent/scripts/mcp-diagnose.sh +167 -0
  113. package/.agent/scripts/mcp-inspector-helper.sh +449 -0
  114. package/.agent/scripts/memory-helper.sh +650 -0
  115. package/.agent/scripts/monitor-code-review.sh +255 -0
  116. package/.agent/scripts/onboarding-helper.sh +706 -0
  117. package/.agent/scripts/opencode-github-setup-helper.sh +797 -0
  118. package/.agent/scripts/opencode-test-helper.sh +213 -0
  119. package/.agent/scripts/pagespeed-helper.sh +464 -0
  120. package/.agent/scripts/pandoc-helper.sh +362 -0
  121. package/.agent/scripts/postflight-check.sh +555 -0
  122. package/.agent/scripts/pre-commit-hook.sh +259 -0
  123. package/.agent/scripts/pre-edit-check.sh +169 -0
  124. package/.agent/scripts/qlty-cli.sh +356 -0
  125. package/.agent/scripts/quality-cli-manager.sh +525 -0
  126. package/.agent/scripts/quality-feedback-helper.sh +462 -0
  127. package/.agent/scripts/quality-fix.sh +263 -0
  128. package/.agent/scripts/quality-loop-helper.sh +1108 -0
  129. package/.agent/scripts/ralph-loop-helper.sh +836 -0
  130. package/.agent/scripts/ralph-upstream-check.sh +341 -0
  131. package/.agent/scripts/secretlint-helper.sh +847 -0
  132. package/.agent/scripts/servers-helper.sh +241 -0
  133. package/.agent/scripts/ses-helper.sh +619 -0
  134. package/.agent/scripts/session-review-helper.sh +404 -0
  135. package/.agent/scripts/setup-linters-wizard.sh +379 -0
  136. package/.agent/scripts/setup-local-api-keys.sh +330 -0
  137. package/.agent/scripts/setup-mcp-integrations.sh +472 -0
  138. package/.agent/scripts/shared-constants.sh +246 -0
  139. package/.agent/scripts/site-crawler-helper.sh +1487 -0
  140. package/.agent/scripts/snyk-helper.sh +940 -0
  141. package/.agent/scripts/sonarcloud-autofix.sh +193 -0
  142. package/.agent/scripts/sonarcloud-cli.sh +191 -0
  143. package/.agent/scripts/sonarscanner-cli.sh +455 -0
  144. package/.agent/scripts/spaceship-helper.sh +747 -0
  145. package/.agent/scripts/stagehand-helper.sh +321 -0
  146. package/.agent/scripts/stagehand-python-helper.sh +321 -0
  147. package/.agent/scripts/stagehand-python-setup.sh +441 -0
  148. package/.agent/scripts/stagehand-setup.sh +439 -0
  149. package/.agent/scripts/system-cleanup.sh +340 -0
  150. package/.agent/scripts/terminal-title-helper.sh +388 -0
  151. package/.agent/scripts/terminal-title-setup.sh +549 -0
  152. package/.agent/scripts/test-stagehand-both-integration.sh +317 -0
  153. package/.agent/scripts/test-stagehand-integration.sh +309 -0
  154. package/.agent/scripts/test-stagehand-python-integration.sh +341 -0
  155. package/.agent/scripts/todo-ready.sh +263 -0
  156. package/.agent/scripts/tool-version-check.sh +362 -0
  157. package/.agent/scripts/toon-helper.sh +469 -0
  158. package/.agent/scripts/twilio-helper.sh +917 -0
  159. package/.agent/scripts/updown-helper.sh +279 -0
  160. package/.agent/scripts/validate-mcp-integrations.sh +250 -0
  161. package/.agent/scripts/validate-version-consistency.sh +131 -0
  162. package/.agent/scripts/vaultwarden-helper.sh +597 -0
  163. package/.agent/scripts/vercel-cli-helper.sh +816 -0
  164. package/.agent/scripts/verify-mirrors.sh +169 -0
  165. package/.agent/scripts/version-manager.sh +831 -0
  166. package/.agent/scripts/webhosting-helper.sh +471 -0
  167. package/.agent/scripts/webhosting-verify.sh +238 -0
  168. package/.agent/scripts/wordpress-mcp-helper.sh +508 -0
  169. package/.agent/scripts/worktree-helper.sh +595 -0
  170. package/.agent/scripts/worktree-sessions.sh +577 -0
  171. package/.agent/seo/dataforseo.md +215 -0
  172. package/.agent/seo/domain-research.md +532 -0
  173. package/.agent/seo/eeat-score.md +659 -0
  174. package/.agent/seo/google-search-console.md +366 -0
  175. package/.agent/seo/gsc-sitemaps.md +282 -0
  176. package/.agent/seo/keyword-research.md +521 -0
  177. package/.agent/seo/serper.md +278 -0
  178. package/.agent/seo/site-crawler.md +387 -0
  179. package/.agent/seo.md +236 -0
  180. package/.agent/services/accounting/quickfile.md +159 -0
  181. package/.agent/services/communications/telfon.md +470 -0
  182. package/.agent/services/communications/twilio.md +569 -0
  183. package/.agent/services/crm/fluentcrm.md +449 -0
  184. package/.agent/services/email/ses.md +399 -0
  185. package/.agent/services/hosting/101domains.md +378 -0
  186. package/.agent/services/hosting/closte.md +177 -0
  187. package/.agent/services/hosting/cloudflare.md +251 -0
  188. package/.agent/services/hosting/cloudron.md +478 -0
  189. package/.agent/services/hosting/dns-providers.md +335 -0
  190. package/.agent/services/hosting/domain-purchasing.md +344 -0
  191. package/.agent/services/hosting/hetzner.md +327 -0
  192. package/.agent/services/hosting/hostinger.md +287 -0
  193. package/.agent/services/hosting/localhost.md +419 -0
  194. package/.agent/services/hosting/spaceship.md +353 -0
  195. package/.agent/services/hosting/webhosting.md +330 -0
  196. package/.agent/social-media.md +69 -0
  197. package/.agent/templates/plans-template.md +114 -0
  198. package/.agent/templates/prd-template.md +129 -0
  199. package/.agent/templates/tasks-template.md +108 -0
  200. package/.agent/templates/todo-template.md +89 -0
  201. package/.agent/tools/ai-assistants/agno.md +471 -0
  202. package/.agent/tools/ai-assistants/capsolver.md +326 -0
  203. package/.agent/tools/ai-assistants/configuration.md +221 -0
  204. package/.agent/tools/ai-assistants/overview.md +209 -0
  205. package/.agent/tools/ai-assistants/status.md +171 -0
  206. package/.agent/tools/ai-assistants/windsurf.md +193 -0
  207. package/.agent/tools/ai-orchestration/autogen.md +406 -0
  208. package/.agent/tools/ai-orchestration/crewai.md +445 -0
  209. package/.agent/tools/ai-orchestration/langflow.md +405 -0
  210. package/.agent/tools/ai-orchestration/openprose.md +487 -0
  211. package/.agent/tools/ai-orchestration/overview.md +362 -0
  212. package/.agent/tools/ai-orchestration/packaging.md +647 -0
  213. package/.agent/tools/browser/agent-browser.md +464 -0
  214. package/.agent/tools/browser/browser-automation.md +400 -0
  215. package/.agent/tools/browser/chrome-devtools.md +282 -0
  216. package/.agent/tools/browser/crawl4ai-integration.md +422 -0
  217. package/.agent/tools/browser/crawl4ai-resources.md +277 -0
  218. package/.agent/tools/browser/crawl4ai-usage.md +416 -0
  219. package/.agent/tools/browser/crawl4ai.md +585 -0
  220. package/.agent/tools/browser/dev-browser.md +341 -0
  221. package/.agent/tools/browser/pagespeed.md +260 -0
  222. package/.agent/tools/browser/playwright.md +266 -0
  223. package/.agent/tools/browser/playwriter.md +310 -0
  224. package/.agent/tools/browser/stagehand-examples.md +456 -0
  225. package/.agent/tools/browser/stagehand-python.md +483 -0
  226. package/.agent/tools/browser/stagehand.md +421 -0
  227. package/.agent/tools/build-agent/agent-review.md +224 -0
  228. package/.agent/tools/build-agent/build-agent.md +784 -0
  229. package/.agent/tools/build-mcp/aidevops-plugin.md +476 -0
  230. package/.agent/tools/build-mcp/api-wrapper.md +445 -0
  231. package/.agent/tools/build-mcp/build-mcp.md +240 -0
  232. package/.agent/tools/build-mcp/deployment.md +401 -0
  233. package/.agent/tools/build-mcp/server-patterns.md +632 -0
  234. package/.agent/tools/build-mcp/transports.md +366 -0
  235. package/.agent/tools/code-review/auditing.md +383 -0
  236. package/.agent/tools/code-review/automation.md +219 -0
  237. package/.agent/tools/code-review/best-practices.md +203 -0
  238. package/.agent/tools/code-review/codacy.md +151 -0
  239. package/.agent/tools/code-review/code-simplifier.md +174 -0
  240. package/.agent/tools/code-review/code-standards.md +309 -0
  241. package/.agent/tools/code-review/coderabbit.md +101 -0
  242. package/.agent/tools/code-review/management.md +155 -0
  243. package/.agent/tools/code-review/qlty.md +248 -0
  244. package/.agent/tools/code-review/secretlint.md +565 -0
  245. package/.agent/tools/code-review/setup.md +250 -0
  246. package/.agent/tools/code-review/snyk.md +563 -0
  247. package/.agent/tools/code-review/tools.md +230 -0
  248. package/.agent/tools/content/summarize.md +353 -0
  249. package/.agent/tools/context/augment-context-engine.md +468 -0
  250. package/.agent/tools/context/context-builder-agent.md +76 -0
  251. package/.agent/tools/context/context-builder.md +375 -0
  252. package/.agent/tools/context/context7.md +371 -0
  253. package/.agent/tools/context/dspy.md +302 -0
  254. package/.agent/tools/context/dspyground.md +374 -0
  255. package/.agent/tools/context/llm-tldr.md +219 -0
  256. package/.agent/tools/context/osgrep.md +488 -0
  257. package/.agent/tools/context/prompt-optimization.md +338 -0
  258. package/.agent/tools/context/toon.md +292 -0
  259. package/.agent/tools/conversion/pandoc.md +304 -0
  260. package/.agent/tools/credentials/api-key-management.md +154 -0
  261. package/.agent/tools/credentials/api-key-setup.md +224 -0
  262. package/.agent/tools/credentials/environment-variables.md +180 -0
  263. package/.agent/tools/credentials/vaultwarden.md +382 -0
  264. package/.agent/tools/data-extraction/outscraper.md +974 -0
  265. package/.agent/tools/deployment/coolify-cli.md +388 -0
  266. package/.agent/tools/deployment/coolify-setup.md +353 -0
  267. package/.agent/tools/deployment/coolify.md +345 -0
  268. package/.agent/tools/deployment/vercel.md +390 -0
  269. package/.agent/tools/git/authentication.md +132 -0
  270. package/.agent/tools/git/gitea-cli.md +193 -0
  271. package/.agent/tools/git/github-actions.md +207 -0
  272. package/.agent/tools/git/github-cli.md +223 -0
  273. package/.agent/tools/git/gitlab-cli.md +190 -0
  274. package/.agent/tools/git/opencode-github-security.md +350 -0
  275. package/.agent/tools/git/opencode-github.md +328 -0
  276. package/.agent/tools/git/opencode-gitlab.md +252 -0
  277. package/.agent/tools/git/security.md +196 -0
  278. package/.agent/tools/git.md +207 -0
  279. package/.agent/tools/opencode/oh-my-opencode.md +375 -0
  280. package/.agent/tools/opencode/opencode-anthropic-auth.md +446 -0
  281. package/.agent/tools/opencode/opencode.md +651 -0
  282. package/.agent/tools/social-media/bird.md +437 -0
  283. package/.agent/tools/task-management/beads.md +336 -0
  284. package/.agent/tools/terminal/terminal-title.md +251 -0
  285. package/.agent/tools/ui/shadcn.md +196 -0
  286. package/.agent/tools/ui/ui-skills.md +115 -0
  287. package/.agent/tools/wordpress/localwp.md +311 -0
  288. package/.agent/tools/wordpress/mainwp.md +391 -0
  289. package/.agent/tools/wordpress/scf.md +527 -0
  290. package/.agent/tools/wordpress/wp-admin.md +729 -0
  291. package/.agent/tools/wordpress/wp-dev.md +940 -0
  292. package/.agent/tools/wordpress/wp-preferred.md +398 -0
  293. package/.agent/tools/wordpress.md +95 -0
  294. package/.agent/workflows/branch/bugfix.md +63 -0
  295. package/.agent/workflows/branch/chore.md +95 -0
  296. package/.agent/workflows/branch/experiment.md +115 -0
  297. package/.agent/workflows/branch/feature.md +59 -0
  298. package/.agent/workflows/branch/hotfix.md +98 -0
  299. package/.agent/workflows/branch/refactor.md +92 -0
  300. package/.agent/workflows/branch/release.md +96 -0
  301. package/.agent/workflows/branch.md +347 -0
  302. package/.agent/workflows/bug-fixing.md +267 -0
  303. package/.agent/workflows/changelog.md +129 -0
  304. package/.agent/workflows/code-audit-remote.md +279 -0
  305. package/.agent/workflows/conversation-starter.md +69 -0
  306. package/.agent/workflows/error-feedback.md +578 -0
  307. package/.agent/workflows/feature-development.md +355 -0
  308. package/.agent/workflows/git-workflow.md +702 -0
  309. package/.agent/workflows/multi-repo-workspace.md +268 -0
  310. package/.agent/workflows/plans.md +709 -0
  311. package/.agent/workflows/postflight.md +604 -0
  312. package/.agent/workflows/pr.md +571 -0
  313. package/.agent/workflows/preflight.md +278 -0
  314. package/.agent/workflows/ralph-loop.md +773 -0
  315. package/.agent/workflows/release.md +498 -0
  316. package/.agent/workflows/session-manager.md +254 -0
  317. package/.agent/workflows/session-review.md +311 -0
  318. package/.agent/workflows/sql-migrations.md +631 -0
  319. package/.agent/workflows/version-bump.md +283 -0
  320. package/.agent/workflows/wiki-update.md +333 -0
  321. package/.agent/workflows/worktree.md +477 -0
  322. package/LICENSE +21 -0
  323. package/README.md +1446 -0
  324. package/VERSION +1 -0
  325. package/aidevops.sh +1746 -0
  326. package/bin/aidevops +21 -0
  327. package/package.json +75 -0
  328. package/scripts/npm-postinstall.js +60 -0
  329. package/setup.sh +2366 -0
@@ -0,0 +1,471 @@
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
+ # Web Hosting Helper Script
5
+ # Manages .local domains for web applications in ~/Git
6
+ # Compatible with LocalWP and standalone nginx setups
7
+
8
+ # Source shared constants if available
9
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
10
+ source "$SCRIPT_DIR/shared-constants.sh" 2>/dev/null || true
11
+
12
+ # Colors for output
13
+ GREEN='\033[0;32m'
14
+ BLUE='\033[0;34m'
15
+ YELLOW='\033[1;33m'
16
+ RED='\033[0;31m'
17
+ PURPLE='\033[0;35m'
18
+ NC='\033[0m' # No Color
19
+
20
+ # Configuration
21
+ CERT_DIR="$HOME/.localhost-setup/certs"
22
+ NGINX_CONF_DIR="/Users/$(whoami)/Library/Application Support/Local/run/router/nginx/conf"
23
+ GIT_DIR="$HOME/Git"
24
+ # CONFIG_FILE="../configs/webhosting-config.json" # Reserved for future use
25
+
26
+ print_header() {
27
+ local message="$1"
28
+ echo -e "${PURPLE}================================${NC}"
29
+ echo -e "${PURPLE}$message${NC}"
30
+ echo -e "${PURPLE}================================${NC}"
31
+ return 0
32
+ }
33
+
34
+ print_info() {
35
+ local message="$1"
36
+ echo -e "${BLUE}[INFO]${NC} $message"
37
+ return 0
38
+ }
39
+
40
+ print_success() {
41
+ local message="$1"
42
+ echo -e "${GREEN}[SUCCESS]${NC} $message"
43
+ return 0
44
+ }
45
+
46
+ print_warning() {
47
+ local message="$1"
48
+ echo -e "${YELLOW}[WARNING]${NC} $message"
49
+ return 0
50
+ }
51
+
52
+ print_error() {
53
+ local message="$1"
54
+ echo -e "${RED}[ERROR]${NC} $message" >&2
55
+ return 0
56
+ }
57
+
58
+ # Check if LocalWP is available
59
+ check_localwp() {
60
+ if [[ -d "/Applications/Local.app" ]] || [[ -d "$HOME/Applications/Local.app" ]]; then
61
+ if [[ -d "$NGINX_CONF_DIR" ]]; then
62
+ print_success "LocalWP nginx router detected - using existing setup"
63
+ return 0
64
+ else
65
+ print_warning "LocalWP found but nginx router not running"
66
+ return 1
67
+ fi
68
+ else
69
+ print_info "LocalWP not found - standalone mode"
70
+ return 1
71
+ fi
72
+ return 0
73
+ }
74
+
75
+ # Detect web application type and default port
76
+ detect_webapp_type() {
77
+ local project_dir="$1"
78
+
79
+ if [[ -f "$project_dir/package.json" ]]; then
80
+ if grep -q "next" "$project_dir/package.json"; then
81
+ echo "nextjs:3000"
82
+ elif grep -q "react" "$project_dir/package.json"; then
83
+ echo "react:3000"
84
+ elif grep -q "vue" "$project_dir/package.json"; then
85
+ echo "vue:3000"
86
+ elif grep -q "nuxt" "$project_dir/package.json"; then
87
+ echo "nuxt:3000"
88
+ elif grep -q "svelte" "$project_dir/package.json"; then
89
+ echo "svelte:5173"
90
+ elif grep -q "vite" "$project_dir/package.json"; then
91
+ echo "vite:5173"
92
+ else
93
+ echo "node:3000"
94
+ fi
95
+ elif [[ -f "$project_dir/Gemfile" ]]; then
96
+ echo "rails:3000"
97
+ elif [[ -f "$project_dir/requirements.txt" ]] || [[ -f "$project_dir/pyproject.toml" ]]; then
98
+ echo "python:8000"
99
+ elif [[ -f "$project_dir/Cargo.toml" ]]; then
100
+ echo "rust:8000"
101
+ elif [[ -f "$project_dir/go.mod" ]]; then
102
+ echo "go:8080"
103
+ elif [[ -f "$project_dir/composer.json" ]]; then
104
+ echo "php:8000"
105
+ else
106
+ echo "unknown:3000"
107
+ fi
108
+ return 0
109
+ }
110
+
111
+ # Generate SSL certificate
112
+ generate_ssl_cert() {
113
+ local domain="$1"
114
+
115
+ print_info "Generating SSL certificate for $domain..."
116
+ mkdir -p "$CERT_DIR"
117
+
118
+ if [[ -f "$CERT_DIR/$domain.crt" ]]; then
119
+ print_warning "SSL certificate already exists for $domain"
120
+ return 0
121
+ fi
122
+
123
+ openssl req -x509 -newkey rsa:2048 \
124
+ -keyout "$CERT_DIR/$domain.key" \
125
+ -out "$CERT_DIR/$domain.crt" \
126
+ -days 365 -nodes \
127
+ -subj "/C=US/ST=Local/L=Local/O=Local Development/CN=$domain" \
128
+ 2>/dev/null
129
+
130
+ print_success "SSL certificate generated for $domain"
131
+ return 0
132
+ }
133
+
134
+ # Create nginx configuration for LocalWP router
135
+ create_localwp_nginx_config() {
136
+ local domain="$1"
137
+ local port="$2"
138
+ local webapp_type="$3"
139
+
140
+ print_info "Creating LocalWP nginx configuration for $domain..."
141
+
142
+ local nginx_conf="$NGINX_CONF_DIR/route.$domain.conf"
143
+
144
+ if [[ -f "$nginx_conf" ]]; then
145
+ print_warning "Nginx configuration exists, backing up..."
146
+ cp "$nginx_conf" "$nginx_conf.backup.$(date +%s)"
147
+ fi
148
+
149
+ # Create nginx configuration based on webapp type
150
+ # NOSONAR - HTTP used for localhost proxy_pass is safe (internal traffic only)
151
+ cat > "$nginx_conf" << EOF
152
+ # Local Development Site: $domain ($webapp_type)
153
+ server {
154
+ listen 80;
155
+ server_name $domain;
156
+
157
+ # Redirect HTTP to HTTPS
158
+ return 301 https://\$server_name\$request_uri;
159
+ }
160
+
161
+ server {
162
+ listen 443 ssl;
163
+ http2 on;
164
+ server_name $domain;
165
+
166
+ # SSL Configuration
167
+ ssl_certificate "$CERT_DIR/$domain.crt";
168
+ ssl_certificate_key "$CERT_DIR/$domain.key";
169
+ ssl_protocols TLSv1.2 TLSv1.3;
170
+ ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384;
171
+ ssl_prefer_server_ciphers off;
172
+
173
+ # Proxy to local development server
174
+ location / {
175
+ proxy_pass http://127.0.0.1:$port;
176
+ proxy_http_version 1.1;
177
+ proxy_set_header Upgrade \$http_upgrade;
178
+ proxy_set_header Connection 'upgrade';
179
+ proxy_set_header Host \$host;
180
+ proxy_set_header X-Real-IP \$remote_addr;
181
+ proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
182
+ proxy_set_header X-Forwarded-Proto \$scheme;
183
+ proxy_cache_bypass \$http_upgrade;
184
+ proxy_read_timeout 86400;
185
+ }
186
+ EOF
187
+
188
+ # Add framework-specific configurations
189
+ case "$webapp_type" in
190
+ "nextjs"|"react"|"vue"|"nuxt")
191
+ cat >> "$nginx_conf" << EOF
192
+
193
+ # Handle WebSocket connections for hot reload
194
+ location /_next/webpack-hmr {
195
+ proxy_pass http://127.0.0.1:$port;
196
+ proxy_http_version 1.1;
197
+ proxy_set_header Upgrade \$http_upgrade;
198
+ proxy_set_header Connection "upgrade";
199
+ proxy_set_header Host \$host;
200
+ proxy_set_header X-Real-IP \$remote_addr;
201
+ proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
202
+ proxy_set_header X-Forwarded-Proto \$scheme;
203
+ }
204
+ EOF
205
+ ;;
206
+ "vite"|"svelte")
207
+ cat >> "$nginx_conf" << EOF
208
+
209
+ # Handle Vite HMR WebSocket
210
+ location /vite-dev-server {
211
+ proxy_pass http://127.0.0.1:$port;
212
+ proxy_http_version 1.1;
213
+ proxy_set_header Upgrade \$http_upgrade;
214
+ proxy_set_header Connection "upgrade";
215
+ proxy_set_header Host \$host;
216
+ }
217
+ EOF
218
+ ;;
219
+ *)
220
+ # No additional configuration needed for other webapp types
221
+ ;;
222
+ esac
223
+
224
+ echo "}" >> "$nginx_conf"
225
+
226
+ print_success "LocalWP nginx configuration created for $domain"
227
+ return 0
228
+ }
229
+
230
+ # Add domain to hosts file
231
+ add_to_hosts() {
232
+ local domain="$1"
233
+
234
+ if grep -q "$domain" /etc/hosts; then
235
+ print_warning "Domain $domain already exists in hosts file"
236
+ return 0
237
+ fi
238
+
239
+ print_info "Adding $domain to /etc/hosts (requires sudo)..."
240
+ echo "127.0.0.1 $domain" | sudo tee -a /etc/hosts > /dev/null
241
+ print_success "Domain added to hosts file"
242
+ return 0
243
+ }
244
+
245
+ # Reload nginx
246
+ reload_nginx() {
247
+ print_info "Reloading nginx configuration..."
248
+
249
+ local nginx_pid
250
+ nginx_pid=$(pgrep -f "nginx.*router" | head -1)
251
+ if [[ -n "$nginx_pid" ]]; then
252
+ kill -HUP "$nginx_pid"
253
+ print_success "Nginx configuration reloaded"
254
+ else
255
+ print_warning "Nginx router not running - configuration will be loaded when it starts"
256
+ fi
257
+ return 0
258
+ }
259
+
260
+ # Setup a new local domain
261
+ setup_domain() {
262
+ local project_name="$1"
263
+ local port="$2"
264
+
265
+ if [[ -z "$project_name" ]]; then
266
+ print_error "Project name is required"
267
+ exit 1
268
+ fi
269
+
270
+ local project_dir="$GIT_DIR/$project_name"
271
+ local domain="$project_name.local"
272
+
273
+ if [[ ! -d "$project_dir" ]]; then
274
+ print_error "Project directory does not exist: $project_dir"
275
+ exit 1
276
+ fi
277
+
278
+ print_header "Setting up $domain"
279
+
280
+ # Detect webapp type and default port if not specified
281
+ local webapp_info
282
+ webapp_info=$(detect_webapp_type "$project_dir")
283
+ local webapp_type="${webapp_info%:*}"
284
+ local default_port="${webapp_info#*:}"
285
+
286
+ # Use provided port or default
287
+ port="${port:-$default_port}"
288
+
289
+ print_info "Detected: $webapp_type application"
290
+ print_info "Using port: $port"
291
+
292
+ # Generate SSL certificate
293
+ generate_ssl_cert "$domain"
294
+
295
+ # Check if LocalWP is available and create appropriate config
296
+ if check_localwp; then
297
+ create_localwp_nginx_config "$domain" "$port" "$webapp_type"
298
+ reload_nginx
299
+ else
300
+ print_warning "LocalWP not available - manual nginx setup required"
301
+ print_info "See documentation for standalone nginx setup"
302
+ fi
303
+
304
+ # Add to hosts file
305
+ add_to_hosts "$domain"
306
+
307
+ print_success "Local domain setup complete!"
308
+ echo ""
309
+ echo -e "${GREEN}✅ Domain configured: https://$domain${NC}"
310
+ echo ""
311
+ echo -e "${YELLOW}⚠️ CRITICAL STEP REQUIRED:${NC}"
312
+ echo -e "${RED}The domain is NOT yet accessible because it's missing from /etc/hosts${NC}"
313
+ echo ""
314
+ echo -e "${BLUE}📝 Complete these steps to finish setup:${NC}"
315
+ echo ""
316
+ echo -e "${YELLOW}1. Add domain to hosts file (REQUIRED):${NC}"
317
+ echo " echo \"127.0.0.1 $domain\" | sudo tee -a /etc/hosts"
318
+ echo ""
319
+ echo -e "${YELLOW}2. Start your development server on port $port:${NC}"
320
+ echo " cd ~/Git/$project_name" || exit
321
+ echo " PORT=$port npm run dev # or pnpm dev, yarn dev"
322
+ echo ""
323
+ echo -e "${YELLOW}3. Visit https://$domain in your browser${NC}"
324
+ echo ""
325
+ echo -e "${YELLOW}4. Handle SSL certificate warning:${NC}"
326
+ echo " Browser will show: \"Your connection is not private\""
327
+ echo " Click: \"Proceed to $domain (unsafe)\""
328
+ echo ""
329
+ echo -e "${GREEN}5. Verify success:${NC}"
330
+ echo " - HTTP redirect: http://$domain → https://$domain"
331
+ echo " - HTTPS access: https://$domain shows your app"
332
+ echo ""
333
+ return 0
334
+ }
335
+
336
+ # List configured domains
337
+ list_domains() {
338
+ print_header "Configured Local Domains"
339
+
340
+ if check_localwp; then
341
+ local found_domains=false
342
+
343
+ for conf_file in "$NGINX_CONF_DIR"/route.*.local.conf; do
344
+ if [[ -f "$conf_file" ]]; then
345
+ local domain
346
+ domain=$(basename "$conf_file" | sed 's/route\.\(.*\)\.conf/\1/')
347
+ local port
348
+ port=$(grep "proxy_pass" "$conf_file" | head -1 | sed 's/.*127\.0\.0\.1:\([0-9]*\).*/\1/')
349
+ local status="❌ Not running"
350
+
351
+ # Check if port is in use
352
+ if lsof -i ":$port" >/dev/null 2>&1; then
353
+ status="✅ Running"
354
+ fi
355
+
356
+ echo -e "${BLUE}🌐 https://$domain${NC} → Port $port $status"
357
+ found_domains=true
358
+ fi
359
+ done
360
+
361
+ if [[ "$found_domains" == false ]]; then
362
+ print_warning "No local domains configured"
363
+ fi
364
+ else
365
+ print_warning "LocalWP not available - cannot list domains"
366
+ fi
367
+ return 0
368
+ }
369
+
370
+ # Remove a domain
371
+ remove_domain() {
372
+ local project_name="$1"
373
+
374
+ if [[ -z "$project_name" ]]; then
375
+ print_error "Project name is required"
376
+ exit 1
377
+ fi
378
+
379
+ local domain="$project_name.local"
380
+
381
+ print_header "Removing $domain"
382
+
383
+ if check_localwp; then
384
+ local nginx_conf="$NGINX_CONF_DIR/route.$domain.conf"
385
+
386
+ # Remove nginx configuration
387
+ if [[ -f "$nginx_conf" ]]; then
388
+ rm "$nginx_conf"
389
+ print_success "Nginx configuration removed"
390
+ reload_nginx
391
+ else
392
+ print_warning "Nginx configuration not found"
393
+ fi
394
+ fi
395
+
396
+ # Remove SSL certificates
397
+ if [[ -f "$CERT_DIR/$domain.crt" ]]; then
398
+ rm "$CERT_DIR/$domain.crt" "$CERT_DIR/$domain.key"
399
+ print_success "SSL certificates removed"
400
+ else
401
+ print_warning "SSL certificates not found"
402
+ fi
403
+
404
+ # Remove from hosts file (requires manual intervention due to sudo)
405
+ if grep -q "$domain" /etc/hosts; then
406
+ print_warning "Please manually remove '$domain' from /etc/hosts"
407
+ print_info "Run: sudo sed -i '' '/$domain/d' /etc/hosts"
408
+ fi
409
+
410
+ print_success "Domain removal complete!"
411
+ return 0
412
+ }
413
+
414
+ # Show help
415
+ show_help() {
416
+ echo "Web Hosting Helper - Local Domain Management"
417
+ echo ""
418
+ echo "Usage: $0 [command] [options]"
419
+ echo ""
420
+ echo "Commands:"
421
+ echo " setup <project-name> [port] Setup local domain for project"
422
+ echo " list List all configured domains"
423
+ echo " remove <project-name> Remove local domain configuration"
424
+ echo " help Show this help message"
425
+ echo ""
426
+ echo "Examples:"
427
+ echo " $0 setup myapp 3000"
428
+ echo " $0 setup webapp-source 3001"
429
+ echo " $0 list"
430
+ echo " $0 remove myapp"
431
+ echo ""
432
+ echo "Supported frameworks:"
433
+ echo " - Next.js, React, Vue, Nuxt (port 3000)"
434
+ echo " - Vite, Svelte (port 5173)"
435
+ echo " - Rails (port 3000)"
436
+ echo " - Python/Django (port 8000)"
437
+ echo " - Go (port 8080)"
438
+ echo " - PHP (port 8000)"
439
+ echo ""
440
+ echo "Requirements:"
441
+ echo " - LocalWP (recommended) or standalone nginx"
442
+ echo " - OpenSSL for certificate generation"
443
+ echo " - sudo access for hosts file modification"
444
+ echo ""
445
+ return 0
446
+ }
447
+
448
+ # Main script logic
449
+ main() {
450
+ local command="${1:-help}"
451
+ local project_name="$2"
452
+ local port="$3"
453
+
454
+ case "$command" in
455
+ "setup")
456
+ setup_domain "$project_name" "$port"
457
+ ;;
458
+ "list")
459
+ list_domains
460
+ ;;
461
+ "remove")
462
+ remove_domain "$project_name"
463
+ ;;
464
+ "help"|*)
465
+ show_help
466
+ ;;
467
+ esac
468
+ return 0
469
+ }
470
+
471
+ main "$@"
@@ -0,0 +1,238 @@
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
+ # Web Hosting Verification Script
5
+ # Verifies local domain setup and provides detailed troubleshooting
6
+
7
+ # Source shared constants if available
8
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || exit
9
+ source "$SCRIPT_DIR/shared-constants.sh" 2>/dev/null || true
10
+
11
+ # Colors for output
12
+ GREEN='\033[0;32m'
13
+ BLUE='\033[0;34m'
14
+ YELLOW='\033[1;33m'
15
+ RED='\033[0;31m'
16
+ PURPLE='\033[0;35m'
17
+ NC='\033[0m' # No Color
18
+
19
+ # Configuration
20
+ CERT_DIR="$HOME/.localhost-setup/certs"
21
+ NGINX_CONF_DIR="/Users/$(whoami)/Library/Application Support/Local/run/router/nginx/conf"
22
+ GIT_DIR="$HOME/Git"
23
+
24
+ print_header() {
25
+ local message="$1"
26
+ echo -e "${PURPLE}================================${NC}"
27
+ echo -e "${PURPLE}$message${NC}"
28
+ echo -e "${PURPLE}================================${NC}"
29
+ return 0
30
+ }
31
+
32
+ print_info() {
33
+ local message="$1"
34
+ echo -e "${BLUE}[INFO]${NC} $message"
35
+ return 0
36
+ }
37
+
38
+ print_success() {
39
+ local message="$1"
40
+ echo -e "${GREEN}[SUCCESS]${NC} $message"
41
+ return 0
42
+ }
43
+
44
+ print_warning() {
45
+ local message="$1"
46
+ echo -e "${YELLOW}[WARNING]${NC} $message"
47
+ return 0
48
+ }
49
+
50
+ print_error() {
51
+ local message="$1"
52
+ echo -e "${RED}[ERROR]${NC} $message" >&2
53
+ return 0
54
+ }
55
+
56
+ # Verify domain setup
57
+ verify_domain() {
58
+ local project_name="$1"
59
+
60
+ if [[ -z "$project_name" ]]; then
61
+ print_error "Project name is required"
62
+ exit 1
63
+ fi
64
+
65
+ local domain="$project_name.local"
66
+ local project_dir="$GIT_DIR/$project_name"
67
+
68
+ print_header "Verifying $domain Setup"
69
+
70
+ local all_checks_passed=true
71
+
72
+ # Check 1: Project directory exists
73
+ echo -e "${BLUE}1. Checking project directory...${NC}"
74
+ if [[ -d "$project_dir" ]]; then
75
+ print_success "Project directory exists: $project_dir"
76
+ else
77
+ print_error "Project directory not found: $project_dir"
78
+ all_checks_passed=false
79
+ fi
80
+
81
+ # Check 2: Hosts file entry
82
+ echo -e "${BLUE}2. Checking hosts file...${NC}"
83
+ if grep -q "$domain" /etc/hosts; then
84
+ print_success "Domain found in /etc/hosts"
85
+ else
86
+ print_error "Domain NOT found in /etc/hosts"
87
+ print_warning "Fix: echo \"127.0.0.1 $domain\" | sudo tee -a /etc/hosts"
88
+ all_checks_passed=false
89
+ fi
90
+
91
+ # Check 3: Nginx configuration
92
+ echo -e "${BLUE}3. Checking nginx configuration...${NC}"
93
+ local nginx_conf="$NGINX_CONF_DIR/route.$domain.conf"
94
+ if [[ -f "$nginx_conf" ]]; then
95
+ print_success "Nginx configuration exists"
96
+
97
+ # Check port configuration
98
+ local port
99
+ port=$(grep "proxy_pass" "$nginx_conf" | head -1 | sed 's/.*127\.0\.0\.1:\([0-9]*\).*/\1/')
100
+ if [[ -n "$port" ]]; then
101
+ print_info "Configured port: $port"
102
+ else
103
+ print_warning "Could not determine configured port"
104
+ fi
105
+ else
106
+ print_error "Nginx configuration missing: $nginx_conf"
107
+ all_checks_passed=false
108
+ fi
109
+
110
+ # Check 4: SSL certificates
111
+ echo -e "${BLUE}4. Checking SSL certificates...${NC}"
112
+ if [[ -f "$CERT_DIR/$domain.crt" && -f "$CERT_DIR/$domain.key" ]]; then
113
+ print_success "SSL certificates exist"
114
+
115
+ # Check certificate validity
116
+ local cert_info
117
+ if cert_info=$(openssl x509 -in "$CERT_DIR/$domain.crt" -noout -dates 2>/dev/null); then
118
+ print_info "Certificate info: $cert_info"
119
+ fi
120
+ else
121
+ print_error "SSL certificates missing"
122
+ all_checks_passed=false
123
+ fi
124
+
125
+ # Check 5: LocalWP nginx router
126
+ echo -e "${BLUE}5. Checking nginx router...${NC}"
127
+ if pgrep -f "nginx.*router" >/dev/null; then
128
+ print_success "Nginx router is running"
129
+ else
130
+ print_error "Nginx router not running"
131
+ print_warning "Start LocalWP application or check nginx status"
132
+ all_checks_passed=false
133
+ fi
134
+
135
+ # Check 6: Development server (if hosts file is correct)
136
+ if grep -q "$domain" /etc/hosts && [[ -n "$port" ]]; then
137
+ echo -e "${BLUE}6. Checking development server...${NC}"
138
+ if lsof -i ":$port" >/dev/null 2>&1; then
139
+ print_success "Development server running on port $port"
140
+ else
141
+ print_warning "No service running on port $port"
142
+ print_info "Start with: cd $project_dir && PORT=$port npm run dev" || exit
143
+ fi
144
+
145
+ # Check 7: DNS resolution
146
+ echo -e "${BLUE}7. Testing DNS resolution...${NC}"
147
+ if ping -c 1 "$domain" >/dev/null 2>&1; then
148
+ print_success "Domain resolves to localhost"
149
+ else
150
+ print_error "Domain resolution failed"
151
+ all_checks_passed=false
152
+ fi
153
+
154
+ # Check 8: HTTP redirect
155
+ echo -e "${BLUE}8. Testing HTTP redirect...${NC}"
156
+ local http_response
157
+ # NOSONAR - Testing HTTP to HTTPS redirect behavior requires HTTP request
158
+ http_response=$(curl -s -o /dev/null -w "%{http_code}" "http://$domain" 2>/dev/null || echo "000")
159
+ if [[ "$http_response" == "301" ]]; then
160
+ print_success "HTTP redirects to HTTPS (301)"
161
+ else
162
+ print_warning "HTTP redirect test failed (got $http_response)"
163
+ if [[ "$http_response" == "000" ]]; then
164
+ print_info "This may be normal if development server is not running"
165
+ fi
166
+ fi
167
+
168
+ # Check 9: HTTPS connection (with SSL verification)
169
+ echo -e "${BLUE}9. Testing HTTPS connection...${NC}"
170
+ local https_response
171
+ # First try with SSL verification enabled (secure)
172
+ https_response=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 10 "https://$domain" 2>/dev/null || echo "000")
173
+ if [[ "$https_response" == "200" ]]; then
174
+ print_success "HTTPS connection successful with valid SSL (200)"
175
+ elif [[ "$https_response" == "000" ]]; then
176
+ # SSL verification may have failed - this could indicate self-signed cert
177
+ print_warning "HTTPS connection failed - SSL certificate may be invalid or self-signed"
178
+ print_info "This may be normal for local development environments"
179
+ else
180
+ print_warning "HTTPS connection test failed (got $https_response)"
181
+ fi
182
+ fi
183
+
184
+ echo ""
185
+ if [[ "$all_checks_passed" == true ]]; then
186
+ print_success "All critical checks passed!"
187
+ echo ""
188
+ echo -e "${GREEN}✅ Domain is ready: https://$domain${NC}"
189
+ echo ""
190
+ echo -e "${BLUE}Next steps:${NC}"
191
+ echo "1. Start development server: cd $project_dir && PORT=$port npm run dev" || exit
192
+ echo "2. Visit: https://$domain"
193
+ echo "3. Accept SSL certificate warning in browser"
194
+ else
195
+ print_error "Some checks failed - see messages above for fixes"
196
+ echo ""
197
+ echo -e "${YELLOW}Common fixes:${NC}"
198
+ echo "• Add to hosts: echo \"127.0.0.1 $domain\" | sudo tee -a /etc/hosts"
199
+ echo "• Setup domain: ./webhosting-helper.sh setup $project_name"
200
+ echo "• Start LocalWP application"
201
+ fi
202
+ return 0
203
+ }
204
+
205
+ # Show help
206
+ show_help() {
207
+ echo "Web Hosting Verification Script"
208
+ echo ""
209
+ echo "Usage: $0 [command] [options]"
210
+ echo ""
211
+ echo "Commands:"
212
+ echo " verify <project-name> Verify local domain setup"
213
+ echo " help Show this help message"
214
+ echo ""
215
+ echo "Examples:"
216
+ echo " $0 verify myapp"
217
+ echo " $0 verify turbostarter-source"
218
+ echo ""
219
+ return 0
220
+ }
221
+
222
+ # Main script logic
223
+ main() {
224
+ local command="${1:-help}"
225
+ local project_name="$2"
226
+
227
+ case "$command" in
228
+ "verify")
229
+ verify_domain "$project_name"
230
+ ;;
231
+ "help"|*)
232
+ show_help
233
+ ;;
234
+ esac
235
+ return 0
236
+ }
237
+
238
+ main "$@"