How kurobeats/coldsnake works
ColdSnake is a headless Icedrive client for interactive remote operations and scheduled local-to-cloud backups. The main workflow is CLI configuration and pre-flight checks, incremental mirror planning, upload, verification, and optional pruning; separate commands support downloads/restores and account or file management. The graph follows the sampled CLI, mirror, client, and state code plus documented README capabilities. Some command internals were not sampled, so those capability links are documented rather than inferred from imports.
Main entry points: cli.py CLI commands · sync.py Mirror planner · client.py API client · state.py Sync database
Components 19
Command interface
- CLI commands
src/coldsnake/cli.py - Pre-flight checks
src/coldsnake/sync.py - Reports and webhook
src/coldsnake/cli.py
Icedrive access
- Login and 2FA
src/coldsnake/client.py - API client
src/coldsnake/client.py - Folder listing and changes
src/coldsnake/client.py - Download and resume
src/coldsnake/client.py - Trash and restore
src/coldsnake/client.py - Version history
src/coldsnake/client.py
Backup workflow
- Mirror planner
src/coldsnake/sync.py - Chunked upload
src/coldsnake/client.py - Upload verification
src/coldsnake/sync.py - Prune stale files
src/coldsnake/sync.py
Persistent state
- Sync database
src/coldsnake/state.py - Upload journal
src/coldsnake/state.py
Other components
- Operator
- Icedrive API
- Local files
- Webhook endpoint
Connections 20
- Operator → CLI commands: runs commands
README.md - CLI commands → Pre-flight checks: checks sources
src/coldsnake/cli.py - CLI commands → Mirror planner: runs mirrors
src/coldsnake/cli.py - CLI commands → API client: builds client
src/coldsnake/cli.py - CLI commands → Reports and webhook: reports runs
src/coldsnake/cli.py - CLI commands → Sync database: uses state
src/coldsnake/cli.py - Mirror planner → Local files: scans files
src/coldsnake/sync.py - Mirror planner → API client: lists folders
src/coldsnake/sync.py - Mirror planner → Sync database: reads and records
src/coldsnake/sync.py - Mirror planner → Chunked upload: uploads planned files
README.md - Mirror planner → Upload verification: verifies uploads
src/coldsnake/sync.py - Mirror planner → Prune stale files: optionally prunes
src/coldsnake/sync.py - Chunked upload → Upload journal: resumes chunks
- Login and 2FA → Icedrive API: authenticates
README.md - API client → Icedrive API: calls API
README.md - CLI commands → Folder listing and changes: lists and edits
README.md - CLI commands → Download and resume: downloads files
README.md - CLI commands → Trash and restore: restores items
README.md - CLI commands → Version history: shows versions
README.md - Reports and webhook → Webhook endpoint: posts events
README.md