Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

SQLCipher

$ sqlcipher Official Med Risk
Zetetic · Database & Data · BSD-3-Clause · macos / linux / windows

sqlcipher provides full 256-bit AES database encryption atop the familiar SQLite CLI shell. Agents can safely inspect encrypted databases using -readonly -json -bail by passing PRAGMA key in the SQL batch, avoiding accidental file corruption.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
brew install sqlcipher
CLI vs MCP Decision CLI Only

Local encrypted SQLite file engine; agents invoke sqlcipher directly on workspace .db/.enc files.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Inherits SQLite CLI flags (-json, -csv, -readonly, -bail) for clean headless JSON queries, though omitting the SQL argument enters a blocking REPL and PRAGMA key prints ok unless suppressed or handled.

  • -json, -csv, -readonly, and -bail flags supported natively
  • Non-interactive when SQL statement is passed as argument or stdin
Trust & Safety 20 / 25

-readonly guarantees encrypted files cannot be mutated, though passing PRAGMA key in CLI arguments can expose keys in process listings unless piped via stdin.

  • -readonly flag prevents write mutations at the SQLite VFS layer
  • Key passed via CLI arg is visible in ps unless piped via stdin
Setup & Portability 12 / 15

Easy install via brew install sqlcipher and Linux packages; Windows typically requires building from source or MSYS2.

  • Homebrew and distro packages for macOS/Linux; source build on Windows
Utility & Efficiency 12 / 15

Transparent AES-256 encryption with full SQLite SQL and .schema/.dump capabilities.

  • Drop-in encrypted replacement for sqlite3 CLI
Maintenance & Lineage 8 / 10

Official Zetetic open-source project (sqlcipher/sqlcipher) actively tracking upstream SQLite.

  • First-party Zetetic repository under BSD-3-Clause
Docs & Verifiability 8 / 10

Well-documented API/PRAGMA reference on zetetic.net and standard SQLite -help flags.

  • Clear PRAGMA and CLI documentation

Security, Auth & Guardrails

Auth Modes
Env API Key
Credential Storage

Keys are never stored by sqlcipher; pass PRAGMA key via stdin or env-interpolated SQL scripts for each invocation.

Side Effects
Read-Only Local Write Destructive
Cost & Quotas

BSD-3-Clause open-source SQLCipher Community Edition; free (commercial FIPS/enterprise builds are paid).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# SQLCipher Agent Rules
- Always pass `-readonly -json -bail` for read-only inspection of encrypted `.db`/`.enc` files.
- Source `PRAGMA key` from an environment variable (never hardcode keys in repo files or logs).
- Always supply a SQL argument or piped stdin so `sqlcipher` does not hang in the `sqlite>` REPL.

Agent-Ready Command Recipes

Safe Read-Only Queries

Query an encrypted SQLite database in read-only JSON mode
sqlcipher -readonly -json -bail app.enc "PRAGMA key = '$SQLCIPHER_KEY'; SELECT name FROM sqlite_master WHERE type='table';"

Opens app.enc read-only, unlocks it via $SQLCIPHER_KEY, and outputs table metadata as JSON.

Controlled Writes & Previews

Apply a reviewed SQL migration inside a transaction
sqlcipher -bail app.enc "PRAGMA key = '$SQLCIPHER_KEY'; BEGIN; INSERT INTO settings(k,v) VALUES('mode','ci'); COMMIT;"

Unlocks the encrypted database and commits an atomic SQL change, aborting on the first error (-bail).

Strengths for Agents

  • + Native -readonly + -json + -bail flags enable safe encrypted database inspection.
  • + Full SQLite SQL compatibility with transparent AES-256 page encryption.

Caveats & Pitfalls

  • ! Passing PRAGMA key in the command-line string exposes the passphrase to ps; pipe via stdin for sensitive keys.
  • ! Running sqlcipher <file> without a SQL string enters an interactive sqlite> prompt.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI