diff --git a/.agents/skills/validate-integration/SKILL.md b/.agents/skills/validate-integration/SKILL.md index 4ca991588cc..abf1740647d 100644 --- a/.agents/skills/validate-integration/SKILL.md +++ b/.agents/skills/validate-integration/SKILL.md @@ -300,7 +300,7 @@ block's generated `oauthServiceId` through the shared deployment capability cata - [ ] Every field listed by that capability exists in `apps/sim/lib/core/config/env.ts` - [ ] Every capability field has the correct `text` or `secret` entry in `OAUTH_CLIENT_SETUP_FIELDS`; no CLI naming heuristic is required - [ ] Shared Google/Microsoft service IDs resolve to their provider capability rather than duplicate entries -- [ ] `npx @sim/setup add integration ` is the command emitted by availability; the CLI has only the exhaustive input-mode projection, not a second runtime provider definition +- [ ] `npx sim-setup add integration ` is the command emitted by availability; the CLI has only the exhaustive input-mode projection, not a second runtime provider definition - [ ] If the canonical OAuth service declares `serviceAccountProviderId`, the generated `SERVICE_ACCOUNT_PROVIDER_BY_OAUTH_SERVICE_ID[serviceId]` has the same provider ID - [ ] The service-account `deploymentRequirement` matches how that credential actually works: diff --git a/.github/workflows/publish-sim-setup.yml b/.github/workflows/publish-sim-setup.yml index a64041d5cb9..e8d9f181b19 100644 --- a/.github/workflows/publish-sim-setup.yml +++ b/.github/workflows/publish-sim-setup.yml @@ -155,8 +155,8 @@ jobs: env: VERSION: ${{ steps.release.outputs.version }} run: | - if bun pm view "@sim/setup@$VERSION" version > /dev/null 2>&1; then - echo "@sim/setup@$VERSION is already published. Bump packages/sim-setup/package.json before releasing another build." >&2 + if bun pm view "sim-setup@$VERSION" version > /dev/null 2>&1; then + echo "sim-setup@$VERSION is already published. Bump packages/sim-setup/package.json before releasing another build." >&2 exit 1 fi @@ -171,4 +171,4 @@ jobs: env: VERSION: ${{ steps.release.outputs.version }} NPM_TAG: ${{ steps.release.outputs.tag }} - run: echo "Published @sim/setup@$VERSION with the '$NPM_TAG' tag." + run: echo "Published sim-setup@$VERSION with the '$NPM_TAG' tag." diff --git a/README.md b/README.md index 43bddedc719..2d9b86ca5db 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ ### Self-hosted ```bash -npx @sim/setup +npx sim-setup ``` Open [http://localhost:3000](http://localhost:3000) @@ -72,7 +72,7 @@ Open [http://localhost:3000](http://localhost:3000) **Requirements:** [Node.js 20+](https://nodejs.org/) and [Docker](https://www.docker.com/). -`npx @sim/setup` is an interactive wizard that creates a small `sim/` deployment directory, provisions the database, generates secrets, writes `.env`, connects a Chat API key, and starts the published Sim images with Docker Compose. It does not clone the repository. +`npx sim-setup` is an interactive wizard that creates a small `sim/` deployment directory, provisions the database, generates secrets, writes `.env`, connects a Chat API key, and starts the published Sim images with Docker Compose. It does not clone the repository. When it finishes, open [http://localhost:3000](http://localhost:3000). @@ -81,32 +81,32 @@ Inside a cloned Sim repository, run `bun run sim-setup` to unlock the source-onl Reconfigure an optional capability without rerunning the full wizard: ```bash -npx @sim/setup config -npx @sim/setup add email -npx @sim/setup add storage -npx @sim/setup add sandbox -npx @sim/setup add jobs -npx @sim/setup add cache -npx @sim/setup add knowledge -npx @sim/setup add llm -npx @sim/setup add integration slack +npx sim-setup config +npx sim-setup add email +npx sim-setup add storage +npx sim-setup add sandbox +npx sim-setup add jobs +npx sim-setup add cache +npx sim-setup add knowledge +npx sim-setup add llm +npx sim-setup add integration slack ``` -`npx @sim/setup config` detects the effective local-dev, Docker Compose, or current-context +`npx sim-setup config` detects the effective local-dev, Docker Compose, or current-context Helm configuration and reports configured, missing, or invalid capabilities and OAuth -integrations without printing credential values. This is separate from `npx @sim/setup status`, +integrations without printing credential values. This is separate from `npx sim-setup status`, which reports whether installed services are running and healthy. Manage your install from its directory: ```bash -npx @sim/setup start | stop | restart # bring your install up / down / cycle -npx @sim/setup update # pull and apply Compose images -npx @sim/setup status # what's installed and healthy -npx @sim/setup logs # follow logs -npx @sim/setup doctor # diagnose configuration problems -npx @sim/setup down # remove containers (data kept) -npx @sim/setup reset # archive .env and wipe managed data +npx sim-setup start | stop | restart # bring your install up / down / cycle +npx sim-setup update # pull and apply Compose images +npx sim-setup status # what's installed and healthy +npx sim-setup logs # follow logs +npx sim-setup doctor # diagnose configuration problems +npx sim-setup down # remove containers (data kept) +npx sim-setup reset # archive .env and wipe managed data ``` The setup package detects how you're running and acts accordingly. Use `--dir ` to create or manage a deployment somewhere other than `./sim`. @@ -115,7 +115,7 @@ Sim also supports local models via [Ollama](https://ollama.ai) and [vLLM](https: ## Chat API Keys -Chat is a Sim-managed service. `npx @sim/setup` connects a Chat API key for you — sign in when it opens your browser and the key is stored automatically. To view, create, or revoke keys later, go to [sim.ai/selfhost/settings/chat-keys](https://sim.ai/selfhost/settings/chat-keys). +Chat is a Sim-managed service. `npx sim-setup` connects a Chat API key for you — sign in when it opens your browser and the key is stored automatically. To view, create, or revoke keys later, go to [sim.ai/selfhost/settings/chat-keys](https://sim.ai/selfhost/settings/chat-keys). ## Environment Variables diff --git a/apps/docs/content/docs/en/platform/self-hosting/docker.mdx b/apps/docs/content/docs/en/platform/self-hosting/docker.mdx index 2e54fc2f609..0974cfb8e41 100644 --- a/apps/docs/content/docs/en/platform/self-hosting/docker.mdx +++ b/apps/docs/content/docs/en/platform/self-hosting/docker.mdx @@ -10,7 +10,7 @@ import { FAQ } from '@/components/ui/faq' ## Quick Start ```bash -npx @sim/setup +npx sim-setup ``` Open [http://localhost:3000](http://localhost:3000) @@ -144,7 +144,7 @@ docker compose -f docker-compose.prod.yml logs migrations docker compose -f docker-compose.prod.yml logs -f cron # Upgrade: bump SIM_VERSION in .env when pinned, then -npx @sim/setup update +npx sim-setup update ``` ```bash -npx @sim/setup update +npx sim-setup update docker compose -f docker-compose.prod.yml logs migrations ``` -`npx @sim/setup update` pulls the versions configured by `SIM_VERSION` (or `latest` when it is +`npx sim-setup update` pulls the versions configured by `SIM_VERSION` (or `latest` when it is unset), recreates the changed services, and keeps data volumes. It is equivalent to running `docker compose pull` followed by `docker compose up -d`. diff --git a/apps/sim/lib/core/config/env-capabilities.server.test.ts b/apps/sim/lib/core/config/env-capabilities.server.test.ts index 182ee4e8d8d..63cde7f045c 100644 --- a/apps/sim/lib/core/config/env-capabilities.server.test.ts +++ b/apps/sim/lib/core/config/env-capabilities.server.test.ts @@ -31,13 +31,13 @@ describe('server environment capabilities', () => { expect(inspectConfiguredOAuthClient('slack')).toEqual({ state: 'partial', missingFields: ['SLACK_CLIENT_SECRET'], - setupCommand: 'npx @sim/setup add integration slack', + setupCommand: 'npx sim-setup add integration slack', }) }) it('fails fast when an OAuth client is absent', () => { expect(() => requireConfiguredOAuthClient('shopify')).toThrow( - 'OAuth client shopify is not configured. Run npx @sim/setup add integration shopify.' + 'OAuth client shopify is not configured. Run npx sim-setup add integration shopify.' ) }) @@ -45,7 +45,7 @@ describe('server environment capabilities', () => { setEnv({ SLACK_CLIENT_ID: 'slack-client' }) expect(() => requireConfiguredOAuthClient('slack')).toThrow( - 'OAuth client slack is partially configured — missing SLACK_CLIENT_SECRET. Run npx @sim/setup add integration slack.' + 'OAuth client slack is partially configured — missing SLACK_CLIENT_SECRET. Run npx sim-setup add integration slack.' ) }) diff --git a/apps/sim/lib/core/config/env-flags.ts b/apps/sim/lib/core/config/env-flags.ts index 492158254a9..135607925f1 100644 --- a/apps/sim/lib/core/config/env-flags.ts +++ b/apps/sim/lib/core/config/env-flags.ts @@ -411,7 +411,7 @@ const sandboxProvider = inspectCapability(SANDBOX_CAPABILITY, env).providerId * * The browser cannot inspect provider credentials, so * `NEXT_PUBLIC_SANDBOXES_ENABLED` is its readiness projection. Set the public - * value only after this server-side check succeeds; `npx @sim/setup doctor` + * value only after this server-side check succeeds; `npx sim-setup doctor` * reports mismatches in either direction. */ export const isRemoteSandboxEnabled = diff --git a/apps/sim/lib/integrations/availability.server.test.ts b/apps/sim/lib/integrations/availability.server.test.ts index 18b4f97e5f1..e7ec5bc9cad 100644 --- a/apps/sim/lib/integrations/availability.server.test.ts +++ b/apps/sim/lib/integrations/availability.server.test.ts @@ -50,7 +50,7 @@ describe('integration availability', () => { oauthAvailable: true, serviceAccountAvailable: false, missingFields: [], - setupCommand: 'npx @sim/setup add integration slack', + setupCommand: 'npx sim-setup add integration slack', }) }) @@ -60,7 +60,7 @@ describe('integration availability', () => { oauthAvailable: false, serviceAccountAvailable: true, missingFields: ['NOTION_CLIENT_ID', 'NOTION_CLIENT_SECRET'], - setupCommand: 'npx @sim/setup add integration notion', + setupCommand: 'npx sim-setup add integration notion', }) }) @@ -77,7 +77,7 @@ describe('integration availability', () => { expect(availabilityFor('x')).toMatchObject({ state: 'unavailable', oauthAvailable: false, - setupCommand: 'npx @sim/setup add integration x', + setupCommand: 'npx sim-setup add integration x', }) }) @@ -87,7 +87,7 @@ describe('integration availability', () => { oauthAvailable: false, serviceAccountAvailable: false, missingFields: ['SLACK_CLIENT_SECRET'], - setupCommand: 'npx @sim/setup add integration slack', + setupCommand: 'npx sim-setup add integration slack', }) }) @@ -158,7 +158,7 @@ describe('integration availability', () => { state: 'unavailable', serviceAccountAvailable: false, missingFields: ['TRELLO_API_KEY'], - setupCommand: 'npx @sim/setup add integration trello', + setupCommand: 'npx sim-setup add integration trello', }) expect(availabilityFor('trello', { TRELLO_API_KEY: 'trello-key' })).toMatchObject({ state: 'ready', @@ -181,7 +181,7 @@ describe('integration availability', () => { for (const integration of availability) { if (!integration.setupCommand) continue - const capabilityId = integration.setupCommand.replace('npx @sim/setup add integration ', '') + const capabilityId = integration.setupCommand.replace('npx sim-setup add integration ', '') expect(Object.hasOwn(OAUTH_CLIENT_CAPABILITIES, capabilityId)).toBe(true) } }) diff --git a/apps/sim/lib/oauth/oauth.test.ts b/apps/sim/lib/oauth/oauth.test.ts index 711b8c1f2b2..7bb0a750676 100644 --- a/apps/sim/lib/oauth/oauth.test.ts +++ b/apps/sim/lib/oauth/oauth.test.ts @@ -559,7 +559,7 @@ describe('OAuth Token Refresh', () => { expect(result).toEqual({ ok: false, message: - 'OAuth client monday is partially configured — missing MONDAY_CLIENT_SECRET. Run npx @sim/setup add integration monday.', + 'OAuth client monday is partially configured — missing MONDAY_CLIENT_SECRET. Run npx sim-setup add integration monday.', }) expect(mockFetch).not.toHaveBeenCalled() }) diff --git a/bun.lock b/bun.lock index ccf6d710ff1..a3c25e1b56a 100644 --- a/bun.lock +++ b/bun.lock @@ -620,7 +620,7 @@ }, }, "packages/sim-setup": { - "name": "@sim/setup", + "name": "sim-setup", "version": "1.0.0", "bin": { "sim-setup": "dist/index.js", @@ -1839,7 +1839,7 @@ "@sim/security": ["@sim/security@workspace:packages/security"], - "@sim/setup": ["@sim/setup@workspace:packages/sim-setup"], + "sim-setup": ["sim-setup@workspace:packages/sim-setup"], "@sim/terminal-protocol": ["@sim/terminal-protocol@workspace:packages/terminal-protocol"], diff --git a/packages/deployment-config/src/env-capabilities.ts b/packages/deployment-config/src/env-capabilities.ts index d7d64041e24..e0e7821ca68 100644 --- a/packages/deployment-config/src/env-capabilities.ts +++ b/packages/deployment-config/src/env-capabilities.ts @@ -343,7 +343,7 @@ export function defineCapability /** Returns the canonical command for configuring a runtime capability. */ export function getCapabilitySetupCommand(definition: CapabilityDefinition): string { - return `npx @sim/setup add ${definition.id}` + return `npx sim-setup add ${definition.id}` } interface RequirementInspection { @@ -1429,7 +1429,7 @@ export function inspectOAuthClientCapability( return { state: 'absent', missingFields: [], - setupCommand: `npx @sim/setup add integration ${providerId}`, + setupCommand: `npx sim-setup add integration ${providerId}`, } } @@ -1437,7 +1437,7 @@ export function inspectOAuthClientCapability( return { state: present.length === 0 ? 'absent' : present.length === fields.length ? 'ready' : 'partial', missingFields: fields.filter((key) => readOAuthClientFieldValue(values, key) === null), - setupCommand: `npx @sim/setup add integration ${providerId}`, + setupCommand: `npx sim-setup add integration ${providerId}`, } } diff --git a/packages/deployment-config/src/integration-availability.ts b/packages/deployment-config/src/integration-availability.ts index 43391bcf897..4cd25d89808 100644 --- a/packages/deployment-config/src/integration-availability.ts +++ b/packages/deployment-config/src/integration-availability.ts @@ -90,7 +90,7 @@ function resolveOAuthIntegrationAvailability( } const oauth = inspectOAuthClientCapability(capabilityId, values) - const setupCommand = `npx @sim/setup add integration ${capabilityId}` + const setupCommand = `npx sim-setup add integration ${capabilityId}` const serviceAccountAvailable = Boolean( serviceAccount && serviceAccount.deploymentRequirement !== 'preview-gated' && diff --git a/packages/sim-setup/README.md b/packages/sim-setup/README.md index 41e19179fc7..58200c50182 100644 --- a/packages/sim-setup/README.md +++ b/packages/sim-setup/README.md @@ -1,9 +1,9 @@ -# @sim/setup +# sim-setup Set up and manage a self-hosted Sim installation. ```bash -npx @sim/setup +npx sim-setup ``` Outside a Sim source checkout, the command creates a Docker Compose installation using published diff --git a/packages/sim-setup/THIRD_PARTY_LICENSES b/packages/sim-setup/THIRD_PARTY_LICENSES index c6742214e29..8212679762c 100644 --- a/packages/sim-setup/THIRD_PARTY_LICENSES +++ b/packages/sim-setup/THIRD_PARTY_LICENSES @@ -1,4 +1,4 @@ -The @sim/setup bundle includes the following third-party software. +The sim-setup bundle includes the following third-party software. @clack/core and @clack/prompts Copyright (c) 2025-Present Bombshell contributors diff --git a/packages/sim-setup/package.json b/packages/sim-setup/package.json index 9c45c689962..7942f84939c 100644 --- a/packages/sim-setup/package.json +++ b/packages/sim-setup/package.json @@ -1,5 +1,5 @@ { - "name": "@sim/setup", + "name": "sim-setup", "version": "1.0.0", "description": "Set up and manage a self-hosted Sim installation", "type": "module", diff --git a/packages/sim-setup/src/capability-config.ts b/packages/sim-setup/src/capability-config.ts index dd32fa8cf5f..8bcbe13cbb0 100644 --- a/packages/sim-setup/src/capability-config.ts +++ b/packages/sim-setup/src/capability-config.ts @@ -863,7 +863,7 @@ export function getCapabilitySetup(id: string): CapabilitySetupDefinition | null } export function getSetupCommand(id: string): string { - return `npx @sim/setup add ${id}` + return `npx sim-setup add ${id}` } type OAuthClientSetupFields = { diff --git a/packages/sim-setup/src/capability-status.test.ts b/packages/sim-setup/src/capability-status.test.ts index f7966a7cac3..5ad24d4ee4d 100644 --- a/packages/sim-setup/src/capability-status.test.ts +++ b/packages/sim-setup/src/capability-status.test.ts @@ -38,7 +38,7 @@ describe('env capability status', () => { expect(status.features.sandbox).toEqual({ id: 'sandbox', label: 'Function sandboxes', - setupCommand: 'npx @sim/setup add sandbox', + setupCommand: 'npx sim-setup add sandbox', state: 'default', providerId: 'disabled', }) diff --git a/packages/sim-setup/src/capability-status.ts b/packages/sim-setup/src/capability-status.ts index 89ad6d3ed37..d86772f6b62 100644 --- a/packages/sim-setup/src/capability-status.ts +++ b/packages/sim-setup/src/capability-status.ts @@ -38,7 +38,7 @@ export interface CapabilityStatusIssue { interface FeatureStatusBase { id: TId label: string - setupCommand: `npx @sim/setup add ${TId}` + setupCommand: `npx sim-setup add ${TId}` state: CapabilityStatusState issue?: CapabilityStatusIssue } @@ -143,7 +143,7 @@ function featureMetadata(id: TId) { return { id, label: definition.label, - setupCommand: `npx @sim/setup add ${id}` as const, + setupCommand: `npx sim-setup add ${id}` as const, } } diff --git a/packages/sim-setup/src/checks.ts b/packages/sim-setup/src/checks.ts index a047f30a0cc..89e31f9758c 100644 --- a/packages/sim-setup/src/checks.ts +++ b/packages/sim-setup/src/checks.ts @@ -113,7 +113,7 @@ function checkFiles(ctx: CheckContext): Finding[] { group: 'files', status: 'fail', message: 'no env files found', - fix: 'run: npx @sim/setup', + fix: 'run: npx sim-setup', }, ] } @@ -135,7 +135,7 @@ function checkFiles(ctx: CheckContext): Finding[] { message: `${rel(file)} is missing`, fix: canSeed ? `run doctor --fix to seed it from apps/${target === 'db' ? '../packages/db' : target}/.env.example + apps/sim/.env` - : 'run: npx @sim/setup', + : 'run: npx sim-setup', autofix: canSeed ? () => { const keys = target === 'db' ? ['DATABASE_URL'] : [...SHARED_KEYS] @@ -559,7 +559,7 @@ async function checkDatabase(sim: EnvFile): Promise { group: 'live', status: 'fail', message: `database unreachable: ${probe.error}`, - fix: 'start Postgres (npx @sim/setup can manage a pgvector container) or fix DATABASE_URL', + fix: 'start Postgres (npx sim-setup can manage a pgvector container) or fix DATABASE_URL', }) } else { findings.push({ diff --git a/packages/sim-setup/src/compose-asset.ts b/packages/sim-setup/src/compose-asset.ts index 5d99a5f1744..7b115371975 100644 --- a/packages/sim-setup/src/compose-asset.ts +++ b/packages/sim-setup/src/compose-asset.ts @@ -29,7 +29,7 @@ function readManagedState(root: string): ManagedState | null { !('composeSha256' in parsed) || typeof parsed.composeSha256 !== 'string' ) { - throw new Error(`${file} is not a valid @sim/setup managed-state file`) + throw new Error(`${file} is not a valid sim-setup managed-state file`) } return { schemaVersion: 1, composeSha256: parsed.composeSha256 } } @@ -58,7 +58,7 @@ export function ensureProductionComposeFile(context: SetupContext = SETUP_CONTEX const bundled = packagedComposeFile() if (!existsSync(bundled)) { - throw new Error(`The @sim/setup package is missing its bundled ${COMPOSE_FILE}`) + throw new Error(`The sim-setup package is missing its bundled ${COMPOSE_FILE}`) } mkdirSync(context.root, { recursive: true }) const packaged = readFileSync(bundled, 'utf8') diff --git a/packages/sim-setup/src/feature-setup.ts b/packages/sim-setup/src/feature-setup.ts index 3f39caa6492..3ef0c57eb86 100644 --- a/packages/sim-setup/src/feature-setup.ts +++ b/packages/sim-setup/src/feature-setup.ts @@ -24,7 +24,7 @@ async function setupIntegration( vars: Map ): Promise> { if (!requestedId) { - throw new Error('Missing integration id. Example: npx @sim/setup add integration slack') + throw new Error('Missing integration id. Example: npx sim-setup add integration slack') } const providerId = resolveOAuthClientCapabilityId(requestedId) if (!providerId) { @@ -131,30 +131,30 @@ export function resolveFeatureSetupDestination( sources: readonly ConfigurationSource[] ): FeatureSetupDestination { if (sources.length === 0) { - throw new Error('No Sim configuration was detected. Run npx @sim/setup first.') + throw new Error('No Sim configuration was detected. Run npx sim-setup first.') } const managed = sources.filter((source) => source.managedByCurrentCheckout) if (managed.length === 0) { throw new Error( - 'No effective configuration is safely writable by this checkout. Process overrides, higher-precedence development env files, external Compose projects, and Helm releases must be updated at their source. Run npx @sim/setup config for the detected sources.' + 'No effective configuration is safely writable by this checkout. Process overrides, higher-precedence development env files, external Compose projects, and Helm releases must be updated at their source. Run npx sim-setup config for the detected sources.' ) } if (managed.length > 1) { throw new Error( - `More than one effective configuration is writable by this checkout (${managed.map((source) => source.label).join(', ')}). Run npx @sim/setup config and remove the ambiguity before configuring a feature.` + `More than one effective configuration is writable by this checkout (${managed.map((source) => source.label).join(', ')}). Run npx sim-setup config and remove the ambiguity before configuring a feature.` ) } const source = managed[0] if (!source.values) { throw new Error( - `${source.label} is managed by this checkout, but its effective environment could not be resolved. Run npx @sim/setup config and fix the reported source error first.` + `${source.label} is managed by this checkout, but its effective environment could not be resolved. Run npx sim-setup config and fix the reported source error first.` ) } if (source.kind === 'helm') { throw new Error( - 'Helm configuration cannot be updated by npx @sim/setup add. Update the release Secret or values and upgrade the release.' + 'Helm configuration cannot be updated by npx sim-setup add. Update the release Secret or values and upgrade the release.' ) } diff --git a/packages/sim-setup/src/index.ts b/packages/sim-setup/src/index.ts index 656a382320a..1bc546ede4d 100644 --- a/packages/sim-setup/src/index.ts +++ b/packages/sim-setup/src/index.ts @@ -78,7 +78,7 @@ function renderFailure(error: unknown): void { } } console.error( - `\n ${theme.muted('Your progress is saved — re-run')} ${theme.command('npx @sim/setup')} ${theme.muted('to pick up where you left off.')}` + `\n ${theme.muted('Your progress is saved — re-run')} ${theme.command('npx sim-setup')} ${theme.muted('to pick up where you left off.')}` ) } diff --git a/packages/sim-setup/src/lifecycle.ts b/packages/sim-setup/src/lifecycle.ts index 2c2fa65355e..e7c2128c0c4 100644 --- a/packages/sim-setup/src/lifecycle.ts +++ b/packages/sim-setup/src/lifecycle.ts @@ -301,8 +301,8 @@ function start(install: Install): void { p.note( [ `open ${APP_SIGNUP_URL}`, - 'follow logs: npx @sim/setup logs', - 'stop: npx @sim/setup stop', + 'follow logs: npx sim-setup logs', + 'stop: npx sim-setup stop', ].join('\n'), 'Running' ) @@ -313,10 +313,9 @@ function start(install: Install): void { for (const name of names) dockerRun(['start', name], `docker start ${name} failed`) if (names.length) p.log.step(`Started ${names.join(', ')}`) p.note( - [ - 'start the dev server: bun run dev:full', - 'stop DB/Redis: npx @sim/setup stop', - ].join('\n'), + ['start the dev server: bun run dev:full', 'stop DB/Redis: npx sim-setup stop'].join( + '\n' + ), 'Ready' ) return @@ -331,7 +330,7 @@ function stop(install: Install): void { dockerRun(composeArgs(install, 'stop'), 'docker compose stop failed', install.dir) spin.stop('Containers stopped (data kept)') p.note( - ['start again: npx @sim/setup start', 'remove: npx @sim/setup down'].join('\n'), + ['start again: npx sim-setup start', 'remove: npx sim-setup down'].join('\n'), 'Stopped' ) return @@ -351,7 +350,7 @@ function stop(install: Install): void { [ `scale down: kubectl --context ${c} -n ${K8S_NAMESPACE} scale deploy --all --replicas=0`, `scale up: kubectl --context ${c} -n ${K8S_NAMESPACE} scale deploy --all --replicas=1`, - 'tear down: npx @sim/setup down', + 'tear down: npx sim-setup down', ].join('\n'), 'Kubernetes' ) @@ -420,8 +419,8 @@ function update(install: Install): void { p.note( [ `version: ${theme.command(`SIM_VERSION in ${path.join(install.dir, '.env')}`)} (latest when unset)`, - `check: ${theme.command('npx @sim/setup status')}`, - `logs: ${theme.command('npx @sim/setup logs')}`, + `check: ${theme.command('npx sim-setup status')}`, + `logs: ${theme.command('npx sim-setup logs')}`, ].join('\n'), 'Update complete' ) @@ -534,7 +533,7 @@ async function reset(install: Install | null): Promise { } p.log.step(`Uninstalled ${K8S_RELEASE}`) } - p.note(`start fresh with ${theme.command('npx @sim/setup')}`, 'Reset complete') + p.note(`start fresh with ${theme.command('npx sim-setup')}`, 'Reset complete') } async function status(): Promise { @@ -555,7 +554,7 @@ async function status(): Promise { if (installs.length === 0) { console.log( docker - ? ` ${glyph.warn} No Sim install detected — run ${theme.command('npx @sim/setup')}.` + ? ` ${glyph.warn} No Sim install detected — run ${theme.command('npx sim-setup')}.` : ` ${glyph.warn} No install detected, but that may just be Docker being down.` ) return @@ -585,7 +584,7 @@ export async function runLifecycle(command: LifecycleCommand): Promise { const install = await resolveInstall(installs) if (!install) { - p.log.warn(`No Sim install detected. Run ${theme.command('npx @sim/setup')} first.`) + p.log.warn(`No Sim install detected. Run ${theme.command('npx sim-setup')} first.`) return } switch (command) { diff --git a/packages/sim-setup/src/modes/compose.ts b/packages/sim-setup/src/modes/compose.ts index 24c53c19557..4f05cc37a6e 100644 --- a/packages/sim-setup/src/modes/compose.ts +++ b/packages/sim-setup/src/modes/compose.ts @@ -125,7 +125,7 @@ async function ensureComposePortsFree( if (toCheck.length === 0) return if (await ensurePortsFree(toCheck)) return throw new SetupError(`ports ${toCheck.map((port) => `:${port}`).join('/')} are in use`, [ - `free the ports, then re-run: ${theme.command('npx @sim/setup')}`, + `free the ports, then re-run: ${theme.command('npx sim-setup')}`, `see what holds them: ${theme.command('lsof -nP -iTCP:3000 -sTCP:LISTEN')}`, `stop a container publishing them: ${theme.command('docker ps')}`, `compose file in play: ${composeFile}`, diff --git a/packages/sim-setup/src/modes/k8s.ts b/packages/sim-setup/src/modes/k8s.ts index b28fe852779..cbb0043950e 100644 --- a/packages/sim-setup/src/modes/k8s.ts +++ b/packages/sim-setup/src/modes/k8s.ts @@ -174,7 +174,7 @@ async function ensureLocalContext(detection: Detection): Promise { spin.stop(`${glyph.fail} kind cluster "sim" would not start`) throw new SetupError('the kind cluster "sim" exists but will not come up.', [ `inspect it: ${theme.command('docker ps -a --filter name=sim-control-plane')}`, - `recreate it: ${theme.command('kind delete cluster --name sim')}, then re-run ${theme.command('npx @sim/setup')}`, + `recreate it: ${theme.command('kind delete cluster --name sim')}, then re-run ${theme.command('npx sim-setup')}`, ]) } spin.stop('kind cluster "sim" started') diff --git a/packages/sim-setup/src/setup-status.test.ts b/packages/sim-setup/src/setup-status.test.ts index c38a636041e..b27fd5354e2 100644 --- a/packages/sim-setup/src/setup-status.test.ts +++ b/packages/sim-setup/src/setup-status.test.ts @@ -76,7 +76,8 @@ describe('setup status', () => { expect(report.capabilityStatus?.features.email.state).toBe('configured') expect(output).toContain('Email delivery: Resend') expect(output).toContain('SMTP_PORT') - expect(output).toContain('configure: npx @sim/setup add email') + expect(output).toContain('configure: npx sim-setup add email') + expect(output).not.toContain('Run npx sim-setup add email') expect(output).not.toContain('resend-super-secret') }) diff --git a/packages/sim-setup/src/setup-status.ts b/packages/sim-setup/src/setup-status.ts index 212ec8dec3a..ee59e863f1f 100644 --- a/packages/sim-setup/src/setup-status.ts +++ b/packages/sim-setup/src/setup-status.ts @@ -132,7 +132,7 @@ function featureGlyph(feature: FeatureStatus): string { } function withoutSetupCommand(message: string): string { - return message.replace(/\s+Run npx @sim\/setup setup[^.]*\.$/, '') + return message.replace(/\s+Run npx sim-setup add [^.]*\.$/, '') } function setupHint(source: SetupStatusSource, command: string): string | null { @@ -330,7 +330,7 @@ export function renderSetupStatusReport(report: SetupStatusReport): string { const representedOAuthClients = new Set( deploymentIntegrations.flatMap((integration) => { if (!integration.setupCommand) return [] - return [integration.setupCommand.replace('npx @sim/setup add integration ', '')] + return [integration.setupCommand.replace('npx sim-setup add integration ', '')] }) ) const additionalOAuthClients = Object.values(report.capabilityStatus.oauthClients.clients).filter( @@ -357,7 +357,7 @@ export async function runSetupStatus(): Promise { console.log(`\n${theme.heading('◆ Sim setup status')}\n`) if (sources.length === 0) { console.log(` ${glyph.fail} No local-dev, Docker Compose, or Helm configuration detected.`) - console.log(` ${theme.muted('run: npx @sim/setup')}`) + console.log(` ${theme.muted('run: npx sim-setup')}`) return 1 } diff --git a/packages/sim-setup/src/steps.ts b/packages/sim-setup/src/steps.ts index cd96a29fc49..4febfd3aaa0 100644 --- a/packages/sim-setup/src/steps.ts +++ b/packages/sim-setup/src/steps.ts @@ -72,7 +72,7 @@ export async function promptCopilotKey(existing?: string): Promise { p.note( [ mode === 'k8s' ? `port-forward, then open ${APP_SIGNUP_URL}` : `open ${APP_SIGNUP_URL}`, - 'manage it: npx @sim/setup start · stop · update · status · logs', - 'check your setup: npx @sim/setup doctor', + 'manage it: npx sim-setup start · stop · update · status · logs', + 'check your setup: npx sim-setup doctor', mode === 'dev' && !startDevNow ? `start Sim: bun run ${devScript}` : null, ] .filter(Boolean)