A CLI tool for interacting with Revisium instances, providing migration management, schema export, data export, and project synchronization capabilities.
- Migration Management - Save and apply database migrations with auto-commit
- Schema Export/Import - Export table schemas and convert to migrations
- Data Export/Upload - Export and upload rows with smart dependency handling
- Project Sync - Synchronize schema and data between Revisium projects
- Bulk Operations - Efficient batch operations with configurable batch size
- Docker Deployment - Containerized automation for CI/CD
# Install globally
npm install -g revisium
# Or use with npx
npx revisium --help┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ DEV │ │ GIT │ │ CI/CD │
│ │ │ │ │ │
│ Revisium │ save │ migrations │ push │ apply │
│ UI │─────▶│ .json │─────▶│ migrations │
│ │ │ data/ │ │ + seed │
└─────────────┘ └─────────────┘ └─────────────┘
Like Prisma, save schema migrations locally and apply them in CI/CD:
# 1. Save migrations locally (during development)
revisium migrate save --file ./revisium/migrations.json \
--url revisium://admin:admin@localhost:8080/myorg/myproject/master
# 2. Commit to git
git add revisium/migrations.json
git commit -m "Add new schema fields"
# 3. Apply in CI/CD (on deploy)
revisium migrate apply --file ./revisium/migrations.json --commit \
--url revisium://cloud.revisium.io/myorg/myproject/masterAdd to package.json scripts:
{
"scripts": {
"revisium:save-migrations": "revisium migrate save --file ./revisium/migrations.json",
"revisium:apply-migrations": "revisium migrate apply --file ./revisium/migrations.json --commit",
"start:prod": "npm run revisium:apply-migrations && node dist/main"
}
}See Docker Deployment for complete CI/CD examples.
┌─────────────┐ ┌─────────────┐
│ SOURCE │ migrations.json │ TARGET │
│ Revisium │ ────────────────────▶ │ Revisium │
│ │ data/ │ │
└─────────────┘ └─────────────┘
Save project to files for backup or deployment to another instance:
# Export from source
revisium migrate save --file ./migrations.json
revisium rows save --folder ./data
# Import to target
revisium migrate apply --file ./migrations.json --commit \
--url revisium://target.example.com/org/proj/main
revisium rows upload --folder ./data --commit \
--url revisium://target.example.com/org/proj/master┌─────────────┐ ┌─────────────┐
│ SOURCE │ schema + data │ TARGET │
│ Revisium │ ════════════════════▶ │ Revisium │
│ │ (direct) │ :draft │
└─────────────┘ └─────────────┘
Synchronize directly between two projects without intermediate files:
# With tokens in URL
revisium sync all \
--source revisium://source.example.com/org/proj/master:head?token=xxx \
--target revisium://target.example.com/org/proj/master?token=yyy \
--commit
# With tokens via environment (recommended for CI/CD)
export REVISIUM_SOURCE_TOKEN=$SOURCE_TOKEN
export REVISIUM_TARGET_TOKEN=$TARGET_TOKEN
revisium sync all \
--source revisium://source.example.com/org/proj/master:head \
--target revisium://target.example.com/org/proj/master \
--commit| Command | Description | Documentation |
|---|---|---|
schema save |
Export table schemas to JSON files | Schema Commands |
schema create-migrations |
Convert schemas to migration format | Schema Commands |
migrate save |
Export migrations to JSON file | Migrate Commands |
migrate apply |
Apply migrations from JSON file | Migrate Commands |
rows save |
Export table data to JSON files | Rows Commands |
rows upload |
Upload table data from JSON files | Rows Commands |
sync schema |
Sync schema between projects | Sync Commands |
sync data |
Sync data between projects | Sync Commands |
sync all |
Full sync (schema + data) | Sync Commands |
Configure via environment variables or .env file:
# Recommended: URL + Token
REVISIUM_URL=revisium://cloud.revisium.io/your_org/your_project/main
REVISIUM_TOKEN=your_jwt_token
# Alternative: URL + Username/Password
REVISIUM_URL=revisium://cloud.revisium.io/your_org/your_project/main
REVISIUM_USERNAME=your_username
REVISIUM_PASSWORD=your_passwordOr use command-line --url option with credentials via environment:
# Token in environment, target in URL
export REVISIUM_TOKEN=$MY_TOKEN
revisium schema save --folder ./schemas \
--url revisium://cloud.revisium.io/my-org/my-project/develop
# Token in URL query parameter
revisium schema save --folder ./schemas \
--url revisium://cloud.revisium.io/my-org/my-project/develop?token=$TOKENSee Configuration and URL Format for details.
- Configuration - Environment variables and .env files
- URL Format - Revisium URL syntax
- Authentication - Token, API key, and password auth
- Schema Commands - schema save, create-migrations
- Migrate Commands - migrate save, apply
- Rows Commands - rows save, upload
- Sync Commands - sync schema, data, all
- Docker Deployment - Docker, Kubernetes, CI/CD
git clone https://github.com/revisium/revisium-cli.git
cd revisium-cli
npm install
npm run buildMIT License - see LICENSE file for details.