Releases: cipherstash/stack
stash@0.11.0
Minor Changes
-
de9c02c: Rename the CLI package from
@cipherstash/clitostash. The published code, commands, and flags are unchanged — this is a pure rename so the day-to-day invocation drops fromnpx @cipherstash/cli ...tonpx stash ....Migration
-
Update your
package.jsondevDependencies:- "@cipherstash/cli": "^0.10.0" + "stash": "^0.10.1"
-
Update the
defineConfigimport instash.config.ts:- import { defineConfig } from '@cipherstash/cli' + import { defineConfig } from 'stash'
-
Update any
npx @cipherstash/cli .../bunx @cipherstash/cli .../pnpm dlx @cipherstash/cli .../yarn dlx @cipherstash/cli ...invocations in scripts, CI, READMEs, and team docs to usestashinstead. Programmatic exports (defineConfig,loadStashConfig,EQLInstaller,loadBundledEqlSql,downloadEqlSql,PermissionCheckResult) are re-exported fromstashwith the same shapes.
Wizard impact (
@cipherstash/wizard)The wizard's post-agent step and its prerequisite / agent-error hints now reference
stash(e.g.Run: bunx stash auth login,Running bunx stash db install...) rather than@cipherstash/cli. The wizard package name andstash-wizardbinary are unchanged — only the strings the wizard prints and the commands it shells out to are affected. -
-
8ee11fd: Layered
DATABASE_URLresolution for DB / schema commands.Previously, any DB-touching command (
db install,db push,db upgrade,db status,db validate,db test-connection,schema build) failed with the cryptic Zod error:Error: Invalid stash.config.ts - databaseUrl: Invalid input: expected nonoptional, received undefinedif
DATABASE_URLwasn't already in the environment. The CLI auto-loaded.env.local/.env.development.local/.env.development/.env, but had no story for--database-urlflags, local Supabase, or pasted-once values.The scaffolded
stash.config.tsnow calls a resolver directly:import { defineConfig, resolveDatabaseUrl } from "stash"; export default defineConfig({ databaseUrl: await resolveDatabaseUrl(), client: "./src/encryption/index.ts", });
resolveDatabaseUrl()walks sources in order; first hit wins:--database-url <url>flag — new, accepted on all seven DB / schema commands. Used for this run only; never written to disk.process.env.DATABASE_URL— covers shell exports, mise, direnv, dotenv-cli, the existing dotenv loads.supabase status --output env→DB_URL— auto-engaged when--supabaseis set or asupabase/config.tomlis detected. Useful for local Supabase users who haven't exported the URL yet.- Interactive prompt — opens with a tip listing the alternatives (flag, env, the user's actual dotenv file). Skipped under
CI=trueor non-TTY stdin. - Hard fail with a source-naming error message.
The connection string is never persisted to disk —
stash.config.tsonly contains theawait resolveDatabaseUrl()call, never a literal URL. The resolver also doesn't mutateprocess.env; CLI flag context is threaded into the config evaluation viaAsyncLocalStorageso concurrent loads stay isolated. Source labels are logged on non-env paths (Using DATABASE_URL from --database-url flag/from supabase status/from prompt) but the URL itself is never echoed.db test-connection's connection-failure hint is now source-aware: it points users at--database-url, the env var, and the actual dotenv file in their project (.env.localif present,.envotherwise) — not the misleadingstash.config.tsit used to suggest.
@cipherstash/wizard@0.1.2
Patch Changes
-
de9c02c: Rename the CLI package from
@cipherstash/clitostash. The published code, commands, and flags are unchanged — this is a pure rename so the day-to-day invocation drops fromnpx @cipherstash/cli ...tonpx stash ....Migration
-
Update your
package.jsondevDependencies:- "@cipherstash/cli": "^0.10.0" + "stash": "^0.10.1"
-
Update the
defineConfigimport instash.config.ts:- import { defineConfig } from '@cipherstash/cli' + import { defineConfig } from 'stash'
-
Update any
npx @cipherstash/cli .../bunx @cipherstash/cli .../pnpm dlx @cipherstash/cli .../yarn dlx @cipherstash/cli ...invocations in scripts, CI, READMEs, and team docs to usestashinstead. Programmatic exports (defineConfig,loadStashConfig,EQLInstaller,loadBundledEqlSql,downloadEqlSql,PermissionCheckResult) are re-exported fromstashwith the same shapes.
Wizard impact (
@cipherstash/wizard)The wizard's post-agent step and its prerequisite / agent-error hints now reference
stash(e.g.Run: bunx stash auth login,Running bunx stash db install...) rather than@cipherstash/cli. The wizard package name andstash-wizardbinary are unchanged — only the strings the wizard prints and the commands it shells out to are affected. -
@cipherstash/stack@0.15.3
Patch Changes
- afe6810: Bump protect-ffi version
@cipherstash/protect@11.1.1
Patch Changes
- afe6810: Bump protect-ffi version
@cipherstash/protect-dynamodb@11.0.1
Patch Changes
- Updated dependencies [afe6810]
- @cipherstash/protect@11.1.1
@cipherstash/wizard@0.1.1
Patch Changes
- f34fe9d: Show and execute commands using the detected package manager's runner (
npx/bunx/pnpm dlx/yarn dlx) instead of always emittingnpx. A user who runsbunx @cipherstash/cli initnow sees a "Next Steps" panel that suggestsbunx @cipherstash/cli db installandbunx @cipherstash/wizard, and the wizard's post-agent step both displays and shells out tobunx @cipherstash/cli db push(was:Failed: npx @cipherstash/cli db push). Wizard prerequisite messages and AI-agent error hints (e.g. on a 401,Run: bunx @cipherstash/cli auth login) follow the same rule. Detection sources are unchanged:npm_config_user_agentfirst, then lockfile, thennpxfallback.
@cipherstash/wizard@0.1.0
Minor Changes
-
5d3eb13: Initial release of
@cipherstash/wizard— AI-powered encryption setup for CipherStash, extracted from@cipherstash/cli.Run it once per project, after
stash init:npx @cipherstash/wizard pnpm dlx @cipherstash/wizard yarn dlx @cipherstash/wizard bunx @cipherstash/wizard
The wizard reads your codebase, asks which columns to encrypt, hands a surgical prompt to the Claude Agent SDK against the CipherStash-hosted LLM gateway, and runs deterministic post-agent steps (package install,
db install,db push, framework migrations). Same behavior as the previousstash wizardcommand — just shipped as its own package so it doesn't bloat the cli's dependency tree.
@cipherstash/cli@0.9.0
Minor Changes
-
5d3eb13: Reduce friction in
stash init.- No more "How will you connect to your database?" prompt. Init now auto-detects Drizzle (from
drizzle.config.*ordrizzle-orm/drizzle-kitinpackage.json) and Supabase (from the host inDATABASE_URL), and silently picks the matching encryption client template. Falls back to a generic Postgres template otherwise. - No more "Where should we create your encryption client?" prompt. Init writes to
./src/encryption/index.tsby default. The "file already exists, what would you like to do?" prompt still appears so existing client files aren't silently overwritten. - Single combined dependency-install prompt. Previously init asked twice (once for
@cipherstash/stack, once for@cipherstash/cli). It now asks once, listing both, and runs the installs in sequence. When both packages are already innode_modules, no prompt appears at all. - Already-authenticated users skip the "Continue with workspace X?" prompt. Init logs
Using workspace Xand proceeds. Runstash auth logindirectly to switch workspaces.
stash db installnow also calls into the same encryption-client scaffolder as a safety net — users who rundb installwithoutinitfirst still get a working client file generated at the path theirstash.config.tspoints to. - No more "How will you connect to your database?" prompt. Init now auto-detects Drizzle (from
-
5d3eb13: Breaking: the
stash wizardcommand has been removed. The AI-guided encryption setup is now its own package — run it vianpx @cipherstash/wizard(orpnpm dlx,bunx,yarn dlx).The wizard was pulling
@anthropic-ai/claude-agent-sdk(47MB unpacked) into everynpx @cipherstash/cliinvocation, even for fast commands likeinit,auth, anddb install. Splitting it out keeps cli's dependency tree small and lets each package manager handle the wizard's install natively — no more shelling out tonpmfrom inside the cli, no Yarn PnP / Bun-only failure modes.The next-steps output from
initanddb installstill recommendsnpx @cipherstash/wizardas the automated path. Theschema buildcommand no longer offers a wizard/builder selection prompt — it goes straight to the schema builder.
@cipherstash/cli@0.10.1
Patch Changes
- f34fe9d: Show and execute commands using the detected package manager's runner (
npx/bunx/pnpm dlx/yarn dlx) instead of always emittingnpx. A user who runsbunx @cipherstash/cli initnow sees a "Next Steps" panel that suggestsbunx @cipherstash/cli db installandbunx @cipherstash/wizard, and the wizard's post-agent step both displays and shells out tobunx @cipherstash/cli db push(was:Failed: npx @cipherstash/cli db push). Wizard prerequisite messages and AI-agent error hints (e.g. on a 401,Run: bunx @cipherstash/cli auth login) follow the same rule. Detection sources are unchanged:npm_config_user_agentfirst, then lockfile, thennpxfallback.
@cipherstash/cli@0.10.0
Minor Changes
-
79f4a0b: Fix
loadStashConfigto correctly unwrap the default export fromstash.config.ts. Previously, any database-touching command (db install,db push,db validate,db status,db test-connection,schema build) would fail validation against a perfectly valid config with:Error: Invalid stash.config.ts - databaseUrl: Invalid input: expected nonoptional, received undefinedThe issue: in jiti 2.x, the
interopDefault: trueoption passed tocreateJiti(...)only applies to the deprecated synchronousjiti(id)callable form. The asyncjiti.import()ignores it and always returns the full module namespace. Withexport default defineConfig({...})that meant Zod was validating{ default: { databaseUrl, client } }and reportingdatabaseUrlas undefined even when the user's config plainly set it.Switched to jiti's per-call
{ default: true }option, which does work onjiti.import(). Added an integration test that exercises real jiti against a real tempstash.config.tsso future regressions get caught — the previous mocked test was passing the bug straight through.This bug surfaced after
db installstarted loadingstash.config.ts(during the onboarding overhaul), but affected every other command that reads the config.