Based on WCDB C++ Corruption/Backup/Repair, this repo provides a Windows WCDB database repair CLI tool and builds artifacts via GitHub Actions.
- Corruption check:
check(Database::checkIfCorrupted()) - Manual backup:
backup(Database::backup()) - Repair:
repair(Database::retrieve()with progress + score) - Deposit & cleanup:
deposit/contains-deposited/remove-deposited - Encrypted DB:
--key-hex/--cipher-page-size/--cipher-version - Plaintext key:
--key(ASCII/UTF-8) - SQLCipher compatibility pragmas:
--kdf-iter/--cipher-hmac-algorithm - More SQLCipher params:
--cipher-default-kdf-algorithm/--cipher - SQL trace: enabled by default (disable via
--no-sql-trace)
Requires: Visual Studio (MSVC), CMake, Ninja (recommended).
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
.\build\wcdb-repair.exe --help# Check corruption (may be slow)
.\wcdb-repair.exe check "C:\path\to\db.sqlite"
# Repair (prints PROGRESS=... and RESULT=repair score=...)
.\wcdb-repair.exe repair "C:\path\to\db.sqlite"
# Encrypted DB repair (hex key)
.\wcdb-repair.exe repair "C:\path\to\db.sqlite" --key-hex 001122AABBCC --cipher-version 4 --cipher-page-size 4096
# Encrypted DB repair (plaintext key)
.\wcdb-repair.exe repair "C:\path\to\db.sqlite" --key "my-plaintext-key"
# Encrypted DB with non-default SQLCipher params
.\wcdb-repair.exe repair "C:\path\to\db.sqlite" --key-hex 001122AABBCC --kdf-iter 4000 --cipher-hmac-algorithm HMAC_SHA1
# SQLCipher: custom algorithms/cipher
.\wcdb-repair.exe repair "C:\path\to\db.sqlite" --key-hex 001122AABBCC --cipher-default-kdf-algorithm PBKDF2_HMAC_SHA512 --cipher aes-256-cbc
# Deposit (when repair fails or you want to postpone repair)
.\wcdb-repair.exe deposit "C:\path\to\db.sqlite"Workflow: .github/workflows/build-windows.yml
Every push/PR builds on windows-latest and uploads wcdb-repair-windows.zip.