A CLI tool for interacting with Revisium instances, providing migration management, schema export, and data export capabilities.
npm install revisium




Command-line interface for managing Revisium projects
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
``bashInstall globally
npm install -g revisium
Examples
$3
`
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ 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:
`bash
1. Save migrations locally (during development)
revisium migrate save --file ./revisium/migrations.json \
--url revisium://cloud.revisium.io/myorg/myproject/master?token=$TOKEN2. 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/master
`Add to package.json scripts:
`json
{
"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.
$3
`
┌─────────────┐ ┌─────────────┐
│ SOURCE │ migrations.json │ TARGET │
│ Revisium │ ────────────────────▶ │ Revisium │
│ │ data/ │ │
└─────────────┘ └─────────────┘
`Save project to files for backup or deployment to another instance:
`bash
Export from source
revisium migrate save --file ./migrations.json
revisium rows save --folder ./dataImport 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
`$3
`
┌─────────────┐ ┌─────────────┐
│ SOURCE │ schema + data │ TARGET │
│ Revisium │ ════════════════════▶ │ Revisium │
│ │ (direct) │ :draft │
└─────────────┘ └─────────────┘
`Synchronize directly between two projects without intermediate files:
`bash
revisium sync all \
--source revisium://source.example.com/org/proj/master:head?token=xxx \
--target revisium://target.example.com/org/proj?token=yyy \
--commit
`Commands
| 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 |Configuration
Configure via environment variables or
.env file:`env
REVISIUM_URL=revisium://cloud.revisium.io/your_org/your_project/main
REVISIUM_USERNAME=your_username
REVISIUM_PASSWORD=your_password
`Or use command-line options with URL:
`bash
revisium schema save --folder ./schemas \
--url revisium://cloud.revisium.io/my-org/my-project/develop?token=$TOKEN
`See Configuration and URL Format for details.
Documentation
- 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
Development
`bash
git clone https://github.com/revisium/revisium-cli.git
cd revisium-cli
npm install
npm run build
``MIT License - see LICENSE file for details.