{"id":26435,"library":"stash","title":"@cipherstash/cli","description":"CipherStash CLI (v0.10.1) — single command for authentication, project initialization, EQL database lifecycle (install, upgrade, validate, push, migrate), encryption schema building, and secrets management. Requires Node >=22 and peer dependency @cipherstash/stack >=0.6.0. Ships TypeScript types. Differentiators: unified CLI replacing separate tools, auto-detects and scaffolds stash.config.ts, supports Supabase and Drizzle providers. Release cadence: minor updates monthly.","status":"active","version":"0.10.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install stash","lang":"bash","label":"npm"},{"cmd":"yarn add stash","lang":"bash","label":"yarn"},{"cmd":"pnpm add stash","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime SDK peer dependency required for encryption operations","package":"@cipherstash/stack","optional":false}],"imports":[{"note":"ESM-only package since v0.10.0. CommonJS require() will fail.","wrong":"const { defineConfig } = require('@cipherstash/cli')","symbol":"defineConfig","correct":"import { defineConfig } from '@cipherstash/cli'"},{"note":"Default export is not documented; prefer named imports like defineConfig.","wrong":"const cli = require('@cipherstash/cli')","symbol":"default import","correct":"import cli from '@cipherstash/cli'"},{"note":"Type import for TypeScript projects.","wrong":"","symbol":"StashConfig type","correct":"import type { StashConfig } from '@cipherstash/cli'"}],"quickstart":{"code":"npm install -D @cipherstash/cli\nnpx @cipherstash/cli auth login\nnpx @cipherstash/cli init\nnpx @cipherstash/cli db install","lang":"typescript","description":"Install CLI, authenticate, scaffold encryption client and schema, install EQL extensions."},"warnings":[{"fix":"Use import statements and set \"type\": \"module\" in package.json.","message":"Package is ESM-only since v0.10.0. CommonJS require() will throw ERR_REQUIRE_ESM.","severity":"breaking","affected_versions":">=0.10.0"},{"fix":"Check documentation for current recommended approach.","message":"The --supabase and --drizzle flags may be deprecated in future releases in favor of auto-detection.","severity":"deprecated","affected_versions":"<1.0.0"},{"fix":"Ensure .env values are set correctly and not shadowed by shell environment.","message":"The CLI reads .env files automatically but does not override existing environment variables. This can cause confusion if you expect .env to override.","severity":"gotcha","affected_versions":">=0.10.0"},{"fix":"Set umask or chmod 600 on the file after login.","message":"The auth token is saved to ~/.cipherstash/auth.json in plaintext. Ensure file permissions are restrictive.","severity":"gotcha","affected_versions":">=0.10.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Replace const x = require('@cipherstash/cli') with import { defineConfig } from '@cipherstash/cli' and ensure \"type\": \"module\" in package.json.","cause":"Using require() on an ESM-only package.","error":"ERR_REQUIRE_ESM"},{"fix":"Run npm install @cipherstash/stack to install the peer dependency.","cause":"Missing peer dependency @cipherstash/stack.","error":"Error: Cannot find module '@cipherstash/stack'"},{"fix":"Run npx @cipherstash/cli db install first to scaffold the config, or create stash.config.ts manually with defineConfig.","cause":"Cannot find the configuration file. CLI walks up directories from CWD.","error":"Error: stash.config.ts not found"},{"fix":"Set DATABASE_URL in .env or define databaseUrl in your stash.config.ts.","cause":"Missing databaseUrl in stash.config.ts or environment variable.","error":"Error: The `databaseUrl` option is required"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}