ZeroDB Local CLI - Manage local ZeroDB environment and sync with cloud
Project description
ZeroDB Local CLI
Command-line interface for managing ZeroDB Local environment and syncing with ZeroDB Cloud.
Installation
pip install zerodb-cli
Quick Start
1. Start Local Environment
zerodb local up
2. Login to Cloud
zerodb cloud login --email your@email.com
3. Link Project
zerodb cloud link <project-id>
4. Sync Data
# Generate sync plan
zerodb sync plan
# Apply sync (with confirmation)
zerodb sync apply
# Push to cloud (shorthand)
zerodb sync push
# Pull from cloud (shorthand)
zerodb sync pull
Commands
Sync Commands
-
zerodb sync plan- Generate and display sync plan--schema- Show schema diff only--data- Show data diff only--vectors- Show vector diff only--json- Output as JSON
-
zerodb sync apply- Execute sync plan--yes- Skip confirmation--dry-run- Preview without executing--strategy- Conflict resolution strategy (local-wins, cloud-wins, newest-wins, manual)
-
zerodb sync push- Push local changes to cloud--yes- Skip confirmation--force- Force push, overwriting cloud data
-
zerodb sync pull- Pull cloud changes to local--yes- Skip confirmation
Local Environment Commands
zerodb local init- Initialize local environment (create data directories)zerodb local up- Start all services (docker-compose up -d)--logs- Show logs instead of detaching
zerodb local down- Stop all services--volumes- Also remove volumes
zerodb local status- Show service status and healthzerodb local logs [service]- View service logs--no-follow- Don't follow logs
zerodb local restart [--service NAME]- Restart serviceszerodb local reset- Reset environment (removes all data)--yes- Skip confirmation prompt
Cloud Commands
zerodb cloud login- Login to ZeroDB Cloudzerodb cloud logout- Logout from ZeroDB Cloudzerodb cloud whoami- Show current userzerodb cloud link <project-id>- Link to cloud projectzerodb cloud unlink- Unlink current project
Environment Commands
zerodb env list- List all environmentszerodb env switch <env>- Switch environmentzerodb env current- Show current environment
Inspect Commands
zerodb inspect schema- Show local schema treezerodb inspect vectors- Vector namespace summaryzerodb inspect events- Event lag and offsetszerodb inspect sync-state- Last sync time and status
Features
Conflict Resolution
When conflicts are detected during sync, you can choose how to resolve them:
- local-wins - Always use local version
- cloud-wins - Always use cloud version
- newest-wins - Use the version with the latest timestamp
- manual - Interactively choose for each conflict
Example:
zerodb sync apply --strategy=local-wins
Interactive Conflict UI
When using manual conflict resolution, you'll see an interactive prompt:
⚠️ Conflict Detected
Table: users
Row ID: 550e8400-e29b-41d4-a716-446655440000
Local: {"name": "Alice Smith", "email": "alice@local.com"}
Cloud: {"name": "Alice Johnson", "email": "alice@cloud.com"}
Choose resolution:
1) Use local version
2) Use cloud version
3) Merge manually
4) Skip this conflict
>
Progress Indicators
Long-running operations show progress bars:
Syncing push... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Rollback on Error
If sync fails, all changes are automatically rolled back to prevent partial sync states.
Configuration
Configuration is stored in ~/.zerodb/:
config.json- CLI configurationcredentials.json- Cloud credentials (JWT tokens)
Documentation
For comprehensive documentation, visit: https://docs.ainative.studio/zerodb-local
Support
- Email: hello@ainative.studio
- Website: https://www.ainative.studio
License
MIT License - Copyright (c) 2025 AINative Studio
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zerodb_cli-1.0.0.tar.gz.
File metadata
- Download URL: zerodb_cli-1.0.0.tar.gz
- Upload date:
- Size: 50.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6891e91fd511f2c3c6b9d45554a25e93230543c97bee99c159084771a09b25f1
|
|
| MD5 |
0f9f0987dcc5715bea549c08af6a2872
|
|
| BLAKE2b-256 |
be8defbac9d1d4162b4bfb018fdd9ac849654d6ecfbc908b3f6d9daa094b9eae
|
File details
Details for the file zerodb_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: zerodb_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 36.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73f195526d3625fce1892b33274be815df161792bc0ec5dc22bfa1df4615da82
|
|
| MD5 |
f9c6eb20218bb1905652bf8ea913c235
|
|
| BLAKE2b-256 |
6de622b3855c49578b349a4e3a3f632b28080617368e42c4435c11e9c96c559f
|