@stacksjs/defaults 0.70.206 → 0.70.208
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/TODO.md +21 -0
- package/ai/AGENTS.md +79 -0
- package/ai/README.md +45 -0
- package/ai/claude/launch.json +12 -0
- package/ai/skills/stacks-actions/SKILL.md +128 -0
- package/ai/skills/stacks-ai/SKILL.md +276 -0
- package/ai/skills/stacks-alias/SKILL.md +94 -0
- package/ai/skills/stacks-analytics/SKILL.md +91 -0
- package/ai/skills/stacks-api/SKILL.md +738 -0
- package/ai/skills/stacks-arrays/SKILL.md +277 -0
- package/ai/skills/stacks-auth/SKILL.md +422 -0
- package/ai/skills/stacks-auto-imports/SKILL.md +138 -0
- package/ai/skills/stacks-brandkit/SKILL.md +811 -0
- package/ai/skills/stacks-browse/SKILL.md +127 -0
- package/ai/skills/stacks-browse/scripts/browse.ts +492 -0
- package/ai/skills/stacks-browser/SKILL.md +145 -0
- package/ai/skills/stacks-buddy/SKILL.md +676 -0
- package/ai/skills/stacks-build/SKILL.md +163 -0
- package/ai/skills/stacks-cache/SKILL.md +125 -0
- package/ai/skills/stacks-calendar/SKILL.md +113 -0
- package/ai/skills/stacks-chat/SKILL.md +371 -0
- package/ai/skills/stacks-cli/SKILL.md +112 -0
- package/ai/skills/stacks-cloud/SKILL.md +192 -0
- package/ai/skills/stacks-cms/SKILL.md +217 -0
- package/ai/skills/stacks-collections/SKILL.md +82 -0
- package/ai/skills/stacks-commerce/SKILL.md +114 -0
- package/ai/skills/stacks-composables/SKILL.md +161 -0
- package/ai/skills/stacks-config/SKILL.md +144 -0
- package/ai/skills/stacks-configuration/SKILL.md +154 -0
- package/ai/skills/stacks-cron/SKILL.md +123 -0
- package/ai/skills/stacks-crosswind/SKILL.md +190 -0
- package/ai/skills/stacks-dashboard/SKILL.md +173 -0
- package/ai/skills/stacks-database/SKILL.md +286 -0
- package/ai/skills/stacks-datetime/SKILL.md +269 -0
- package/ai/skills/stacks-dependencies/SKILL.md +111 -0
- package/ai/skills/stacks-deploy/SKILL.md +102 -0
- package/ai/skills/stacks-design-brutalist/SKILL.md +110 -0
- package/ai/skills/stacks-design-minimalist/SKILL.md +115 -0
- package/ai/skills/stacks-design-output/SKILL.md +55 -0
- package/ai/skills/stacks-design-soft/SKILL.md +156 -0
- package/ai/skills/stacks-design-taste/SKILL.md +1012 -0
- package/ai/skills/stacks-design-taste-codex/SKILL.md +294 -0
- package/ai/skills/stacks-desktop/SKILL.md +78 -0
- package/ai/skills/stacks-development/SKILL.md +298 -0
- package/ai/skills/stacks-dns/SKILL.md +149 -0
- package/ai/skills/stacks-docs/SKILL.md +109 -0
- package/ai/skills/stacks-email/SKILL.md +236 -0
- package/ai/skills/stacks-enums/SKILL.md +100 -0
- package/ai/skills/stacks-env/SKILL.md +181 -0
- package/ai/skills/stacks-error-handling/SKILL.md +137 -0
- package/ai/skills/stacks-events/SKILL.md +228 -0
- package/ai/skills/stacks-faker/SKILL.md +158 -0
- package/ai/skills/stacks-git/SKILL.md +158 -0
- package/ai/skills/stacks-guard/SKILL.md +98 -0
- package/ai/skills/stacks-health/SKILL.md +75 -0
- package/ai/skills/stacks-http/SKILL.md +316 -0
- package/ai/skills/stacks-i18n/SKILL.md +198 -0
- package/ai/skills/stacks-image-to-code/SKILL.md +629 -0
- package/ai/skills/stacks-imagegen-mobile/SKILL.md +1474 -0
- package/ai/skills/stacks-imagegen-web/SKILL.md +998 -0
- package/ai/skills/stacks-investigate/SKILL.md +119 -0
- package/ai/skills/stacks-jobs/SKILL.md +136 -0
- package/ai/skills/stacks-lint/SKILL.md +184 -0
- package/ai/skills/stacks-listeners/SKILL.md +99 -0
- package/ai/skills/stacks-logging/SKILL.md +78 -0
- package/ai/skills/stacks-mail/SKILL.md +120 -0
- package/ai/skills/stacks-middleware/SKILL.md +249 -0
- package/ai/skills/stacks-migrations/SKILL.md +105 -0
- package/ai/skills/stacks-models/SKILL.md +267 -0
- package/ai/skills/stacks-new-feature/SKILL.md +206 -0
- package/ai/skills/stacks-notifications/SKILL.md +210 -0
- package/ai/skills/stacks-objects/SKILL.md +205 -0
- package/ai/skills/stacks-office-hours/SKILL.md +134 -0
- package/ai/skills/stacks-orm/SKILL.md +342 -0
- package/ai/skills/stacks-path/SKILL.md +118 -0
- package/ai/skills/stacks-payments/SKILL.md +373 -0
- package/ai/skills/stacks-plan-review/SKILL.md +152 -0
- package/ai/skills/stacks-plugins/SKILL.md +149 -0
- package/ai/skills/stacks-push/SKILL.md +376 -0
- package/ai/skills/stacks-query-builder/SKILL.md +128 -0
- package/ai/skills/stacks-queue/SKILL.md +559 -0
- package/ai/skills/stacks-realtime/SKILL.md +442 -0
- package/ai/skills/stacks-redesign/SKILL.md +182 -0
- package/ai/skills/stacks-registry/SKILL.md +58 -0
- package/ai/skills/stacks-repl/SKILL.md +80 -0
- package/ai/skills/stacks-retro/SKILL.md +122 -0
- package/ai/skills/stacks-review/SKILL.md +135 -0
- package/ai/skills/stacks-router/SKILL.md +231 -0
- package/ai/skills/stacks-routes/SKILL.md +105 -0
- package/ai/skills/stacks-scaffolding/SKILL.md +162 -0
- package/ai/skills/stacks-scheduler/SKILL.md +363 -0
- package/ai/skills/stacks-search-engine/SKILL.md +112 -0
- package/ai/skills/stacks-security/SKILL.md +129 -0
- package/ai/skills/stacks-security-audit/SKILL.md +128 -0
- package/ai/skills/stacks-server/SKILL.md +458 -0
- package/ai/skills/stacks-shell/SKILL.md +62 -0
- package/ai/skills/stacks-slug/SKILL.md +87 -0
- package/ai/skills/stacks-sms/SKILL.md +385 -0
- package/ai/skills/stacks-socials/SKILL.md +303 -0
- package/ai/skills/stacks-storage/SKILL.md +576 -0
- package/ai/skills/stacks-strings/SKILL.md +416 -0
- package/ai/skills/stacks-stx/SKILL.md +176 -0
- package/ai/skills/stacks-technical-diagrams/LICENSE +22 -0
- package/ai/skills/stacks-technical-diagrams/SKILL.md +290 -0
- package/ai/skills/stacks-technical-diagrams/agents/openai.yaml +4 -0
- package/ai/skills/stacks-technical-diagrams/assets/template.html +1252 -0
- package/ai/skills/stacks-technical-diagrams/bin/technical-diagrams.mjs +289 -0
- package/ai/skills/stacks-technical-diagrams/bunfig.toml +1 -0
- package/ai/skills/stacks-technical-diagrams/examples/agent-run.lifecycle.json +64 -0
- package/ai/skills/stacks-technical-diagrams/examples/agent-tool-call.workflow.json +88 -0
- package/ai/skills/stacks-technical-diagrams/examples/cache-miss-request.sequence.json +75 -0
- package/ai/skills/stacks-technical-diagrams/examples/product-analytics.dataflow.json +70 -0
- package/ai/skills/stacks-technical-diagrams/examples/web-app.architecture.json +41 -0
- package/ai/skills/stacks-technical-diagrams/renderers/architecture/grid.mjs +62 -0
- package/ai/skills/stacks-technical-diagrams/renderers/architecture/render-architecture.mjs +371 -0
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/README.md +82 -0
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/render-dataflow.mjs +295 -0
- package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/README.md +91 -0
- package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/render-lifecycle.mjs +384 -0
- package/ai/skills/stacks-technical-diagrams/renderers/sequence/README.md +84 -0
- package/ai/skills/stacks-technical-diagrams/renderers/sequence/render-sequence.mjs +257 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/cli.mjs +42 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/generated-validators.mjs +13 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/geometry.mjs +230 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/layout-report.mjs +40 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/utils.mjs +88 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/validator.mjs +40 -0
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/README.md +103 -0
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/render-workflow.mjs +481 -0
- package/ai/skills/stacks-technical-diagrams/schemas/README.md +68 -0
- package/ai/skills/stacks-technical-diagrams/schemas/architecture.schema.json +121 -0
- package/ai/skills/stacks-technical-diagrams/schemas/common.schema.json +43 -0
- package/ai/skills/stacks-technical-diagrams/schemas/dataflow.schema.json +221 -0
- package/ai/skills/stacks-technical-diagrams/schemas/lifecycle.schema.json +241 -0
- package/ai/skills/stacks-technical-diagrams/schemas/sequence.schema.json +186 -0
- package/ai/skills/stacks-technical-diagrams/schemas/workflow.schema.json +332 -0
- package/ai/skills/stacks-technical-diagrams/scripts/check-render-output.mjs +297 -0
- package/ai/skills/stacks-technical-diagrams/scripts/render-examples.mjs +28 -0
- package/ai/skills/stacks-testing/SKILL.md +129 -0
- package/ai/skills/stacks-tunnel/SKILL.md +125 -0
- package/ai/skills/stacks-types/SKILL.md +178 -0
- package/ai/skills/stacks-ui/SKILL.md +246 -0
- package/ai/skills/stacks-utils/SKILL.md +444 -0
- package/ai/skills/stacks-validation/SKILL.md +371 -0
- package/ai/skills/stacks-whois/SKILL.md +315 -0
- package/assets/world-map-data.ts +121 -0
- package/bootstrap.ts +114 -0
- package/docs/api-examples.md +46 -0
- package/docs/index.md +24 -0
- package/docs/markdown-examples.md +87 -0
- package/functions/analytics.ts +97 -0
- package/functions/api.ts +143 -0
- package/functions/auth.ts +208 -0
- package/functions/billing/payments.ts +149 -0
- package/functions/blog.ts +120 -0
- package/functions/cms/categorizables.ts +107 -0
- package/functions/cms/pages.ts +108 -0
- package/functions/cms/posts.ts +100 -0
- package/functions/cms/taggables.ts +102 -0
- package/functions/commerce/coupons.ts +128 -0
- package/functions/commerce/customers.ts +128 -0
- package/functions/commerce/gift-cards.ts +119 -0
- package/functions/commerce/orders.ts +112 -0
- package/functions/commerce/payments.ts +119 -0
- package/functions/commerce/products/categories.ts +123 -0
- package/functions/commerce/products/manufacturers.ts +123 -0
- package/functions/commerce/products/products.ts +123 -0
- package/functions/commerce/products/reviews.ts +123 -0
- package/functions/commerce/products/units.ts +123 -0
- package/functions/commerce/products/variants.ts +123 -0
- package/functions/commerce/shippings/delivery-routes.ts +123 -0
- package/functions/commerce/shippings/digital-deliveries.ts +119 -0
- package/functions/commerce/shippings/drivers.ts +123 -0
- package/functions/commerce/shippings/license-keys.ts +123 -0
- package/functions/commerce/shippings/shipping-methods.ts +123 -0
- package/functions/commerce/shippings/shipping-rates.ts +119 -0
- package/functions/commerce/shippings/shipping-zones.ts +119 -0
- package/functions/commerce/taxes.ts +119 -0
- package/functions/commerce/waitlist/products.ts +123 -0
- package/functions/commerce/waitlist/restaurants.ts +123 -0
- package/functions/craft.ts +107 -0
- package/functions/dashboard.ts +153 -0
- package/functions/inbox.ts +95 -0
- package/functions/jobs.ts +86 -0
- package/functions/monitoring/errors.ts +295 -0
- package/functions/queue.ts +111 -0
- package/functions/realtime/websockets.ts +96 -0
- package/functions/realtime.ts +52 -0
- package/functions/releases.ts +49 -0
- package/functions/search.ts +126 -0
- package/functions/toasts.ts +95 -0
- package/functions/uploads.ts +216 -0
- package/ide/.gitignore +4 -0
- package/ide/cursor/rules/auto-imports.mdc +574 -0
- package/ide/cursor/rules/code-style.mdc +12 -0
- package/ide/cursor/rules/documentation.mdc +9 -0
- package/ide/cursor/rules/error-handling-validation.mdc +11 -0
- package/ide/cursor/rules/key-conventions.mdc +11 -0
- package/ide/cursor/rules/project-structure.mdc +169 -0
- package/ide/cursor/rules/readme.mdc +318 -0
- package/ide/cursor/rules/syntax-formatting.mdc +9 -0
- package/ide/cursor/rules/testing.mdc +10 -0
- package/ide/cursor/rules/typescript.mdc +9 -0
- package/ide/cursor/rules/ui-styling.mdc +0 -0
- package/ide/dictionary.txt +397 -0
- package/ide/jetbrains/.fleet/settings.json +4 -0
- package/ide/jetbrains/.idea/.gitignore +5 -0
- package/ide/jetbrains/.idea/.name +1 -0
- package/ide/jetbrains/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/ide/jetbrains/.idea/jsLinters/eslint.xml +7 -0
- package/ide/jetbrains/.idea/modules.xml +8 -0
- package/ide/jetbrains/.idea/stacks.iml +22 -0
- package/ide/jetbrains/.idea/vcs.xml +6 -0
- package/ide/jetbrains/.idea/webResources.xml +14 -0
- package/ide/jetbrains/IntelliJ IDEA Global Settings +0 -0
- package/ide/jetbrains/installed.txt +4 -0
- package/ide/jetbrains/options/github-copilot.xml +5 -0
- package/ide/jetbrains/options/nodejs.xml +7 -0
- package/ide/jetbrains/options/templates.xml +124 -0
- package/ide/jetbrains/templates/JavaScript.xml +6 -0
- package/ide/jetbrains/templates/Stacks.xml +8 -0
- package/ide/vscode/.vscode/README.md +23 -0
- package/ide/vscode/.vscode/extensions.json +5 -0
- package/ide/vscode/.vscode/settings.json +176 -0
- package/ide/vscode/.vscode/stacks.code-snippets +181 -0
- package/ide/vscode/LICENSE.md +21 -0
- package/ide/vscode/README.md +36 -0
- package/ide/vscode/logo.png +0 -0
- package/ide/vscode/package.json +79 -0
- package/ide/zed/.zed/settings.json +139 -0
- package/lang/README.md +28 -0
- package/lang/de.yml +14 -0
- package/lang/en.yml +15 -0
- package/package.json +19 -3
- package/project/bootstrap +161 -0
- package/project/buddy +175 -0
- package/project/storage/framework/tsconfig.app.json +50 -0
- package/project/storage/framework/tsconfig.base.json +58 -0
- package/routes/core.ts +78 -0
- package/routes/dashboard-api.ts +233 -0
- package/routes/dashboard.ts +739 -0
- package/routes/email.ts +129 -0
- package/stores/[name].stx +16 -0
- package/stores/git.ts +71 -0
- package/stores/payment.ts +474 -0
- package/stores/queue.ts +43 -0
- package/stores/user.ts +29 -0
- package/stx-components-plugin.ts +25 -0
- package/styles/design-tokens.css +597 -0
- package/types/dashboard.ts +70 -0
- package/types/defaults.ts +438 -0
- package/vcs/github/CODE_OF_CONDUCT.md +83 -0
- package/vcs/github/CONTRIBUTING.md +187 -0
- package/vcs/github/EXPLANATIONS.md +41 -0
- package/vcs/github/FUNDING.yml +1 -0
- package/vcs/github/ISSUE_TEMPLATE/bug_report.yml +49 -0
- package/vcs/github/ISSUE_TEMPLATE/config.yml +10 -0
- package/vcs/github/ISSUE_TEMPLATE/feature_request.yml +44 -0
- package/vcs/github/SECURITY.md +70 -0
- package/vcs/github/renovate.json +5 -0
- package/vcs/github/stale.yml +14 -0
- package/vcs/github/workflows/README.md +16 -0
- package/vcs/github/workflows/ci.yml +114 -0
- package/vcs/github/workflows/export-size.yml +25 -0
- package/vcs/github/workflows/labeler.yml +13 -0
- package/vcs/github/workflows/release.yml +219 -0
- package/views/[...all].stx +8 -0
- package/views/about.md +3 -0
- package/views/auth/login.stx +1 -0
- package/views/auth/signup.stx +85 -0
- package/views/dashboard/.discovered-models.json +542 -0
- package/views/dashboard/AUDIT.md +904 -0
- package/views/dashboard/[...all].stx +89 -0
- package/views/dashboard/access-tokens/index.stx +177 -0
- package/views/dashboard/actions/index.stx +129 -0
- package/views/dashboard/analytics/blog/index.stx +356 -0
- package/views/dashboard/analytics/browsers/index.stx +263 -0
- package/views/dashboard/analytics/commerce/sales/index.stx +329 -0
- package/views/dashboard/analytics/commerce/web/index.stx +379 -0
- package/views/dashboard/analytics/countries/index.stx +289 -0
- package/views/dashboard/analytics/devices/index.stx +305 -0
- package/views/dashboard/analytics/events/index.stx +536 -0
- package/views/dashboard/analytics/index.stx +88 -0
- package/views/dashboard/analytics/marketing/index.stx +315 -0
- package/views/dashboard/analytics/pages/index.stx +271 -0
- package/views/dashboard/analytics/referrers/index.stx +319 -0
- package/views/dashboard/analytics/web/index.stx +356 -0
- package/views/dashboard/buddy/index.stx +198 -0
- package/views/dashboard/ci/index.stx +462 -0
- package/views/dashboard/cloud/index.stx +452 -0
- package/views/dashboard/commands/index.stx +295 -0
- package/views/dashboard/commerce/categories/index.stx +406 -0
- package/views/dashboard/commerce/coupons/index.stx +485 -0
- package/views/dashboard/commerce/customers/index.stx +410 -0
- package/views/dashboard/commerce/dashboard/index.stx +287 -0
- package/views/dashboard/commerce/delivery/delivery-routes.stx +305 -0
- package/views/dashboard/commerce/delivery/digital-delivery.stx +332 -0
- package/views/dashboard/commerce/delivery/drivers.stx +397 -0
- package/views/dashboard/commerce/delivery/index.stx +18 -0
- package/views/dashboard/commerce/delivery/license-keys.stx +380 -0
- package/views/dashboard/commerce/delivery/shipping-methods.stx +346 -0
- package/views/dashboard/commerce/delivery/shipping-rates.stx +338 -0
- package/views/dashboard/commerce/delivery/shipping-zones.stx +302 -0
- package/views/dashboard/commerce/delivery/tabs.ts +25 -0
- package/views/dashboard/commerce/gift-cards/index.stx +561 -0
- package/views/dashboard/commerce/manufacturers/index.stx +308 -0
- package/views/dashboard/commerce/orders/index.stx +247 -0
- package/views/dashboard/commerce/payments/index.stx +535 -0
- package/views/dashboard/commerce/pos/index.stx +653 -0
- package/views/dashboard/commerce/printers/devices/index.stx +273 -0
- package/views/dashboard/commerce/printers/receipts/index.stx +308 -0
- package/views/dashboard/commerce/products/detail.stx +563 -0
- package/views/dashboard/commerce/products/index.stx +370 -0
- package/views/dashboard/commerce/reviews/index.stx +656 -0
- package/views/dashboard/commerce/reviews/index.ts +0 -0
- package/views/dashboard/commerce/taxes/index.stx +377 -0
- package/views/dashboard/commerce/units/index.stx +317 -0
- package/views/dashboard/commerce/variants/index.stx +319 -0
- package/views/dashboard/commerce/waitlist/products.stx +942 -0
- package/views/dashboard/commerce/waitlist/restaurant.stx +1024 -0
- package/views/dashboard/components/index.stx +330 -0
- package/views/dashboard/composables/index.ts +19 -0
- package/views/dashboard/composables/useChart.ts +77 -0
- package/views/dashboard/composables/useNavigation.ts +99 -0
- package/views/dashboard/composables/useRole.ts +58 -0
- package/views/dashboard/composables/useTheme.ts +74 -0
- package/views/dashboard/content/authors/index.stx +171 -0
- package/views/dashboard/content/blog/index.stx +493 -0
- package/views/dashboard/content/categories/index.stx +169 -0
- package/views/dashboard/content/comments/index.stx +189 -0
- package/views/dashboard/content/dashboard.stx +383 -0
- package/views/dashboard/content/files/index.stx +706 -0
- package/views/dashboard/content/pages/index.stx +174 -0
- package/views/dashboard/content/posts/index.stx +269 -0
- package/views/dashboard/content/seo/index.stx +240 -0
- package/views/dashboard/content/tags/index.stx +167 -0
- package/views/dashboard/data/activity/index.stx +261 -0
- package/views/dashboard/data/dashboard/index.stx +116 -0
- package/views/dashboard/data/subscribers.stx +270 -0
- package/views/dashboard/data/teams.stx +275 -0
- package/views/dashboard/data/users.stx +279 -0
- package/views/dashboard/dependencies/index.stx +178 -0
- package/views/dashboard/deployments/[id].stx +234 -0
- package/views/dashboard/deployments/index.stx +9 -0
- package/views/dashboard/dns/index.stx +163 -0
- package/views/dashboard/environment/index.stx +283 -0
- package/views/dashboard/errors/index.stx +274 -0
- package/views/dashboard/forgot-password.stx +57 -0
- package/views/dashboard/functions/index.stx +159 -0
- package/views/dashboard/health/index.stx +248 -0
- package/views/dashboard/inbox/activity.stx +350 -0
- package/views/dashboard/inbox/index.stx +452 -0
- package/views/dashboard/inbox/settings.stx +290 -0
- package/views/dashboard/index.stx +252 -0
- package/views/dashboard/insights/index.stx +529 -0
- package/views/dashboard/jobs/[id].stx +430 -0
- package/views/dashboard/jobs/history.stx +222 -0
- package/views/dashboard/jobs/index.stx +214 -0
- package/views/dashboard/kanban/[id].stx +899 -0
- package/views/dashboard/kanban/index.stx +260 -0
- package/views/dashboard/layouts/default.stx +565 -0
- package/views/dashboard/layouts/guest.stx +10 -0
- package/views/dashboard/login.stx +48 -0
- package/views/dashboard/logs/index.stx +540 -0
- package/views/dashboard/mailboxes/index.stx +149 -0
- package/views/dashboard/management/permissions/index.stx +490 -0
- package/views/dashboard/marketing/campaigns/index.stx +604 -0
- package/views/dashboard/marketing/lists/index.stx +514 -0
- package/views/dashboard/marketing/reviews/index.stx +475 -0
- package/views/dashboard/marketing/social-posts/index.stx +560 -0
- package/views/dashboard/models/[model].stx +195 -0
- package/views/dashboard/models/index.stx +159 -0
- package/views/dashboard/monitoring/errors/index.stx +415 -0
- package/views/dashboard/notifications/dashboard.stx +383 -0
- package/views/dashboard/notifications/email.stx +336 -0
- package/views/dashboard/notifications/history.stx +373 -0
- package/views/dashboard/notifications/sms.stx +332 -0
- package/views/dashboard/packages/index.stx +195 -0
- package/views/dashboard/queries/[id].stx +381 -0
- package/views/dashboard/queries/history.stx +227 -0
- package/views/dashboard/queries/index.stx +335 -0
- package/views/dashboard/queries/slow.stx +318 -0
- package/views/dashboard/queue/index.stx +427 -0
- package/views/dashboard/realtime/index.stx +429 -0
- package/views/dashboard/register.stx +46 -0
- package/views/dashboard/releases/index.stx +389 -0
- package/views/dashboard/requests/index.stx +462 -0
- package/views/dashboard/serverless/index.stx +475 -0
- package/views/dashboard/servers/[id].stx +299 -0
- package/views/dashboard/servers/index.stx +483 -0
- package/views/dashboard/settings/billing.stx +50 -0
- package/views/dashboard/settings/index.stx +256 -0
- package/views/dashboard/settings/mail.stx +252 -0
- package/views/dashboard/stores/auth.ts +123 -0
- package/views/dashboard/stores/ci.ts +342 -0
- package/views/dashboard/stores/index.ts +129 -0
- package/views/dashboard/stores/kanban.ts +723 -0
- package/views/dashboard/stores/rbac.ts +350 -0
- package/views/dashboard/stx.config.ts +34 -0
- package/views/dashboard/teams/[id].stx +170 -0
- package/views/forum/category.stx +92 -0
- package/views/forum/index.stx +209 -0
- package/views/forum/new-topic.stx +113 -0
- package/views/forum/profile.stx +1 -0
- package/views/forum/topic.stx +143 -0
- package/views/hello-world/[name].stx +47 -0
- package/views/index.stx +21 -0
- package/views/system-tray/index.stx +147 -0
|
@@ -0,0 +1,676 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stacks-buddy
|
|
3
|
+
description: Use when working with the Stacks CLI (buddy/bud/stacks/stx) — understanding all 50+ commands with their flags and options, adding custom commands, the make:* scaffolding commands, development server commands, build commands, deployment commands, email/mail commands, environment management, or domain/DNS commands. Covers @stacksjs/buddy and all CLI command files.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Bun >= 1.3.0, TypeScript
|
|
6
|
+
allowed-tools: Read Edit Write Bash Grep Glob
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Stacks Buddy CLI
|
|
10
|
+
|
|
11
|
+
The complete CLI runtime for the Stacks framework with 50+ commands, lazy-loaded for fast cold starts.
|
|
12
|
+
|
|
13
|
+
## Key Paths
|
|
14
|
+
- Core package: `storage/framework/core/buddy/src/`
|
|
15
|
+
- CLI entry point: `storage/framework/core/buddy/src/cli.ts`
|
|
16
|
+
- Commands directory: `storage/framework/core/buddy/src/commands/`
|
|
17
|
+
- Lazy command registry: `storage/framework/core/buddy/src/lazy-commands.ts`
|
|
18
|
+
- Config system: `storage/framework/core/buddy/src/config.ts`
|
|
19
|
+
- Shell entry: `buddy` (shell script at project root that invokes `bun run ./storage/framework/core/buddy/src/cli.ts`)
|
|
20
|
+
- Application commands: `app/Commands/`
|
|
21
|
+
- Command registry: `app/Commands.ts`
|
|
22
|
+
- Make templates: `storage/framework/defaults/`
|
|
23
|
+
|
|
24
|
+
## CLI Aliases
|
|
25
|
+
All invoke the same CLI: `./buddy`, `bud`, `stacks`, `stx`
|
|
26
|
+
|
|
27
|
+
## Architecture
|
|
28
|
+
|
|
29
|
+
### Lazy Loading System
|
|
30
|
+
Commands are lazy-loaded for performance. The `lazy-commands.ts` file maps command names to their file paths and export names. When a command is invoked, only that command's module is loaded.
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
// lazy-commands.ts registry structure
|
|
34
|
+
const commandRegistry: Record<string, CommandLoader> = {
|
|
35
|
+
'about': { path: './commands/about.ts', exportName: 'about' },
|
|
36
|
+
'build': { path: './commands/build.ts', exportName: 'build' },
|
|
37
|
+
// ... 40+ more entries
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Key functions:
|
|
42
|
+
- `loadCommand(name, buddy)` - Load a single command lazily
|
|
43
|
+
- `loadCommands(names, buddy)` - Load multiple commands with 5-second timeout per command
|
|
44
|
+
- `loadCommandGroup(groupName, buddy)` - Load related commands ('development', 'database', 'scaffolding', 'deployment', 'info')
|
|
45
|
+
- `loadAllCommands(buddy)` - Load all commands (for interactive mode or `list` command)
|
|
46
|
+
- `getCommandsToLoad(args)` - Determine which commands to load based on CLI arguments
|
|
47
|
+
- `getCommandNames()` - Get all command names without loading them (for autocomplete)
|
|
48
|
+
|
|
49
|
+
Command groups defined in lazy-commands.ts:
|
|
50
|
+
- `minimal`: version, help
|
|
51
|
+
- `development`: dev, build, test, lint
|
|
52
|
+
- `database`: migrate, seed, fresh
|
|
53
|
+
- `scaffolding`: make, generate
|
|
54
|
+
- `deployment`: deploy, release, cloud
|
|
55
|
+
- `info`: about, doctor, list
|
|
56
|
+
|
|
57
|
+
### Startup Flow (cli.ts)
|
|
58
|
+
1. Parse args to determine requested command
|
|
59
|
+
2. Skip expensive setup for minimal commands (--version, --help, help, version)
|
|
60
|
+
3. For full commands: load setup + key commands, check APP_KEY, load lazy commands, load user commands from `app/Commands/`
|
|
61
|
+
4. For no arguments with interactive TTY: show interactive menu with select prompt
|
|
62
|
+
5. Parse and execute
|
|
63
|
+
|
|
64
|
+
### Commands that skip APP_KEY check
|
|
65
|
+
`build`, `lint`, `lint:fix`, `test`, `test:types`, `test:unit`, `test:feature`, `typecheck`, `types:fix`, `types:generate`, `clean`, `fresh`, `about`, `doctor`, `setup`, `setup:ai`, `setup:ssl`, `setup:oh-my-zsh`, `deploy`
|
|
66
|
+
|
|
67
|
+
### buddy.config.ts Support
|
|
68
|
+
Optional config file at project root. Validated with `validateConfig()`. Supports:
|
|
69
|
+
```typescript
|
|
70
|
+
interface BuddyConfig {
|
|
71
|
+
theme?: 'default' | 'dracula' | 'nord' | 'solarized' | 'monokai'
|
|
72
|
+
emoji?: boolean
|
|
73
|
+
commands?: Array<(cli: CLI) => void>
|
|
74
|
+
defaultFlags?: { verbose?: boolean, quiet?: boolean, debug?: boolean }
|
|
75
|
+
aliases?: Record<string, string> // e.g. { 'r': 'release' }
|
|
76
|
+
plugins?: Array<BuddyPlugin | string>
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Config files searched in order: `buddy.config.ts`, `buddy.config.js`, `.buddy.config.ts`, `.buddy.config.js`
|
|
81
|
+
|
|
82
|
+
### Plugin System
|
|
83
|
+
Plugins can register commands, add hooks (beforeCommand/afterCommand):
|
|
84
|
+
```typescript
|
|
85
|
+
interface BuddyPlugin {
|
|
86
|
+
name: string
|
|
87
|
+
version?: string
|
|
88
|
+
setup: (cli: CLI) => void | Promise<void>
|
|
89
|
+
hooks?: {
|
|
90
|
+
beforeCommand?: (context: any) => void | Promise<void>
|
|
91
|
+
afterCommand?: (context: any) => void | Promise<void>
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Interactive Mode
|
|
97
|
+
When buddy is invoked with no arguments on an interactive TTY, it shows a select menu:
|
|
98
|
+
- Start development server
|
|
99
|
+
- Build for production
|
|
100
|
+
- Run tests
|
|
101
|
+
- List all commands
|
|
102
|
+
- Run health checks
|
|
103
|
+
- Show system information
|
|
104
|
+
- Show help
|
|
105
|
+
- Exit
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Development Commands
|
|
110
|
+
|
|
111
|
+
### `buddy dev [server]` - Start development server(s)
|
|
112
|
+
```bash
|
|
113
|
+
buddy dev # start ALL dev servers (frontend, API, docs, dashboard) + reverse proxy
|
|
114
|
+
buddy dev frontend # frontend only (positional arg)
|
|
115
|
+
buddy dev api # API only
|
|
116
|
+
buddy dev docs # documentation only
|
|
117
|
+
buddy dev dashboard # dashboard only
|
|
118
|
+
buddy dev desktop # desktop only
|
|
119
|
+
buddy dev system-tray # system tray only
|
|
120
|
+
buddy dev -f/--frontend # frontend only (flag)
|
|
121
|
+
buddy dev -a/--api # API only
|
|
122
|
+
buddy dev -c/--components # components dev server
|
|
123
|
+
buddy dev -d/--dashboard # dashboard only
|
|
124
|
+
buddy dev -k/--desktop # desktop only
|
|
125
|
+
buddy dev -o/--docs # docs only
|
|
126
|
+
buddy dev -s/--system-tray # system tray only
|
|
127
|
+
buddy dev -i/--interactive # interactive server selection menu
|
|
128
|
+
buddy dev -l/--with-localhost # include localhost URL in output
|
|
129
|
+
buddy dev -p/--project [name]
|
|
130
|
+
buddy dev --verbose
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Sub-commands with aliases:
|
|
134
|
+
```bash
|
|
135
|
+
buddy dev:components # component library dev server
|
|
136
|
+
buddy dev:docs # documentation dev server
|
|
137
|
+
buddy dev:desktop # desktop app dev server
|
|
138
|
+
buddy dev:api # API dev server
|
|
139
|
+
buddy dev:frontend # frontend dev server (aliases: dev:pages, dev:views)
|
|
140
|
+
buddy dev:dashboard # dashboard dev server (alias: dev:admin)
|
|
141
|
+
buddy dev:system-tray # system tray dev server (alias: dev:tray)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
When running `buddy dev` with no flags (all servers), it:
|
|
145
|
+
1. Prints Vite-style output showing all server URLs
|
|
146
|
+
2. Sets `STACKS_PROXY_MANAGED=1` env var
|
|
147
|
+
3. Starts frontend, API, docs, dashboard servers in parallel
|
|
148
|
+
4. If APP_URL has a custom domain, starts reverse proxy (rpx) for HTTPS with subdomains
|
|
149
|
+
5. Uses environment variables: `PORT` (default 3000), `PORT_API` (3008), `PORT_DOCS` (3006), `PORT_ADMIN` (3002)
|
|
150
|
+
6. Cleans up child processes on SIGINT/SIGTERM via `process.kill(0, 'SIGKILL')`
|
|
151
|
+
|
|
152
|
+
Reverse proxy (rpx):
|
|
153
|
+
- Proxies `localhost:PORT -> domain`, `localhost:PORT_API -> api.domain`, etc.
|
|
154
|
+
- SSL certs stored at `~/.stacks/ssl/`
|
|
155
|
+
- Only starts when APP_URL is set to a custom domain (not localhost)
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Build Commands
|
|
160
|
+
|
|
161
|
+
### `buddy build [type]` - Build for production
|
|
162
|
+
```bash
|
|
163
|
+
buddy build # defaults to building stacks framework
|
|
164
|
+
buddy build components # positional: component library
|
|
165
|
+
buddy build vue # Vue components
|
|
166
|
+
buddy build web-components # web components
|
|
167
|
+
buddy build functions # function library
|
|
168
|
+
buddy build views # frontend views
|
|
169
|
+
buddy build docs # documentation
|
|
170
|
+
buddy build buddy # CLI binary
|
|
171
|
+
buddy build cli # CLI binary (alias for buddy)
|
|
172
|
+
buddy build stacks # framework
|
|
173
|
+
buddy build server # Docker image
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Flags:
|
|
177
|
+
```bash
|
|
178
|
+
buddy build -c/--components # component library (Vue + Web Components)
|
|
179
|
+
buddy build -w/--web-components # web component library only
|
|
180
|
+
buddy build -f/--functions # function library
|
|
181
|
+
buddy build -p/--views/--pages # frontend views
|
|
182
|
+
buddy build -d/--docs # documentation site
|
|
183
|
+
buddy build -b/--buddy # CLI binary
|
|
184
|
+
buddy build -s/--stacks # framework core
|
|
185
|
+
buddy build --server # Docker image
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Sub-commands with aliases:
|
|
189
|
+
```bash
|
|
190
|
+
buddy build:components # component libraries (alias: prod:components)
|
|
191
|
+
buddy build:cli # CLI binary (alias: prod:cli)
|
|
192
|
+
buddy build:server # Docker image (aliases: prod:server, build:docker)
|
|
193
|
+
buddy build:functions # function library
|
|
194
|
+
buddy build:web-components # web components (aliases: build:wc, prod:web-components, prod:wc)
|
|
195
|
+
buddy build:docs # documentation (aliases: prod:docs, build:documentation, prod:documentation)
|
|
196
|
+
buddy build:core # Stacks core packages
|
|
197
|
+
buddy build:desktop # desktop application (alias: prod:desktop)
|
|
198
|
+
buddy build:stacks # Stacks framework
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Database Commands
|
|
204
|
+
|
|
205
|
+
### `buddy migrate` - Run database migrations
|
|
206
|
+
```bash
|
|
207
|
+
buddy migrate # run pending migrations (alias: db:migrate)
|
|
208
|
+
buddy migrate -d/--diff # show SQL that would be run without executing
|
|
209
|
+
buddy migrate -a/--auth # also migrate auth tables (oauth_clients, oauth_access_tokens, etc.)
|
|
210
|
+
buddy migrate --verbose
|
|
211
|
+
|
|
212
|
+
buddy migrate:fresh # drop all tables and re-migrate (alias: db:fresh)
|
|
213
|
+
buddy migrate:fresh -s/--seed # seed after fresh migration
|
|
214
|
+
buddy migrate:fresh -a/--auth # include auth tables
|
|
215
|
+
buddy migrate:fresh -d/--diff # show SQL without running
|
|
216
|
+
|
|
217
|
+
buddy migrate:dns # DNS migration for APP_URL domain
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Both `migrate` and `migrate:fresh` validate that models exist in `app/Models` or `storage/framework/defaults/app/Models` before running.
|
|
221
|
+
|
|
222
|
+
### `buddy seed` - Seed database
|
|
223
|
+
```bash
|
|
224
|
+
buddy seed # seed database (alias: db:seed)
|
|
225
|
+
buddy seed --verbose
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Code Generation (make:*)
|
|
231
|
+
|
|
232
|
+
### `buddy make [type]` - Scaffolding commands
|
|
233
|
+
|
|
234
|
+
All make commands accept `-n/--name [name]` and `--verbose` flags.
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
buddy make:action [name] # create action in app/Actions/
|
|
238
|
+
buddy make:certificate # generate SSL certificate (alias: make:cert)
|
|
239
|
+
buddy make:command [name] # create CLI command in app/Commands/
|
|
240
|
+
--signature [sig] # CLI command name
|
|
241
|
+
--description [desc] # command description
|
|
242
|
+
--no-register # skip registering in Commands.ts
|
|
243
|
+
buddy make:component [name] # create STX component
|
|
244
|
+
buddy make:database [name] # create database
|
|
245
|
+
buddy make:factory [name] # create model factory (stub)
|
|
246
|
+
buddy make:function [name] # create composable function
|
|
247
|
+
buddy make:job [name] # create background job
|
|
248
|
+
-q/--queue [queue] # queue name (default: 'default')
|
|
249
|
+
-c/--class # class-based job
|
|
250
|
+
-t/--tries [n] # retry attempts (default: 3)
|
|
251
|
+
-b/--backoff [n] # backoff delay in seconds (default: 3)
|
|
252
|
+
buddy make:lang [name] # create i18n language file
|
|
253
|
+
buddy make:migration [name] # create database migration
|
|
254
|
+
buddy make:model [name] # create data model
|
|
255
|
+
buddy make:notification [name]# create notification
|
|
256
|
+
-e/--email # email notification (default: true)
|
|
257
|
+
-c/--chat # chat notification
|
|
258
|
+
-s/--sms # SMS notification
|
|
259
|
+
buddy make:policy [name] # create authorization policy
|
|
260
|
+
-m/--model [model] # associated model
|
|
261
|
+
--no-register # skip registering in Gates.ts
|
|
262
|
+
buddy make:resource [name] # create API resource
|
|
263
|
+
-m/--model [model] # associated model
|
|
264
|
+
-c/--collection # create collection resource
|
|
265
|
+
buddy make:queue-table # create queue migration
|
|
266
|
+
buddy make:stack [name] # create full stack
|
|
267
|
+
buddy make:view [name] # create page/view (alias: make:page)
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Browser extensions
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
buddy extension:init
|
|
274
|
+
# Chrome + Firefox + Safari starter, including a universal Safari Xcode app
|
|
275
|
+
|
|
276
|
+
buddy extension:init --target safari --name "My Extension" \
|
|
277
|
+
--bundle-id com.example.MyExtension --team-id TEAM123456 --platform all
|
|
278
|
+
buddy extension:build
|
|
279
|
+
buddy extension:safari:app --platform all --signed
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
`extension:init` defaults to all three browser targets. Generated views,
|
|
283
|
+
scripts, and partials follow the standard `resources/` layout. Selecting Safari
|
|
284
|
+
also scaffolds the macOS, iPhone, and iPad container project in the same step.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Code Generation (generate)
|
|
289
|
+
|
|
290
|
+
### `buddy generate` - Generate artifacts
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
buddy generate # all artifacts (if no flags, runs invoke)
|
|
294
|
+
buddy generate -t/--types # TypeScript types
|
|
295
|
+
buddy generate -e/--entries # library entry points
|
|
296
|
+
buddy generate -w/--web-types # web-types.json for IDEs
|
|
297
|
+
buddy generate -c/--custom-data # VS Code custom data
|
|
298
|
+
buddy generate -i/--ide-helpers # IDE helpers
|
|
299
|
+
buddy generate -c/--component-meta # component meta information
|
|
300
|
+
buddy generate -p/--pantry # pantry config
|
|
301
|
+
buddy generate -o/--openapi # OpenAPI specification
|
|
302
|
+
buddy generate --core-symlink # core framework symlink
|
|
303
|
+
|
|
304
|
+
buddy generate:types # TypeScript types (alias: types:generate)
|
|
305
|
+
buddy generate:entries # library entry points
|
|
306
|
+
buddy generate:web-types # web-types.json
|
|
307
|
+
buddy generate:vscode-custom-data # VS Code custom data
|
|
308
|
+
buddy generate:ide-helpers # IDE helpers
|
|
309
|
+
buddy generate:component-meta # component meta
|
|
310
|
+
buddy generate:pantry-config # pantry config
|
|
311
|
+
buddy generate:openapi-spec # OpenAPI spec (alias: generate:openapi)
|
|
312
|
+
buddy generate:migrations # migration diffs from models (stub)
|
|
313
|
+
buddy generate:core-symlink # core symlink for core developers
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Environment Management
|
|
319
|
+
|
|
320
|
+
### `buddy env:*` - Manage environment variables
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
buddy env:get [key] # get specific env var
|
|
324
|
+
-f/--file [file] # env file path (default: .env)
|
|
325
|
+
--format [json|shell|eval] # output format (default: json)
|
|
326
|
+
-a/--all # get all env vars
|
|
327
|
+
-p/--pretty # pretty print
|
|
328
|
+
buddy env:set [key] [value] # set env var
|
|
329
|
+
-f/--file [file] # env file path
|
|
330
|
+
-fk/--file-keys [path] # keys file path
|
|
331
|
+
--plain # don't encrypt the value
|
|
332
|
+
buddy env:encrypt [key] # encrypt env var(s)
|
|
333
|
+
-f/--file [file] # env file path
|
|
334
|
+
-fk/--file-keys [path] # keys file path
|
|
335
|
+
-o/--stdout # output to stdout
|
|
336
|
+
-ek/--exclude-key [key] # key to exclude from encryption
|
|
337
|
+
buddy env:decrypt [key] # decrypt env var(s)
|
|
338
|
+
-f/--file [file] # env file path
|
|
339
|
+
-fk/--file-keys [path] # keys file path
|
|
340
|
+
-o/--stdout # output to stdout
|
|
341
|
+
buddy env:keypair [key] # generate encryption keypair
|
|
342
|
+
-f/--file [file] # env file path
|
|
343
|
+
--format [json|shell] # output format (default: json)
|
|
344
|
+
buddy env:rotate [key] # rotate encryption keys
|
|
345
|
+
-f/--file [file] # env file path
|
|
346
|
+
-ek/--exclude-key [key] # key to exclude
|
|
347
|
+
-o/--stdout # output to stdout
|
|
348
|
+
buddy env:check # validate environment configuration
|
|
349
|
+
-f/--file [file] # env file path
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
`env:check` validates: .env file exists, variable count, APP_KEY presence, encryption keys (DOTENV_PUBLIC_KEY/DOTENV_PRIVATE_KEY), .env.keys file.
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## Cloud & Deployment
|
|
357
|
+
|
|
358
|
+
### `buddy deploy` - Deploy to cloud
|
|
359
|
+
Handles full deployment workflow: prerequisites check, pantry install, env setup, APP_KEY, AWS credentials (from .env.{env} or ~/.aws/credentials), domain setup, email DNS records (DKIM, MX, SPF, DMARC), mail user creation.
|
|
360
|
+
|
|
361
|
+
### `buddy cloud` - Cloud management
|
|
362
|
+
```bash
|
|
363
|
+
buddy cloud --ssh # SSH into cloud via SSM (alias: --connect)
|
|
364
|
+
buddy cloud --diff # show infrastructure changes (local vs deployed CloudFormation template)
|
|
365
|
+
buddy cloud --invalidate-cache # invalidate CloudFront CDN cache
|
|
366
|
+
--paths [paths] # specific paths to invalidate (default: /*)
|
|
367
|
+
|
|
368
|
+
buddy cloud:add --jump-box # add jump box EC2 instance
|
|
369
|
+
buddy cloud:remove # remove cloud infrastructure (aliases: cloud:destroy, cloud:rm, undeploy)
|
|
370
|
+
--jump-box # remove just the jump-box
|
|
371
|
+
--force # force deletion
|
|
372
|
+
--yes # skip confirmation
|
|
373
|
+
buddy cloud:optimize-cost # remove optional resources (jump-box)
|
|
374
|
+
buddy cloud:cleanup # clean up retained resources after stack deletion
|
|
375
|
+
# Cleans: jump-boxes, S3 buckets, Lambda functions, CloudWatch logs,
|
|
376
|
+
# Parameter Store, VPCs, Subnets, CDK remnants, IAM users
|
|
377
|
+
buddy cloud:invalidate-cache # invalidate CloudFront cache
|
|
378
|
+
--paths [paths] # paths to invalidate
|
|
379
|
+
buddy cloud:diff # show deployed vs local template diff
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
`cloud:remove` uses `undeployStack()` from `storage/framework/core/actions/src/deploy` and handles stuck stacks by creating temporary IAM roles.
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Domain & DNS
|
|
387
|
+
|
|
388
|
+
### `buddy domains:*` - Domain management
|
|
389
|
+
```bash
|
|
390
|
+
buddy domains:purchase <domain> # purchase via Route 53
|
|
391
|
+
--years <n> # registration years (default: 1)
|
|
392
|
+
--privacy # privacy protection (default: true)
|
|
393
|
+
--auto-renew # auto-renew (default: true)
|
|
394
|
+
--first-name/--last-name/etc. # registrant contact (reads from config.dns.contactInfo)
|
|
395
|
+
--admin-*/--tech-* # admin/tech contact overrides
|
|
396
|
+
--privacy-admin/--privacy-tech/--privacy-registrant
|
|
397
|
+
--contact-type <type> # default: 'person'
|
|
398
|
+
buddy domains:add <domain> # add domain you own to cloud
|
|
399
|
+
buddy domains:remove <domain> # remove domain from cloud
|
|
400
|
+
--yes # skip confirmation
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### `buddy dns [domain]` - DNS query tool (uses @stacksjs/dnsx)
|
|
404
|
+
```bash
|
|
405
|
+
buddy dns [domain] # query DNS (defaults to APP_URL)
|
|
406
|
+
buddy dns -q/--query <query> # host to query
|
|
407
|
+
buddy dns -t/--type <type> # record type: A, MX, NS, etc. (default: A)
|
|
408
|
+
buddy dns -n/--nameserver <ns> # custom nameserver
|
|
409
|
+
buddy dns --class <class> # network class: IN, CH, HS
|
|
410
|
+
buddy dns -U/--udp # DNS over UDP
|
|
411
|
+
buddy dns -T/--tcp # DNS over TCP
|
|
412
|
+
buddy dns -S/--tls # DNS over TLS
|
|
413
|
+
buddy dns -H/--https # DNS over HTTPS
|
|
414
|
+
buddy dns -1/--short # short mode
|
|
415
|
+
buddy dns -J/--json # JSON output
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## Email / Mail Commands
|
|
421
|
+
|
|
422
|
+
### `buddy email:*` - Email management (SES/S3 based)
|
|
423
|
+
```bash
|
|
424
|
+
buddy email # list available email commands
|
|
425
|
+
buddy email:verify # check SES domain verification, show DKIM records
|
|
426
|
+
buddy email:test [recipient] # send test email via SES
|
|
427
|
+
buddy email:list # list configured mailboxes from config/email.ts
|
|
428
|
+
buddy email:logs # view CloudWatch email processing logs
|
|
429
|
+
-n/--lines <count> # number of log lines (default: 20)
|
|
430
|
+
buddy email:status # show email server deployment status via CloudFormation
|
|
431
|
+
buddy email:inbox [mailbox] # view inbox emails from S3 bucket
|
|
432
|
+
-n/--limit <count> # number of emails (default: 20)
|
|
433
|
+
--raw <id> # show raw .eml content
|
|
434
|
+
--bucket <name> # S3 bucket override
|
|
435
|
+
buddy email:reprocess # reprocess raw emails from S3 into mailbox structure
|
|
436
|
+
--bucket <name> # S3 bucket override
|
|
437
|
+
--prefix <prefix> # S3 prefix (default: inbox/)
|
|
438
|
+
--domain <domain> # email domain (default: stacksjs.com)
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Email inbox reads from S3 in two strategies:
|
|
442
|
+
1. `mailboxes/{domain}/{user}/inbox.json` (processed inbox)
|
|
443
|
+
2. Falls back to raw emails in `inbox/` or `incoming/` prefixes
|
|
444
|
+
|
|
445
|
+
### `buddy mail:*` - Mail server management
|
|
446
|
+
```bash
|
|
447
|
+
buddy mail:user:add <email> # add mail user to DynamoDB
|
|
448
|
+
--password <password> # user password (auto-generated if not provided)
|
|
449
|
+
buddy mail:user:list # list all mail users from DynamoDB
|
|
450
|
+
buddy mail:user:delete <email> # delete mail user
|
|
451
|
+
buddy mail:proxy # start local IMAP proxy for Mail.app
|
|
452
|
+
--port <port> # IMAP proxy port (default: 1993)
|
|
453
|
+
--api <url> # mail API URL (auto-detected from CloudFormation)
|
|
454
|
+
buddy mail:test # test mail API connection
|
|
455
|
+
buddy mail:credentials [email] # show SMTP credentials
|
|
456
|
+
buddy mail:logs # show mail server logs from EC2 via SSM
|
|
457
|
+
-n/--lines <count> # number of lines (default: 50)
|
|
458
|
+
-f/--follow # follow log output (poll every 5s)
|
|
459
|
+
--filter <pattern> # filter by pattern (AUTH, LOGIN, error, etc.)
|
|
460
|
+
buddy mail:status # show mail server service/ports/memory via SSM
|
|
461
|
+
buddy mail:port25:request # request port 25 unblock
|
|
462
|
+
--provider <aws|hetzner> # cloud provider (default: aws)
|
|
463
|
+
--instance-id <id> # EC2 instance ID (auto-detected)
|
|
464
|
+
--elastic-ip <ip> # Elastic IP
|
|
465
|
+
--rdns <hostname> # reverse DNS hostname
|
|
466
|
+
--use-case <text> # use case description
|
|
467
|
+
buddy mail:port25:status # check outbound port 25 status
|
|
468
|
+
--provider <aws|hetzner> # cloud provider (default: aws)
|
|
469
|
+
buddy mail:server # start SMTP relay server
|
|
470
|
+
--port <port> # SMTP port (default: 587)
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
## Code Quality
|
|
476
|
+
|
|
477
|
+
### `buddy lint` - Lint codebase (uses pickier)
|
|
478
|
+
```bash
|
|
479
|
+
buddy lint # lint project (runs pickier in lint mode)
|
|
480
|
+
buddy lint -f/--fix # auto-fix lint errors
|
|
481
|
+
buddy lint:fix # auto-fix (standalone command)
|
|
482
|
+
buddy format # format code
|
|
483
|
+
-w/--write # write changes (default when no flags)
|
|
484
|
+
-c/--check # check formatting only
|
|
485
|
+
buddy format:check # check formatting without changes
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
Internal implementation: runs `bunx --bun pickier run --mode lint --config ./pickier.config.ts` (with `--fix` when requested).
|
|
489
|
+
|
|
490
|
+
### `buddy test` - Run test suite
|
|
491
|
+
```bash
|
|
492
|
+
buddy test # run all tests
|
|
493
|
+
buddy test -f/--feature # feature tests only
|
|
494
|
+
buddy test -u/--unit # unit tests only
|
|
495
|
+
buddy test:unit # unit tests (standalone)
|
|
496
|
+
buddy test:feature # feature tests (standalone)
|
|
497
|
+
buddy test:ui # tests in browser
|
|
498
|
+
buddy test:types # typecheck (alias: typecheck)
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
## Project Management
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
buddy fresh # reinstall dependencies
|
|
507
|
+
buddy install # install deps
|
|
508
|
+
buddy clean # remove node_modules
|
|
509
|
+
buddy outdated # check outdated deps
|
|
510
|
+
buddy add # add dependency
|
|
511
|
+
|
|
512
|
+
buddy upgrade # upgrade Stacks framework (alias: update)
|
|
513
|
+
-v/--version <version> # install specific version (e.g., 0.70.23)
|
|
514
|
+
--canary # upgrade to canary build
|
|
515
|
+
--stable # switch to stable release
|
|
516
|
+
-f/--force # force re-download
|
|
517
|
+
buddy upgrade:all # upgrade framework + dependencies + Bun + binary
|
|
518
|
+
buddy upgrade:dependencies # upgrade dependencies (alias: upgrade:deps)
|
|
519
|
+
buddy upgrade:bun # upgrade Bun runtime
|
|
520
|
+
buddy upgrade:shell # upgrade shell integration (Oh My Zsh)
|
|
521
|
+
buddy upgrade:binary # upgrade stacks binary (requires sudo)
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## Maintenance Mode
|
|
527
|
+
|
|
528
|
+
```bash
|
|
529
|
+
buddy down # put app in maintenance mode
|
|
530
|
+
--message [msg] # maintenance message
|
|
531
|
+
--retry [seconds] # retry-after header value
|
|
532
|
+
--secret [token] # bypass token (access via: your-app.com/{token})
|
|
533
|
+
--allow [ip...] # allowed IP addresses
|
|
534
|
+
--redirect [url] # redirect all requests
|
|
535
|
+
--status [code] # HTTP status code (default: 503)
|
|
536
|
+
buddy up # bring app out of maintenance mode
|
|
537
|
+
buddy status # check maintenance status (alias: maintenance:status)
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
Uses `@stacksjs/server` module's `down()`, `up()`, `isDownForMaintenance()`, `maintenancePayload()` functions.
|
|
541
|
+
|
|
542
|
+
---
|
|
543
|
+
|
|
544
|
+
## Other Commands
|
|
545
|
+
|
|
546
|
+
```bash
|
|
547
|
+
buddy about # display Stacks version, Bun/Node versions, OS, environment
|
|
548
|
+
buddy ai:context # compact deterministic project context for coding models
|
|
549
|
+
-J/--json # versioned machine-readable contract
|
|
550
|
+
-o/--output [path] # write to a file instead of stdout
|
|
551
|
+
--max-chars [characters] # prompt payload character budget (default: 4000)
|
|
552
|
+
--model [model] # model family for heuristic token estimates
|
|
553
|
+
buddy doctor # health checks (Bun version, Node, package.json, .env, APP_KEY)
|
|
554
|
+
buddy tinker # interactive REPL with Stacks preloaded
|
|
555
|
+
-e/--eval [expr] # evaluate expression and exit
|
|
556
|
+
--print [expr] # evaluate, print, and exit
|
|
557
|
+
--no-banner # skip welcome banner
|
|
558
|
+
--preload [modules] # comma-separated modules to preload
|
|
559
|
+
buddy key:generate # generate and set APP_KEY
|
|
560
|
+
buddy commit # conventional commit helper (uses runCommit from @stacksjs/actions)
|
|
561
|
+
buddy changelog # generate CHANGELOG.md
|
|
562
|
+
-q/--quiet # minimal output
|
|
563
|
+
-d/--dry-run # preview without writing
|
|
564
|
+
buddy release # release new version via GitHub Actions
|
|
565
|
+
--dry-run # preview without releasing
|
|
566
|
+
buddy route # route management
|
|
567
|
+
buddy share [type] # share local dev server via public tunnel (localtunnel)
|
|
568
|
+
-p/--port <port> # local port
|
|
569
|
+
--server <url> # tunnel server (default: api.localtunnel.dev)
|
|
570
|
+
--subdomain <name> # request specific subdomain
|
|
571
|
+
# Supports: frontend, api, backend, admin, dashboard, desktop, docs
|
|
572
|
+
# Auto-starts companion services (API, docs) for frontend shares
|
|
573
|
+
buddy search # search engine operations
|
|
574
|
+
buddy configure # configure project
|
|
575
|
+
buddy create # create new project
|
|
576
|
+
buddy completion [shell] # shell completion (bash/zsh/fish)
|
|
577
|
+
buddy ports # port management
|
|
578
|
+
-l/--list # list used ports (default)
|
|
579
|
+
-c/--check # check port availability
|
|
580
|
+
buddy ports:list # list ports for project
|
|
581
|
+
buddy ports:check # check ports across all Stacks projects
|
|
582
|
+
buddy setup # ensure project is set up correctly (alias: ensure)
|
|
583
|
+
--skip-aws # skip AWS configuration
|
|
584
|
+
--skip-keygen # skip APP_KEY generation
|
|
585
|
+
buddy setup:ai [provider] # wire up an AI coding agent (alias: ai:setup)
|
|
586
|
+
provider # claude | codex | cursor | copilot | gemini (prompts if omitted)
|
|
587
|
+
--copy # copy the agent files instead of symlinking them
|
|
588
|
+
--force # overwrite generated files (never AGENTS.md)
|
|
589
|
+
buddy setup:ssl # setup SSL certs + hosts file (alias: ssl:setup)
|
|
590
|
+
-d/--domain [domain] # custom domain (defaults to APP_URL)
|
|
591
|
+
--skip-hosts # skip hosts file modification
|
|
592
|
+
--skip-trust # skip certificate trust
|
|
593
|
+
buddy setup:oh-my-zsh # enable Oh My Zsh integration
|
|
594
|
+
buddy telemetry # telemetry management
|
|
595
|
+
buddy list # list all available commands
|
|
596
|
+
buddy version # display version (flags: --version, -v)
|
|
597
|
+
buddy saas # SaaS management
|
|
598
|
+
buddy sms # SMS commands
|
|
599
|
+
buddy phone # phone commands
|
|
600
|
+
buddy http # HTTP commands
|
|
601
|
+
buddy auth # auth commands
|
|
602
|
+
buddy queue # queue management
|
|
603
|
+
buddy schedule # schedule management
|
|
604
|
+
buddy package # package management
|
|
605
|
+
buddy projects # project management
|
|
606
|
+
buddy prepublish # pre-publish checks
|
|
607
|
+
buddy stacks # Stacks framework commands (registered as 'stack' in lazy-commands)
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
---
|
|
611
|
+
|
|
612
|
+
## Adding Custom Commands
|
|
613
|
+
|
|
614
|
+
### Method 1: Commands.ts Registry (preferred)
|
|
615
|
+
|
|
616
|
+
```typescript
|
|
617
|
+
// app/Commands.ts
|
|
618
|
+
export default {
|
|
619
|
+
'inspire': 'Inspire', // simple: maps to app/Commands/Inspire.ts
|
|
620
|
+
'deploy-hooks': { file: 'DeployHooks', enabled: true, aliases: ['dh'] }, // with options
|
|
621
|
+
'disabled-cmd': { file: 'Disabled', enabled: false }, // disabled command
|
|
622
|
+
}
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
```typescript
|
|
626
|
+
// app/Commands/Inspire.ts
|
|
627
|
+
import type { CLI } from '@stacksjs/cli'
|
|
628
|
+
|
|
629
|
+
export default function (buddy: CLI) {
|
|
630
|
+
buddy
|
|
631
|
+
.command('inspire', 'Display inspirational quote')
|
|
632
|
+
.option('-t, --two', 'Show two quotes')
|
|
633
|
+
.action(async (options: { two?: boolean }) => {
|
|
634
|
+
console.log(randomQuote())
|
|
635
|
+
if (options.two) console.log(randomQuote())
|
|
636
|
+
})
|
|
637
|
+
}
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
### Method 2: Auto-discovery (fallback)
|
|
641
|
+
If `app/Commands.ts` does not exist, all `.ts` files in `app/Commands/` are auto-discovered and loaded. Each must export a default function that receives the CLI instance.
|
|
642
|
+
|
|
643
|
+
### Method 3: buddy.config.ts
|
|
644
|
+
```typescript
|
|
645
|
+
// buddy.config.ts
|
|
646
|
+
export default {
|
|
647
|
+
commands: [
|
|
648
|
+
(cli) => {
|
|
649
|
+
cli.command('custom', 'My custom command').action(() => console.log('Hello'))
|
|
650
|
+
},
|
|
651
|
+
],
|
|
652
|
+
aliases: {
|
|
653
|
+
'r': 'release',
|
|
654
|
+
'dep': 'deploy',
|
|
655
|
+
},
|
|
656
|
+
}
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
---
|
|
660
|
+
|
|
661
|
+
## Gotchas
|
|
662
|
+
- Application commands go in `app/Commands/`, framework commands in `storage/framework/core/buddy/src/commands/`
|
|
663
|
+
- The `buddy` file at root is a shell script that bootstraps pantry, ensures Bun is available, then runs `bun run ./storage/framework/core/buddy/src/cli.ts`
|
|
664
|
+
- Commands are lazy-loaded with a 5-second timeout per command to prevent startup hangs
|
|
665
|
+
- The `list` command loads ALL commands to display them
|
|
666
|
+
- When no command matches, the CLI loads only `version` for minimal overhead
|
|
667
|
+
- APP_KEY is auto-generated if not set (except for commands in the skipAppKeyCheck list)
|
|
668
|
+
- `buddy dev` with custom APP_URL starts a reverse proxy (rpx) that handles SSL certificates via `~/.stacks/ssl/`
|
|
669
|
+
- `dev:frontend` has aliases `dev:pages` and `dev:views`
|
|
670
|
+
- `dev:dashboard` has alias `dev:admin`
|
|
671
|
+
- `dev:system-tray` has alias `dev:tray`
|
|
672
|
+
- `build` with no flags defaults to building the Stacks framework (`--stacks`)
|
|
673
|
+
- `cloud:remove` handles stuck CloudFormation stacks by creating temporary IAM roles with AdministratorAccess
|
|
674
|
+
- `mail:*` commands load AWS credentials from `.env.production` and `~/.aws/credentials`
|
|
675
|
+
- `share` uses localtunnel and auto-starts companion dev servers (API, docs) for frontend shares
|
|
676
|
+
- Console listeners can be registered via `app/Listeners/Console.ts`
|