CipherStashDocs
CipherStash CLI

Push and status

Push your CipherStash encryption schema to PostgreSQL and use db status and test-connection to check EQL installation and database connectivity.

push

Push your encryption schema to the database.

npx stash db push [options]
OptionDescription
--dry-runLoad and validate the schema, then print it as JSON. No database changes.

push is only required when using CipherStash Proxy. If you're using the SDK directly (Drizzle, Supabase, or plain PostgreSQL), this step is not needed. The schema lives in your application code.

How push works

When pushing, the CLI:

  1. Loads the encryption client from the path in stash.config.ts
  2. Runs schema validation (warns but doesn't block)
  3. Transforms SDK data types to EQL-compatible cast_as values
  4. Connects to Postgres and marks existing eql_v2_configuration rows as inactive
  5. Inserts the new config as an active row

SDK to EQL type mapping

The SDK uses developer-friendly type names, but EQL expects PostgreSQL-aligned types. The push command maps these automatically:

SDK type (dataType())EQL cast_as
stringtext
texttext
numberdouble
bigintbig_int
booleanboolean
datedate
jsonjsonb

status

Show the current state of EQL in your database.

npx stash db status

Reports:

  • Whether EQL is installed and which version
  • Database permission status
  • Whether an active encrypt config exists in eql_v2_configuration (only relevant for CipherStash Proxy)

test-connection

Verify that the database URL in your config is valid and the database is reachable.

npx stash db test-connection

Reports the database name, connected user/role, and PostgreSQL server version. Useful for debugging connection issues before running install or push.

On this page