stacks-enums

$npx mdskill add stacksjs/stacks/stacks-enums

Provides enumerated constants for Stacks framework build system and CLI.

  • Access NpmScript commands, Action identifiers, and other framework constants.
  • Depends on the @stacksjs/enums package and TypeScript.
  • Selects the appropriate enum based on the requested constant type.
  • Returns the enum value or script string for use in automation.

SKILL.md

.github/skills/stacks-enumsView on GitHub ↗
---
name: stacks-enums
description: Use when working with framework constants in a Stacks application — NpmScript commands, Action identifiers, or any enumerated constants used across the build system, CLI, and actions. Covers @stacksjs/enums.
license: MIT
compatibility: Bun >= 1.3.0, TypeScript
allowed-tools: Read Edit Write Bash Grep Glob
---

# Stacks Enums

## Key Paths
- Core package: `storage/framework/core/enums/src/`
- Source: `storage/framework/core/enums/src/index.ts`
- Package: `@stacksjs/enums`

## NpmScript Enum (45 values)

Used by the CLI and build system to run specific npm scripts:

```typescript
import { NpmScript } from '@stacksjs/enums'
```

### Build Scripts
| Value | Script |
|-------|--------|
| `Build` | `'build'` |
| `BuildComponents` | `'vite build --config ./src/vite-config/src/components.ts'` |
| `BuildWebComponents` | `'build:web-components'` |
| `BuildFunctions` | `'build:functions'` |
| `BuildDocs` | `'build:docs'` |
| `BuildStacks` | `'build:stacks'` |

### Dev Scripts
| Value | Script |
|-------|--------|
| `Dev` | `'dev'` |
| `DevApi` | `'dev:api'` |
| `DevDocs` | `'dev:docs'` |
| `DevDesktop` | `'dev:desktop'` |
| `DevFunctions` | `'dev:functions'` |

### Test Scripts
| Value | Script |
|-------|--------|
| `Test` | `'test'` |
| `TestUnit` | `'test:unit'` |
| `TestFeature` | `'test:feature'` |
| `TestUi` | `'test:ui'` |
| `TestTypes` | `'test:types'` |

### Maintenance Scripts
`Clean`, `Fresh`, `Lint`, `LintFix`, `Upgrade`, `Generate`, `GenerateTypes`, `GenerateEntries`, `GenerateWebTypes`, `GenerateIdeHelpers`, `GenerateComponentMeta`, `Commit`, `Release`, `KeyGenerate`, `Preinstall`, `Prepublish`

## Action Enum (60+ values)

Used to dispatch framework actions via the action runner:

```typescript
import { Action } from '@stacksjs/enums'
```

### Build Actions
`BuildViews`, `BuildStacks`, `BuildComponentLibs`, `BuildVueComponentLib`, `BuildWebComponentLib`, `BuildFunctionLib`, `BuildCli`, `BuildCore`, `BuildDesktop`, `BuildDocs`, `BuildServer`

### Dev Actions
`DevComponents`, `DevDashboard`, `DevSystemTray`, `Dev`, `DevApi`, `DevDesktop`, `DevDocs`

### Database Actions
`Migrate`, `MigrateFresh`, `MigrateDns`, `Seed`

### Queue Actions
`QueueTable`, `QueueWork`, `QueueRetry`, `QueueFailed`, `QueueClear`, `QueueStatus`, `QueueFlush`, `QueueMonitor`, `QueueInspect`, `QueueSchedule`, `QueueScheduleList`

### Domain Actions
`DomainsAdd`, `DomainsPurchase`, `DomainsRemove`

### Search Engine Actions
`SearchEngineImport`, `SearchEngineFlush`, `SearchEngineListSettings`, `SearchEnginePushSettings`

### Other Actions
`Lint`, `LintFix`, `Test`, `TestUnit`, `TestFeature`, `TestUi`, `Typecheck`, `Deploy`, `ScheduleRun`, `Release`, `RouteList`, `Upgrade`, `UpgradeDeps`

## Usage

```typescript
import { Action, NpmScript } from '@stacksjs/enums'

// Used in buddy CLI commands
runAction(Action.Migrate, options)

// Used in build system
runNpmScript(NpmScript.BuildComponents)
```

## Gotchas
- **Action values use path format** — e.g., `Action.BuildViews = 'build/views'`, `Action.QueueWork = 'queue/work'`
- **NpmScript values are actual script commands** — some are full vite commands, not just script names
- **Used throughout the framework** — CLI, build system, and actions all reference these enums
- **Adding new actions** — requires adding the enum value AND creating the action handler file

More from stacksjs/stacks

SkillDescription
stacks-actionsUse when working with Stacks server actions — creating actions in app/Actions/, auto-generated API actions from the useApi model trait, the 80+ default framework actions (auth, dashboard, commerce, content, deployment, jobs), action request/response handling, or action registration. Covers @stacksjs/actions and storage/framework/defaults/actions/.
stacks-aiUse when integrating AI capabilities into a Stacks application — using Anthropic/OpenAI/Ollama/AWS Bedrock drivers, image generation (DALL-E), vision analysis, RAG/vector search, embeddings, MCP (Model Context Protocol) clients, text summarization, sentiment analysis, content classification, personalization, or the buddy AI assistant. Covers @stacksjs/ai and config/ai.ts.
stacks-aliasUse when working with path aliases in a Stacks project — import resolution, module aliasing, or debugging import paths. Covers @stacksjs/alias which defines 260+ path mappings for the entire framework.
stacks-analyticsUse when adding analytics to a Stacks application — configuring Fathom or self-hosted analytics, generating tracking scripts, privacy-friendly analytics setup, or the analytics configuration. Covers @stacksjs/analytics and config/analytics.ts.
stacks-apiUse when building, modifying, or debugging API endpoints in a Stacks application — defining routes, handling requests, API middleware, working with the API server, HTTP client (fetcher), API resources, or OpenAPI generation. Covers both @stacksjs/api utilities and the stacks-api server implementation.
stacks-arraysUse when working with array utilities in Stacks — statistical operations (average, median, mode, standard deviation, z-score, percentile, covariance), array manipulation (unique, flatten, partition, shuffle, sample, move), containment checks, or the Arr facade. Covers @stacksjs/arrays.
stacks-authUse when implementing authentication, authorization, passkeys, TOTP/2FA, RBAC, gates, policies, session auth, token management, email verification, password resets, or rate limiting in a Stacks application. Covers the @stacksjs/auth package, config/auth.ts, app/Gates.ts, and app/Middleware/.
stacks-auto-importsUse when working with the Stacks auto-import system — understanding how browser and server auto-imports work, configuring auto-imported functions/models/composables, the auto-import manifests, type generation, or how globals are injected. Covers the auto-import pipeline at storage/framework/auto-imports/.
stacks-brandkitUse when defining or exploring a brand identity for a Stacks project and you want premium brand-kit REFERENCE IMAGES first - logo directions, palettes, typography specimens, identity boards, and application/mockup decks. Generates IMAGES ONLY, never code. Trained for minimalist, cinematic, editorial, dark-tech, luxury, cultural, security, gaming, developer-tool, and consumer-app brand systems with intentional logo concepting, sparse type, strong symbolic meaning, and disciplined palettes a coding step can build against.
stacks-browseUse for headless browser QA on Stacks applications — navigation, screenshots, responsive testing, console/network monitoring, and accessibility snapshots. Dependency-free: drives a system browser over the Chrome DevTools Protocol using only Bun (no Playwright/Puppeteer). Invoke with /stacks-browse.