@the-andb/cli
v1.0.0
Published
CLI tool for the Andb Orchestrator - Database migration and comparison
Maintainers
Readme
@the-andb/cli
The official Command-Line Interface for the Andb Orchestrator.
Powerful Orchestration: Built on top of @the-andb/core, this tool provides the
andbcommand for interactive setup, script generation, and professional database synchronization workflows.
🚀 Installation
You can install the CLI globally:
npm install -g @the-andb/cliOr run it directly without installation using npx:
npx andb init(Note: npx andb is also available if you have @the-andb/core installed in your project)
📦 CLI vs. Core: Which one to choose?
| Feature | @the-andb/cli (The Orchestrator) | @the-andb/core (The Brain) |
| :-------------- | :-------------------------------------- | :------------------------------------ |
| Primary Use | End-user tool for schema management | Base library for building on top |
| Interactive | ✅ Yes (andb init) | ❌ No (Raw CLI only) |
| Automation | ✅ Auto-generates npm scripts | ❌ Provide modules for manual scripts |
| Ideal For | Developers wanting rapid setup | DevOps specialists building pipelines |
⚡️ Quick Start
1. Initialize
Run the high-fidelity interactive setup to create your orchestration configuration:
cd your-project
andb initThis will generate an andb.yaml file containing your environment and credential mappings.
2. Generate Workflow Scripts
Auto-generate optimized npm scripts to bake Andb into your package.json:
andb generate3. Execution
Run your newly generated commands to keep your schemas in sync:
# Export current DDL from DEV
npm run export:dev
# Compare STAGE with DEV (Schema Intelligence)
npm run compare:stage
# Execute migration to PRODUCTION
npm run migrate:prod🏗️ The Trinity Architecture
The Andb is built as a three-part ecosystem that works together seamlessly:
- @the-andb/core: The "Brain" - engine for diffing, parsing, and execution.
- @the-andb/cli: The "Automation" - for CI/CD and terminal-heavy workflows.
- The Andb App: The "Intuition" - a premium desktop interface.
🔧 Commands
Discovery & Setup
andb init: Interactive configuration builder.andb generate(aliasgen): Synchronizepackage.jsonwith yourandb.yamlflow.andb helper: List all available commands and utility tools.
Database Operations
andb export: Snapshot your current schema (Tables, Views, SPs, etc.).andb compare: Intelligence engine to detect structural mutations between environments.andb migrate:new: Deploy newly created objects.andb migrate:update: Sync existing object modifications.andb monitor: Real-time database health monitoring (Processlist, Connections, etc.).
📊 Support
- Bugs & Features: GitHub Issues
- Engine Source: @the-andb/core
Keep Going. Keep Syncing.
MIT © The Andb
