Query encrypted WAiDrop archives in Dropbox by name/number and time window
pip install waidrop-cli Copy PIP instructions
The CLI talks only to Dropbox and runs entirely locally. It decrypts encrypted archives with your archive key; no server is involved.
Companion extension: the WAiDrop Chrome extension is required to create the archive. The store link will be added here.
On Windows, the tzdata package is installed automatically so --tz can use IANA timezones.
uv tool install waidrop-cli pipx install waidrop-cli From source:
git clone https://github.com/thabiger/waidrop-cli.git cd waidrop-cli uv sync uv run waidrop --help Upgrade or remove:
pip install --upgrade waidrop-cli uv tool upgrade waidrop-cli pip uninstall waidrop-cli uv tool uninstall waidrop-cli Dropbox setup The CLI uses OAuth 2.0 with PKCE and the same Dropbox app as the Chrome extension, so both see the same App Folder. The built-in app key is a public client id; no client secret is involved for the built-in app. Each user authorizes once and the CLI stores a long-lived refresh token locally.
waidrop auth This opens a browser (or prints a URL), asks you to click Allow on Dropbox, and prompts for the authorization code. Credentials are stored at ~/.config/waidrop/credentials.json (file mode 0600, directory 0700). On Windows the default is %APPDATA%\waidrop\credentials.json.
waidrop auth --no-browser # print URL only waidrop auth --code # non-interactive (pass the code) waidrop auth --loopback # localhost callback (desktop) For --loopback, register http://127.0.0.1:53682/callback as a redirect URI in the Dropbox App Console. The paste flow needs no redirect URI.
waidrop auth --status # human-readable waidrop auth --status --json # machine-readable waidrop auth --revoke # revoke remote access + delete local credentials auth --revoke only deletes local credentials after a successful remote revoke. If Dropbox cannot be reached, the local credentials are kept and the command exits with code 5.
The built-in app key is wqiz8ksk2f0jwmd. To use your own app, create a Scoped access app with App folder access in the Dropbox App Console, enable and submit these permissions:
Use PKCE; never ship a client secret. Set the app key with --dropbox-app-key or WAIDROP_DROPBOX_APP_KEY.
Production note: Dropbox apps in development mode are limited to test users, and some scopes require review. Verify the app status and scopes before announcing the CLI publicly.
Old archives: a Dropbox App Folder is namespaced per app. If your archive was created with a different app key, pass --dropbox-app-key or set WAIDROP_DROPBOX_APP_KEY so the CLI looks in the matching folder.
The CLI reads account= /_format.json before fetching data. Only encrypted archives are supported:
Plaintext archives are not supported. An archive whose _format.json declares "mode": "plaintext" is rejected with a clear error.
Flags override environment, which overrides the credentials file.
An explicit access or refresh token (flag/env) disables the credentials file so secrets injected by a host are never overwritten. The archive key is the base64 32-byte key generated by the extension. It is required; without it the archive cannot be decrypted.
Prefer environment variables or the credentials file over command-line secrets: --dropbox-token, --key and --code can appear in shell history and process listings.
# store the archive key and account for MCP and headless use waidrop config # list chats (no messages fetched): names, phones, hashes, jids waidrop chats waidrop chats --name "*Family*" # by contact name (glob/substring, case-insensitive) for a date range waidrop query --name "Alice*" --from 2026-10-01 --to 2026-10-17 # by phone number (any format) for an hour-precise window waidrop query --number "+1 555 0100" --from "2026-10-17 08:00" --to "2026-10-17 18:00" # rolling window waidrop query --name "Alice*" --last 36h waidrop query --name "Alice*" --last 7d --format text # all chats, recent window (no selectors) waidrop query --last 1h waidrop query --from "2026-10-17 08:00" --to "2026-10-17 18:00" --format csv # export full-resolution images/stickers/GIFs plus manifest.ndjson waidrop query --name "*" --last 24h --media-out ./waidrop-media # multiple selectors / formats / output file waidrop query --name "Alice*" --name "*Family*" --number +15550100 \ --from 2026-10-01 --to 2026-10-17 --format csv --out october.csv # direct targeting waidrop query --chat 0123456789abcdef --jid 15550100@c.us --last 2w # per-chat conversation chunks for an analysis window waidrop context --from 2026-10-01 --to 2026-10-17 --format text waidrop context --name "Alice*" --last 6h --context-before 30m \ --max-chars 12000 --format text # context chunks plus exported images/stickers/GIFs and their local paths waidrop context --last 6h --media-out ./waidrop-media --format text Bounds --from / --to accept, in local time (or --tz):
--from is required unless --last is used. --to defaults to now. --last accepts m (minutes), h (hours), d (days), w (weeks) and cannot be combined with --from/--to.
With no selectors, query and context cover all chats (e.g. --last 1h). Chats whose firstSeen/lastSeen cannot overlap the window are skipped, and only part objects whose [firstTs, lastTs] interval can overlap the window are downloaded (legacy parts without lastTs use a start-anchor heuristic). --max-parts still caps the selected parts. --context-before expands the fetched window and therefore counts toward --max-parts.
Text output escapes control characters. CSV output prefixes cells that start with =, +, -, @, tab or carriage return with ' to reduce spreadsheet formula injection. CSV files still contain untrusted chat data; open them with care.
context returns conversation-oriented chunks instead of flat records:
Exit codes: 0 ok, 2 usage/config error, 3 no matched chats / no messages in window, 4 --max-parts guard tripped, 5 Dropbox/network/archive read error.
The CLI auto-refreshes access tokens from the stored refresh token, so no manual rotation is needed. Run waidrop auth once on the host (or copy the credentials file). Then store the archive key in the environment file:
waidrop config It prompts for the key without echoing it, then for the account alias. On a rerun, values already in the env file are offered as defaults: press Enter to keep the existing key (shown as [keep existing], never printed) or the existing alias. It writes ~/.config/waidrop/env with mode 0600 (directory 0700). Use --account work to set a non-primary alias, --env-file PATH for a custom location, or set WAIDROP_KEY / WAIDROP_ACCOUNT to skip the corresponding prompt. The file contains:
# ~/.config/waidrop/env (must be 0600) WAIDROP_KEY= WAIDROP_ACCOUNT=primary On Windows the default is %APPDATA%\waidrop\env. On macOS and Linux the file must not be readable or writable by group or others; the CLI and MCP server reject insecure files and read only WAIDROP_* keys. chats, query, and context load the file automatically, so nothing needs to be exported in your shell; explicit flags and shell environment variables take precedence. The file next to a custom --credentials-file is used when one is passed.
A cron or agent wrapper can still source the file (set -a; . ~/.config/waidrop/env; set +a) before running other tools:
waidrop context --last 6h --context-before 30m --max-chars 12000 --format text Health check:
waidrop auth --status --json # exit 0 = ok, 2 = missing scopes If the refresh token is ever revoked, re-run waidrop auth on the host. Rotate the archive key only with a re-encryption plan (key loss means unreadable history). Never put access tokens in env files or cron lines; the credentials file handles them.
Install waidrop-cli[mcp] to expose a local, read-only MCP stdio server:
pip install "waidrop-cli[mcp]" waidrop-mcp --print-setup The server exposes list_chats and get_context, backed by the same archive reader as the CLI. It works with any MCP-compatible client and does not contact an AI service; selected text is returned only to the connected client. See docs/mcp.md.
Disclaimer: this project is not affiliated with WhatsApp or Meta. Use it only for conversations you are authorized to access. Archiving may violate WhatsApp's Terms of Service; use at your own risk. The software is provided without warranty under the Apache-2.0 license.
uv sync uv run pytest -q # MCP server tests skip without the extra uv sync --extra mcp uv run pytest -q # includes the MCP server tests uv run ruff check . uv run ruff format --check . uv build uvx twine check dist/* Tests run against a local fake Dropbox server (stdlib http.server) with encrypted fixtures and the shared cross-language crypto vector. No Dropbox account is needed.
The crypto contract is shared with the extension. Do not change the envelope magic, version bytes, HKDF salt, or key derivation without updating both projects.
Both files in this release have provenance metadata.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




