Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/validate-integration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <capabilityId>` 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 <capabilityId>` 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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-sim-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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."
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
### Self-hosted

```bash
npx @sim/setup
npx sim-setup
```

Open [http://localhost:3000](http://localhost:3000)
Expand Down Expand Up @@ -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).

Expand All @@ -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 <path>` to create or manage a deployment somewhere other than `./sim`.
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/en/platform/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
```

<FAQ items={[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ See [Observability](/platform/self-hosting/observability).
| Variable | Description |
|----------|-------------|
| `COPILOT_API_KEY` | API key for Chat. Without it the Sim Chat block, scheduled prompt jobs, and Inbox cannot run |
| `NEXT_PUBLIC_CHAT_DISABLED` | Set to `true` to hide the Chat module: the workspace lands on your first workflow, with no chats list, scheduled tasks, or editor Chat panel. Chat is shown when unset; `npx @sim/setup` sets it for you if you skip the chat key |
| `NEXT_PUBLIC_CHAT_DISABLED` | Set to `true` to hide the Chat module: the workspace lands on your first workflow, with no chats list, scheduled tasks, or editor Chat panel. Chat is shown when unset; `npx sim-setup` sets it for you if you skip the chat key |
| `PII_REDACTION` | Redact PII from workflow logs via Data Retention rules; requires the PII service and a cluster-reachable `INTERNAL_API_BASE_URL` |
| `PII_GRANULAR_REDACTION` | Additionally expose the execution-altering redaction stages |
| `DURABLE_SECRET_PROVENANCE_ENFORCED_SURFACES` | Durable stores where a value whose secret provenance was never recorded fails the run instead of logging a warning. `all`, or a comma-separated subset of `memory`, `table-row`, `knowledge`. Unset (nothing enforced) by default |
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/en/platform/self-hosting/upgrades.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ kubectl logs -n simstudio deploy/sim-app -c migrations --tail=100
<Tab value="Docker Compose">

```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`.

Expand Down
6 changes: 3 additions & 3 deletions apps/sim/lib/core/config/env-capabilities.server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ 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.'
)
})

it('fails fast when an OAuth client is partially configured', () => {
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.'
)
})

Expand Down
2 changes: 1 addition & 1 deletion apps/sim/lib/core/config/env-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
12 changes: 6 additions & 6 deletions apps/sim/lib/integrations/availability.server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})
})

Expand All @@ -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',
})
})

Expand All @@ -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',
})
})

Expand All @@ -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',
})
})

Expand Down Expand Up @@ -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',
Expand All @@ -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)
}
})
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/lib/oauth/oauth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
Expand Down
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/deployment-config/src/env-capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export function defineCapability<const TDefinition extends CapabilityDefinition>

/** 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 {
Expand Down Expand Up @@ -1429,15 +1429,15 @@ export function inspectOAuthClientCapability(
return {
state: 'absent',
missingFields: [],
setupCommand: `npx @sim/setup add integration ${providerId}`,
setupCommand: `npx sim-setup add integration ${providerId}`,
}
}

const present = fields.filter((key) => readOAuthClientFieldValue(values, key) !== null)
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}`,
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/deployment-config/src/integration-availability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' &&
Expand Down
4 changes: 2 additions & 2 deletions packages/sim-setup/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/sim-setup/THIRD_PARTY_LICENSES
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/sim-setup/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/sim-setup/src/capability-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion packages/sim-setup/src/capability-status.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})
Expand Down
4 changes: 2 additions & 2 deletions packages/sim-setup/src/capability-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface CapabilityStatusIssue {
interface FeatureStatusBase<TId extends SetupStatusFeatureId> {
id: TId
label: string
setupCommand: `npx @sim/setup add ${TId}`
setupCommand: `npx sim-setup add ${TId}`
state: CapabilityStatusState
issue?: CapabilityStatusIssue
}
Expand Down Expand Up @@ -143,7 +143,7 @@ function featureMetadata<TId extends SetupStatusFeatureId>(id: TId) {
return {
id,
label: definition.label,
setupCommand: `npx @sim/setup add ${id}` as const,
setupCommand: `npx sim-setup add ${id}` as const,
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/sim-setup/src/checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
]
}
Expand All @@ -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]
Expand Down Expand Up @@ -559,7 +559,7 @@ async function checkDatabase(sim: EnvFile): Promise<Finding[]> {
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({
Expand Down
Loading
Loading