da-cli
Sync DeviantArt galleries to local folders — zero-dependency Python CLI with OAuth 2.1 PKCE, a SQLite index, and scheduled macOS syncs.
What is it?
What it is
da-cli is a command‑line tool that syncs a user’s DeviantArt gallery to a local folder, acting as a lightweight, secure backup of watched and artist art. It is written in pure Python 3.10+ with no runtime dependencies, uses a local SQLite index for incremental syncs, and supports macOS Keychain or a 0600 config file for secrets.
Why it exists
It fills the need for a zero‑dependency, fully‑automated, and secure way to keep a local copy of DeviantArt content up‑to‑date, without installing heavy libraries or exposing credentials. The tool also provides search, browsing helpers, and scheduling hooks for unattended operation.
Who should use it
DeviantArt users who want to back up their watched galleries or favorite artists' work locally via command line, especially those comfortable with OAuth setup and basic terminal usage.
Who should avoid it
Users unfamiliar with DeviantArt's API, OAuth authentication, or command-line interfaces; those seeking a GUI-based tool or unwilling to register a DeviantArt developer application.
How it works
A quick walkthrough in plain English
How da-cli works
Step 1 of 3
You interact with it
Open da-cli, send a request, or connect it to your stack.
Features
Advantages
- Lightweight and portable due to zero runtime dependencies
- Efficient syncing with SQLite index reducing API calls
- Secure secret management via Keychain/Secret Service
- Automated scheduling for unattended backups
- Comprehensive CLI tools for configuration and troubleshooting
- Search functionality for browsing DeviantArt content
- Cross-platform support (macOS and Linux)
- Active development with 92%+ test coverage
Disadvantages
- Beta status with some features (e.g., Linux Secret Service) in development
- Requires Python 3.10+
- Retired search commands (e.g., `popular`, `newest`) limit discoverability
- Initial setup may be complex for non-technical users
- Depends on DeviantArt API availability and rate limits
Installation
FAQ
How do I install da-cli?
You can install da-cli via pipx (recommended) with `pipx install da-sync`, which installs the `da` command. Alternatively, clone the repository and run `./install.sh` to set up a local copy without affecting global state.
What is the first-time setup process for da-cli?
Create a Confidential OAuth app at https://www.deviantart.com/developers/, set the Redirect URI Whitelist to https://localhost:8765/, then run `da config set client_id <ID>`, `da config set client_secret <SECRET>`, `da config set destination <PATH>`, followed by `da auth` and `da whoami` to complete authentication.
How do I schedule automatic syncs on macOS or Linux?
On macOS, run `./install_schedule.sh` to install a launchd user agent for daily syncs. On Linux, use a systemd user timer or cron; details are in docs/guides/scheduling.md, including steps like enable-linger for systemd.
Where are my OAuth secrets and tokens stored securely?
The client_secret is stored in macOS Keychain (or a 0600-permissioned config file on other platforms). Access and refresh tokens are stored in ~/.local/state/da-cli/state.json with 0600 permissions, and are never logged or exposed in command-line arguments.
What should I do if my scheduled sync appears to run but doesn’t download new content?
Run `da diagnose` to check configuration, credentials, destination folder, index, and scheduled job status. For specific issues like redirect-URI mismatches or expired tokens, see docs/guides/troubleshooting.md.
How can I view or modify configuration settings like the download destination?
Use `da config show` to see all settings and their sources, `da config set destination <PATH>` to change the download location, and `da config get <key>` to read individual values (secrets are masked unless `--unmask` is used).
Featured in Videos
YouTube tutorials and walkthroughs for da-cli
Alternatives
Similar projects ranked by category, topics, and text overlap.