The database is a lie.
Subtext is a high-performance, offline relational database engine that abandons traditional storage files. Instead, it mathematically embeds standard SQL table data into the Least Significant Bits (LSB) of standard image directories.
To the OS, you have a folder of high-resolution wallpapers. To Subtext, you have a fully ACID-compliant, SQL-driven Append-Only Log.
No cloud. No .db files. No network connections.
$ ls -l ~/Pictures/Wallpapers
-rw-r--r-- 1 user staff 5.2M bg_01.png
-rw-r--r-- 1 user staff 4.8M bg_02.png
-rw-r--r-- 1 user staff 6.1M bg_03.png
$ subtext sql ~/Pictures/Wallpapers "SELECT username, hash FROM users WHERE id = 1"
+----------+----------------------------------+
| username | hash |
+----------+----------------------------------+
| sarvesh | a9f0e61d137b... |
+----------+----------------------------------+Subtext treats a folder of PNGs/JPGs as a fragmented, Virtual File System (VFS).
- The MBR: The first 64KB of the first image acts as the Master Boot Record, storing the dynamic SQL Schema Registry.
- LSM Architecture: To prevent the CPU overhead of rewriting entire 5MB images for a single
UPDATE, Subtext operates as a Log-Structured Merge-Tree (LSM). Data is serialized into ultra-densepostcardbinaries and appended sequentially across the image pixels. - Plausible Deniability: Before any data touches a pixel, it is masked via a deterministic XOR cipher. Running
stringson the raw images yields nothing but cryptographic noise. Visually, the pixels shift by a maximum of ±2 RGB values, rendering the data mathematically invisible to the human eye.
1. Initialize the Directory Turns a standard folder of images into a Subtext storage block.
subtext init ./my_images2. Execute SQL Subtext supports standard single-table CRUD operations.
subtext sql ./my_images "CREATE TABLE secrets (id INT, payload TEXT)"
subtext sql ./my_images "INSERT INTO secrets VALUES (1, 'The ghost is in the machine')"3. Vacuum (Garbage Collection) Because it is an append-only log, updates leave "dead pixels" behind. Run vacuum to compact the data and free up image capacity.
subtext vacuum ./my_imagesBy default, Subtext secures the XOR cipher by hashing the absolute directory path. For true security, provide your own encryption key via the environment variable:
export SUBTEXT_KEY="your_super_secret_key"Built for the shadows. Rule your domain.