Skip to content

CLI Command Reference

Complete reference for all ANTE CLI commands. All commands are accessible via the ante command after installing the CLI globally.

Command Format

bash
ante <command> [options]
ante <command> <subcommand> [options]

Global Options

These options work with most commands:

  • --help, -h - Display help for a command
  • --version, -v - Display CLI version

Installation & Setup

ante install

Install ANTE ERP on your system.

Usage:

bash
ante install [options]

Options:

Installation Location:

  • -d, --dir <path> - Installation directory (default: ./ante-erp)

Domain Configuration:

  • --frontend-domain <url> - Frontend domain/URL (e.g., https://erp.company.com)
  • --api-domain <url> - API domain/URL (e.g., https://api.company.com)

Port Configuration:

  • --port <port> - Frontend port (default: 8080)

Frontend App Selection:

  • --with-facial - Install Facial Recognition Web app
  • --with-gate - Install Gate App (school attendance management)
  • --with-guardian - Install Guardian App (parent portal)
  • --with-pos - Install Point of Sale (POS) app
  • --with-all-frontends - Install all frontend applications

Installation Preset:

  • --preset <type> - Installation preset: minimal, standard, or enterprise (default: standard)

Installation Behavior:

  • --no-interactive - Non-interactive mode with defaults
  • --skip-checks - Skip system requirements check (not recommended)

Examples:

Basic Installation:

bash
# Interactive installation (recommended for first-time users)
ante install

# Non-interactive with custom directory
ante install --dir /opt/ante-erp --no-interactive

# Custom port
ante install --port 9000

Frontend App Selection:

bash
# Install with Facial Recognition app
ante install --with-facial

# Install with Gate App (school attendance)
ante install --with-gate

# Install with Guardian App (parent portal)
ante install --with-guardian

# Install with POS app
ante install --with-pos

# Install all frontend apps
ante install --with-all-frontends

# Install specific combination of apps
ante install --with-gate --with-guardian --with-facial

Domain and SSL Configuration:

bash
# Enterprise preset with domain configuration
ante install \
  --preset enterprise \
  --frontend-domain https://erp.company.com \
  --api-domain https://api.company.com

# Install with all apps and domain configuration
ante install \
  --with-all-frontends \
  --frontend-domain https://erp.company.com \
  --api-domain https://api.company.com

Advanced Installation:

bash
# Complete custom installation with all options
ante install \
  --dir /opt/ante-erp \
  --preset enterprise \
  --frontend-domain https://erp.company.com \
  --api-domain https://api.company.com \
  --port 8080 \
  --with-all-frontends \
  --no-interactive

# Skip system checks (for Docker-only environments)
ante install --skip-checks --no-interactive

What it does:

  1. Checks system requirements (Docker, disk space, etc.)
  2. Generates secure credentials for all services
  3. Creates Docker Compose configuration
  4. Pulls Docker images
  5. Starts all services
  6. Runs database migrations
  7. Performs health checks
  8. Saves credentials to installation-credentials.txt

Service Management

ante start

Start ANTE services.

Usage:

bash
ante start [options]

Options:

  • -s, --service <name> - Start specific service only

Examples:

bash
# Start all services
ante start

# Start specific service
ante start --service backend
ante start --service frontend
ante start --service postgres

Available Services:

  • backend - NestJS API server
  • frontend - Vue.js frontend application
  • postgres - PostgreSQL database
  • redis - Redis cache and queue
  • mongodb - MongoDB document database

ante stop

Stop ANTE services.

Usage:

bash
ante stop [options]

Options:

  • -s, --service <name> - Stop specific service only

Examples:

bash
# Stop all services
ante stop

# Stop specific service
ante stop --service backend

Note: Stopping services does not delete data. All data is preserved in Docker volumes.


ante restart

Restart ANTE services.

Usage:

bash
ante restart [options]

Options:

  • -s, --service <name> - Restart specific service only

Examples:

bash
# Restart all services
ante restart

# Restart backend only (useful after configuration changes)
ante restart --service backend

Status & Monitoring

ante status

Show current status of all ANTE services.

Usage:

bash
ante status

Alias: ante ps

Output includes:

  • Service name
  • Running state (running/stopped)
  • Health status (healthy/unhealthy)
  • Port mappings

Example output:

📊 ANTE ERP Status

┌──────────┬─────────────┬───────────┬──────────────┐
│ Service  │ Status      │ Health    │ Ports        │
├──────────┼─────────────┼───────────┼──────────────┤
│ backend  │ ● running   │ ✓ healthy │ 3001→3000    │
│ frontend │ ● running   │ ✓ healthy │ 8080→80      │
│ postgres │ ● running   │ ✓ healthy │ 5433→5432    │
│ redis    │ ● running   │ ✓ healthy │ 6380→6379    │
│ mongodb  │ ● running   │ ✓ healthy │ 27018→27017  │
└──────────┴─────────────┴───────────┴──────────────┘

✓ All services running

ante health / ante doctor

Run comprehensive health checks on your ANTE installation.

Usage:

bash
ante health
ante doctor  # alias

Checks performed:

  • Docker daemon status
  • Docker Compose version
  • Service health status
  • Database connectivity
  • Disk space availability
  • Memory usage
  • Network connectivity
  • Configuration validity

Example output:

🔍 ANTE System Health Check

System Requirements:
✓ Docker: 24.0.7 (OK)
✓ Docker Compose: v2.23.0 (OK)
✓ Node.js: v24.0.0 (OK)

Resources:
✓ Disk Space: 45GB free (OK)
✓ Memory: 12GB available (OK)

Services:
✓ Backend: Running, healthy
✓ Frontend: Running, healthy
✓ PostgreSQL: Running, healthy
✓ Redis: Running, healthy
✓ MongoDB: Running, healthy

Databases:
✓ PostgreSQL: Connected
✓ Redis: Connected
✓ MongoDB: Connected

✓ All health checks passed

ante logs

View logs from ANTE services.

Usage:

bash
ante logs [options]

Options:

  • -s, --service <name> - View logs for specific service
  • -f, --follow - Follow log output (real-time)
  • -n, --lines <number> - Number of lines to show (default: 100)
  • --since <time> - Show logs since timestamp (e.g., 10m, 1h, 2025-10-27)

Examples:

bash
# View last 100 lines from all services
ante logs

# Follow logs in real-time
ante logs --follow

# View backend logs only
ante logs --service backend

# View last 500 lines of backend logs
ante logs --service backend --lines 500

# Follow backend logs (useful for debugging)
ante logs --service backend --follow

# View logs from last 30 minutes
ante logs --since 30m

# Export logs to file
ante logs > ante-logs-$(date +%Y%m%d).txt

Available Services:

  • backend
  • frontend
  • postgres
  • redis
  • mongodb

Backup & Restore

ante backup

Create a complete backup of your ANTE ERP installation.

Usage:

bash
ante backup [options]

Alias: ante dump

Options:

  • -o, --output <path> - Custom output file path
  • -k, --keyword <text> - Add keyword to backup filename for easier identification
  • --clean - Clean up backups older than 24 hours before creating new backup

Examples:

bash
# Create full backup (default timestamped filename)
ante backup

# Create backup with custom path
ante backup -o /backups/ante-backup-before-update.tar.gz

# Create backup with keyword for easy identification
ante backup -k before-major-update

# Create backup and clean old backups (older than 24 hours)
ante backup --clean

# Combine keyword and cleanup
ante backup -k production-snapshot --clean

# Custom path with keyword
ante backup -o /backups/custom-backup.tar.gz -k pre-migration

What's included:

  • PostgreSQL database (full dump)
  • MongoDB database
  • Redis data
  • Uploaded files and attachments
  • Environment configuration
  • Docker Compose configuration

Backup location: Backups are stored in ./backups/ directory by default.

Filename formats:

  • Default: ante-backup-YYYY-MM-DD-HHMMSS-AM/PM.tar.gz
  • With keyword: ante-backup-YYYY-MM-DD-HHMMSS-AM/PM-<keyword>.tar.gz
  • Custom path: Uses the path you specify with -o option

Keyword feature: The -k, --keyword option adds a meaningful identifier to the backup filename, making it easier to find specific backups later.

Examples with keywords:

bash
# Before database migration
ante backup -k pre-migration
# Creates: ante-backup-2025-11-17-143022-PM-pre-migration.tar.gz

# Before major version update
ante backup -k v2.0-upgrade
# Creates: ante-backup-2025-11-17-143022-PM-v2.0-upgrade.tar.gz

# Production snapshot
ante backup -k production-snapshot
# Creates: ante-backup-2025-11-17-143022-PM-production-snapshot.tar.gz

Cleanup feature: The --clean option automatically removes backups older than 24 hours before creating a new backup. This helps manage disk space by removing old backups.


ante backup list

List all available backups.

Usage:

bash
ante backup list

Example output:

💾 Available Backups

┌──────────────────────────────────────────┬─────────┬──────────────────────┐
│ Filename                                 │ Size    │ Created              │
├──────────────────────────────────────────┼─────────┼──────────────────────┤
│ ante-backup-2025-10-27-143022.tar.gz    │ 245 MB  │ 2025-10-27 14:30:22  │
│ ante-backup-2025-10-26-090015.tar.gz    │ 238 MB  │ 2025-10-26 09:00:15  │
│ ante-backup-2025-10-25-183045.tar.gz    │ 230 MB  │ 2025-10-25 18:30:45  │
└──────────────────────────────────────────┴─────────┴──────────────────────┘

3 backups found (713 MB total)

ante restore

Restore ANTE from a backup file (local or S3).

Usage:

bash
ante restore [file] [options]

Options:

  • --force - Skip confirmation prompts

Examples:

bash
# Interactive restore (shows both local and S3 backups)
ante restore

# Restore specific backup file
ante restore ./backups/ante-backup-2025-10-27-143022.tar.gz

# Restore without confirmation
ante restore ./backups/ante-backup-2025-10-27-143022.tar.gz --force

Interactive Selection:

When you run ante restore without specifying a file, it automatically detects both local and S3 backups (if daily backup is configured):

bash
$ ante restore

Found 8 backup(s):
  Local: 3
  S3:    5

? Select backup to restore:
 [S3]     ante-backup-2025-11-18_03-00-00-AM.tar.gz (287.45 MB) - today
    [S3]     ante-backup-2025-11-17_03-00-00-AM.tar.gz (285.32 MB) - 1 day ago
    [S3]     ante-backup-2025-11-16_03-00-00-AM.tar.gz (283.19 MB) - 2 days ago
    [LOCAL]  ante-backup-2025-11-15_03-00-00-AM.tar.gz (280.00 MB) - 3 days ago
    [LOCAL]  ante-backup-2025-11-14_03-00-00-AM.tar.gz (278.00 MB) - 4 days ago

Features:

  • Unified view - Shows both local and S3 backups in one list
  • Auto-download - Automatically downloads S3 backups before restoring
  • Progress tracking - Shows download progress for S3 backups
  • Smart sorting - Newest backups appear first
  • Relative timestamps - Shows "today", "1 day ago", etc.

S3 Download Progress:

When you select an S3 backup, it's automatically downloaded with progress tracking:

bash
 Downloading from S3... 47% (135.23 MB / 287.45 MB)
 Downloaded backup from S3: ante-backup-2025-11-18_03-00-00-AM.tar.gz

Multi-Server Setup:

If you use the same S3 bucket for multiple servers, backups are automatically isolated by server IP. Each server only sees its own backups:

your-bucket/
├── 143.198.91.153/    # Production server backups
├── 178.128.49.38/     # Staging server backups
└── 192.168.1.100/     # Development server backups

This prevents accidental cross-server restores.

⚠️ Warning: Restoring will overwrite all current data. This operation cannot be undone.

What it does:

  1. Downloads from S3 if remote backup selected (with progress)
  2. Stops all services
  3. Extracts backup archive
  4. Restores PostgreSQL database
  5. Restores MongoDB database
  6. Restores Redis data
  7. Restores uploaded files
  8. Restores configuration
  9. Restarts all services
  10. Cleans up temporary files
  11. Runs health checks

See also:


ante set-daily-backup

Configure automated daily backups to S3-compatible cloud storage (DigitalOcean Spaces, AWS S3, etc.).

Usage:

bash
ante set-daily-backup [options]

Options:

  • --endpoint <url> - S3 endpoint URL (e.g., https://sgp1.digitaloceanspaces.com)
  • --region <region> - S3 region (default: sgp1)
  • --bucket <name> - S3 bucket name
  • --access-key <key> - S3 access key
  • --secret-key <key> - S3 secret key
  • --schedule <cron> - Cron schedule (default: 0 3 * * * - daily at 3:00 AM)
  • --retention <days> - Retention period in days (default: 30)
  • --folder-prefix <name> - Custom folder prefix (default: auto-detected server IP)
  • --test - Run test backup immediately after setup

Examples:

Interactive Setup (Recommended):

bash
# Prompts for all required information
ante set-daily-backup

# Example interaction:
# ? S3 Endpoint: https://sgp1.digitaloceanspaces.com
# ? S3 Region: sgp1
# ? S3 Bucket Name: ante-backups
# ? S3 Access Key: DO801A32T8C74...
# ? S3 Secret Key: ********************
#
# ✓ Testing S3 connection...
# ✓ S3 connection successful!
# ✓ Setting up cron job...
# ✓ Running test backup...
# ✓ Daily backups configured successfully!

Non-Interactive Setup:

bash
# Useful for automation or scripts
ante set-daily-backup \
  --endpoint https://sgp1.digitaloceanspaces.com \
  --region sgp1 \
  --bucket ante-backups \
  --access-key DO801A32T8C74EUHZFKU \
  --secret-key 4Uh5/JqSDrgkeQ2z9c3A... \
  --retention 30 \
  --folder-prefix production-server

Custom Schedule:

bash
# Daily at 2:00 AM
ante set-daily-backup --schedule "0 2 * * *"

# Every 12 hours
ante set-daily-backup --schedule "0 */12 * * *"

# Weekly (Sunday at 3:00 AM)
ante set-daily-backup --schedule "0 3 * * 0"

What Happens During Setup:

  1. ✅ Tests S3 connection with provided credentials
  2. ✅ Encrypts and stores credentials securely (AES-256)
  3. ✅ Sets up automated cron job for daily backups
  4. ✅ Runs immediate test backup to verify configuration
  5. ✅ Configures 30-day automatic cleanup

Backup Process:

Each day at the scheduled time:

  1. Creates local backup (PostgreSQL, MongoDB, Redis, files, config)
  2. Uploads to S3 with progress tracking
  3. Organizes in server-specific folder (by IP address)
  4. Deletes backups older than retention period
  5. Logs all operations to ~/.ante-cli-backup.log

S3 Organization:

your-bucket/
└── 143.198.91.153/                 # Server IP (auto-detected)
    ├── ante-backup-2025-11-18_03-00-00-AM.tar.gz
    ├── ante-backup-2025-11-17_03-00-00-AM.tar.gz
    └── ... (up to 30 days)

Multi-Server Setup:

You can safely use the same S3 bucket for multiple servers. Each server's backups are automatically isolated by IP address:

your-bucket/
├── 143.198.91.153/    # Production server
├── 178.128.49.38/     # Staging server
└── 192.168.1.100/     # Development server

Security Features:

  • 🔐 Encrypted Credentials - S3 keys encrypted at rest using AES-256
  • 🔐 Secure Transfer - All S3 operations use HTTPS
  • 🔐 Server Isolation - Each server stores backups in separate folder
  • 🔐 Access Control - Credentials stored in user-specific config

Cost Optimization:

DigitalOcean Spaces example:

  • Base cost: $5/month (includes 250GB storage)
  • Average backup size: ~300MB
  • 30 days retention: ~9GB total
  • Result: Well within included storage

Recommendations:

  • Use same region as your server to reduce egress costs
  • Configure 30-day retention (default) for balance
  • Monitor bucket size with ante daily-backup status

See also:


ante disable-daily-backup

Disable automated daily backups.

Usage:

bash
ante disable-daily-backup

What it does:

  • Removes cron job for automated backups
  • Marks daily backup as disabled in configuration
  • Does NOT delete existing backups on S3
  • Credentials remain stored (encrypted)

Example:

bash
$ ante disable-daily-backup

 Disabling daily backups...
 Daily backups disabled successfully!

Note: Existing backups on S3 have not been deleted.
To re-enable: ante set-daily-backup

Re-enabling:

To re-enable daily backups, simply run ante set-daily-backup again. Your existing configuration will be restored.


ante daily-backup Command Group

Manage daily backup operations.

Available Commands:


ante daily-backup status

Show daily backup configuration and status.

Usage:

bash
ante daily-backup status

Example Output:

bash
╔══════════════════════════════════════════╗
      Daily Backup Status
╚══════════════════════════════════════════╝

  Status          Enabled
  Schedule        0 3 * * * (Daily at 3:00 AM)
  S3 Bucket       ante-backups
  S3 Endpoint     https://sgp1.digitaloceanspaces.com
  Folder Prefix   143.198.91.153
  Retention       30 days
  Last Backup     2025-11-18 03:00:15
  Last Status     Success

📊 S3 Bucket Info:
  Total Backups   15
  Total Size      4.2 GB
  Oldest Backup   2025-10-20 03:00:02
  Newest Backup   2025-11-18 03:00:15

 Next scheduled backup: 2025-11-19 03:00:00

Information Displayed:

  • Current configuration (schedule, bucket, retention)
  • Last backup timestamp and status
  • S3 bucket statistics (count, size, date range)
  • Next scheduled run time

Use Cases:

  • Verify backup is running correctly
  • Check S3 storage usage
  • Confirm schedule and retention settings
  • Troubleshoot backup issues

ante daily-backup run

Trigger manual backup now (uses same process as automated backup).

Usage:

bash
ante daily-backup run

Example Output:

bash
🔄 Starting manual backup...

 Creating local backup...
 Local backup created: /root/ante-erp/backups/ante-backup-2025-11-18_15-30-22-PM.tar.gz

 Uploading to S3... 47% (135.23 MB / 287.45 MB)
 Uploaded to S3: 143.198.91.153/ante-backup-2025-11-18_15-30-22-PM.tar.gz

 Cleaning old backups...
 Cleaned 2 old backup(s)

 Backup completed successfully!

Use Cases:

  • Test backup configuration
  • Create backup before risky operations
  • Verify S3 credentials are working
  • Manually trigger backup outside schedule

ante daily-backup logs

View backup logs from automated runs.

Usage:

bash
ante daily-backup logs [options]

Options:

  • --lines <n> - Number of lines to show (default: 50)

Examples:

bash
# View last 50 lines (default)
ante daily-backup logs

# View last 100 lines
ante daily-backup logs --lines 100

# Follow logs in real-time (during manual run)
tail -f ~/.ante-cli-backup.log

Log File Location:

~/.ante-cli-backup.log

Example Log Output:

[2025-11-18T03:00:01Z] [INFO] Starting automated daily backup...
[2025-11-18T03:00:02Z] [INFO] Backup configuration loaded successfully
[2025-11-18T03:00:02Z] [INFO] S3 Bucket: ante-backups
[2025-11-18T03:00:02Z] [INFO] Folder Prefix: 143.198.91.153
[2025-11-18T03:00:03Z] [INFO] Step 1/3: Creating local backup...
[2025-11-18T03:02:45Z] [SUCCESS] Local backup created: ante-backup-2025-11-18_03-00-00-AM.tar.gz
[2025-11-18T03:02:46Z] [INFO] Step 2/3: Uploading backup to S3...
[2025-11-18T03:05:30Z] [SUCCESS] Backup uploaded successfully to S3
[2025-11-18T03:05:31Z] [INFO] Step 3/3: Cleaning old backups...
[2025-11-18T03:05:35Z] [SUCCESS] Cleaned 2 old backup(s)
[2025-11-18T03:05:35Z] [SUCCESS] Automated backup completed successfully!

Use Cases:

  • Verify backups are running
  • Troubleshoot backup failures
  • Monitor backup duration
  • Check what was backed up

ante daily-backup list

List all remote backups stored on S3.

Usage:

bash
ante daily-backup list

Example Output:

bash
📦 Remote Backups (15 total):

┌──────────────────────────────────────────────┬──────────┬──────────────────────┐
 Name Size Date
├──────────────────────────────────────────────┼──────────┼──────────────────────┤
 ante-backup-2025-11-18_03-00-00-AM.tar.gz 287.45 MB│ 2025-11-18 03:00:15
 ante-backup-2025-11-17_03-00-00-AM.tar.gz 285.32 MB│ 2025-11-17 03:00:10
 ante-backup-2025-11-16_03-00-00-AM.tar.gz 283.19 MB│ 2025-11-16 03:00:08
 ante-backup-2025-11-15_03-00-00-AM.tar.gz 280.15 MB│ 2025-11-15 03:00:05
 ... (11 more backups)                         │          │                      │
└──────────────────────────────────────────────┴──────────┴──────────────────────┘

Information Shown:

  • Backup filename
  • File size in MB
  • Creation date and time
  • Total count

Use Cases:

  • Verify backups are being created
  • Check retention is working (should be ≤30 backups)
  • Find specific backup to restore
  • Monitor storage usage

ante daily-backup clean

Manually clean old backups from S3 (respects retention period).

Usage:

bash
ante daily-backup clean

Example Output:

bash
 Cleaning old backups...
 Cleaned 3 old backup(s)

Deleted backups:
  - ante-backup-2025-10-15_03-00-00-AM.tar.gz
  - ante-backup-2025-10-14_03-00-00-AM.tar.gz
  - ante-backup-2025-10-13_03-00-00-AM.tar.gz

What it does:

  • Finds backups older than retention period (30 days by default)
  • Deletes old backups from S3
  • Keeps backups within retention period

Note: Cleanup runs automatically after each backup, so manual cleanup is rarely needed.

Use Cases:

  • Force cleanup if automatic cleanup failed
  • Free up S3 storage immediately
  • Verify cleanup is working correctly

Database Operations

ante db migrate

Run database migrations.

Usage:

bash
ante db migrate

When to use:

  • After updating ANTE to a new version
  • When database schema changes are required
  • When setting up a fresh installation

What it does: Runs Prisma migrations to update the database schema to the latest version.


ante db seed

Seed database with initial data.

Usage:

bash
ante db seed

What it seeds:

  • Default admin user
  • System settings
  • Sample data (if applicable)

Note: This is typically run automatically during installation.


ante db shell

Open an interactive PostgreSQL shell.

Usage:

bash
ante db shell

Common commands:

sql
-- List all tables
\dt

-- Describe table structure
\d table_name

-- Run SQL query
SELECT * FROM "User" LIMIT 10;

-- Exit shell
\q

⚠️ Caution: Direct database access can be dangerous. Only use if you know what you're doing.


ante db optimize

Optimize database performance.

Usage:

bash
ante db optimize

What it does:

  • Analyzes database tables
  • Updates table statistics
  • Runs VACUUM on PostgreSQL
  • Rebuilds indexes
  • Cleans up old data

When to use:

  • Monthly maintenance
  • After large data operations
  • When experiencing slow queries

ante db clone-db

Clone a remote PostgreSQL database to your local database.

Usage:

bash
ante db clone-db <postgresql-url> [options]

Options:

  • --force - Skip confirmation prompts (non-interactive mode)
  • --skip-dump - Use existing backup file instead of creating new dump
  • --backup-file <path> - Path to existing backup file (requires --skip-dump)
  • --no-prisma - Skip Prisma client generation and migrations

Examples:

bash
# Clone from remote Supabase (staging example)
ante db clone-db "postgresql://user:password@host.supabase.co:5432/postgres"

# Clone from any PostgreSQL server
ante db clone-db "postgresql://user:pass@192.168.1.100:5432/ante_db"

# Non-interactive mode (automation/scripts)
ante db clone-db "postgresql://..." --force

# Use existing backup file
ante db clone-db "postgresql://..." --skip-dump --backup-file ./backups/existing.dump

# Skip Prisma operations
ante db clone-db "postgresql://..." --no-prisma

⚠️ DANGER: This command will DROP your local database schema and replace it with data from the remote source. Always ensure you have a backup before proceeding!

What it does:

  1. Parses URLs - Validates source and target database connection strings
  2. Tests connections - Verifies both source and target databases are accessible
  3. Creates backup - Dumps remote database to timestamped file in ./backups/
  4. Drops local schema - Removes all local data (CASCADE)
  5. Restores data - Imports remote database dump to local database
  6. Runs Prisma - Generates Prisma client and applies migrations

Use Cases:

  • Development Setup - Clone production/staging data for local development
  • Testing - Test with real data in a safe environment
  • Data Migration - Copy databases between servers
  • Troubleshooting - Debug issues with production data locally

Backup Location: Cloned databases are saved as: ./backups/clone_backup_YYYY-MM-DD_HH-MM-SS.dump

Common Scenarios:

  1. Clone staging database for local development:

    bash
    ante db clone-db "postgresql://staging_user:pass@staging.db:5432/ante"
  2. Reuse existing backup (faster, no network dump):

    bash
    ante db clone-db "postgresql://..." \
      --skip-dump \
      --backup-file ./backups/clone_backup_2025-10-28_10-00-00.dump
  3. Automated scripts (CI/CD pipelines):

    bash
    # Non-interactive for automation
    ante db clone-db "postgresql://..." --force

Requirements:

  • Docker must be installed and running
  • Source database must be accessible from your machine
  • Local database must be running
  • Sufficient disk space for backup file
  • Database user must have SELECT and CONNECT privileges

Troubleshooting:

Connection Failed:

bash
# Test connection manually
docker run --rm -e PGPASSWORD=password postgres:17-alpine \
  psql -h host.example.com -p 5432 -U username -d database -c "SELECT 1"

Large Database Timeout:

  • Use --skip-dump with pre-created backup for very large databases (>10GB)
  • Consider table-specific dumps for partial cloning
  • Check network bandwidth and firewall rules

Memory Issues:

  • Increase Docker memory limits
  • Use --no-prisma and run migrations separately
  • Clone in batches using table-specific dumps

ante db clone-mongodb

Clone a remote MongoDB database to your local MongoDB database.

Usage:

bash
ante db clone-mongodb <mongodb-url> [options]

Options:

  • --force - Skip confirmation prompts (non-interactive mode)
  • --skip-dump - Use existing backup instead of creating new dump
  • --backup-dir <path> - Path to existing backup directory (requires --skip-dump)

Examples:

bash
# Clone from remote MongoDB (staging example)
ante db clone-mongodb "mongodb://user:password@staging.server.com:27017/ante"

# Clone from MongoDB Atlas
ante db clone-mongodb "mongodb+srv://user:password@cluster.mongodb.net/ante_db"

# Clone from local MongoDB on different port
ante db clone-mongodb "mongodb://localhost:27018/ante_staging"

# Non-interactive mode (automation/scripts)
ante db clone-mongodb "mongodb://..." --force

# Use existing backup directory
ante db clone-mongodb "mongodb://..." --skip-dump --backup-dir ./backups/mongodb_dump_2025-10-28

# Combined with skip-dump for faster restore
ante db clone-mongodb "mongodb://..." --skip-dump --backup-dir ./backups/existing_dump

⚠️ DANGER: This command will DROP your local MongoDB database and replace it with data from the remote source. Always ensure you have a backup before proceeding!

What it does:

  1. Validates Connection - Tests connection to remote MongoDB server
  2. Creates Backup - Dumps remote MongoDB database to timestamped directory in ./backups/
  3. Drops Local Database - Removes all local MongoDB data
  4. Restores Data - Imports remote database dump to local MongoDB
  5. Verifies - Confirms successful restoration

Use Cases:

  • Development Setup - Clone production/staging MongoDB data for local development
  • Testing - Test with real data in a safe environment
  • Data Migration - Copy MongoDB databases between servers
  • Troubleshooting - Debug issues with production data locally

Backup Location: Cloned databases are saved as: ./backups/mongodb_dump_YYYY-MM-DD_HH-MM-SS/

Common Scenarios:

  1. Clone staging MongoDB for local development:

    bash
    ante db clone-mongodb "mongodb://staging_user:pass@staging.server.com:27017/ante"
  2. Clone from MongoDB Atlas (production):

    bash
    ante db clone-mongodb "mongodb+srv://user:password@cluster.mongodb.net/ante_production"
  3. Reuse existing backup (faster, no network dump):

    bash
    ante db clone-mongodb "mongodb://..." \
      --skip-dump \
      --backup-dir ./backups/mongodb_dump_2025-10-28_10-00-00
  4. Automated scripts (CI/CD pipelines):

    bash
    # Non-interactive for automation
    ante db clone-mongodb "mongodb://..." --force

Requirements:

  • Docker must be installed and running
  • Source MongoDB must be accessible from your machine
  • Local MongoDB must be running
  • Sufficient disk space for backup directory
  • MongoDB user must have read permissions

MongoDB URL Formats:

Standard MongoDB:

mongodb://username:password@host:port/database

MongoDB Atlas (SRV):

mongodb+srv://username:password@cluster.mongodb.net/database

Local MongoDB:

mongodb://localhost:27017/database

Troubleshooting:

Connection Failed:

bash
# Test connection manually
docker run --rm mongo:7.0 mongosh "mongodb://user:pass@host:27017/db" --eval "db.runCommand({ping: 1})"

Authentication Failed:

  • Verify username and password are correct
  • Ensure user has necessary permissions
  • Check if authentication database is correct

Large Database Timeout:

  • Use --skip-dump with pre-created backup for very large databases (>50GB)
  • Check network bandwidth and firewall rules
  • Consider collection-specific dumps for partial cloning

Memory Issues:

  • Increase Docker memory limits
  • Use mongodump with --numParallelCollections for large databases
  • Clone in batches using collection-specific dumps

Comparison with ante db clone-db:

  • ante db clone-db - Clones PostgreSQL databases
  • ante db clone-mongodb - Clones MongoDB databases

ante db reset

Reset database to initial state.

Usage:

bash
ante db reset [options]

Options:

  • --force - Skip confirmation prompts

⚠️ DANGER: This command will DELETE ALL DATA. This operation cannot be undone.

What it does:

  1. Drops all database tables
  2. Runs migrations to recreate schema
  3. Seeds initial data

When to use:

  • Development/testing environments
  • Starting fresh after testing
  • Never use in production without a backup

ante db info

Display database information and statistics.

Usage:

bash
ante db info

Information shown:

  • Database size
  • Number of tables
  • Connection status
  • Version information
  • Performance metrics

ante db expose

Expose database ports for external access (remote connections).

Usage:

bash
ante db expose [options]

Options:

  • --postgres - Expose only PostgreSQL (port 5432)
  • --redis - Expose only Redis (port 6379)
  • --mongodb - Expose only MongoDB (port 27017)
  • --all - Expose all databases (default)
  • --force - Skip confirmation prompts
  • --no-restart - Don't restart services automatically

Examples:

bash
# Expose all databases (interactive)
ante db expose

# Expose only PostgreSQL
ante db expose --postgres

# Expose PostgreSQL and Redis
ante db expose --postgres --redis

# Non-interactive mode (skip prompts)
ante db expose --force

# Expose without restarting services
ante db expose --no-restart

⚠️ SECURITY WARNING: Exposing database ports allows external access to your databases. This should ONLY be used for development/staging environments. Never expose production databases without proper firewall rules.

What it does:

  1. Creates timestamped backup of docker-compose.yml
  2. Adds port bindings to selected database services
  3. Recreates containers to apply port changes
  4. Displays connection strings with actual passwords
  5. Shows firewall configuration recommendations

Connection Strings Output: After exposing, you'll see ready-to-use connection strings:

Connection strings:
  PostgreSQL: postgresql://ante:your_password@SERVER_IP:5432/ante_db
  Redis: redis://SERVER_IP:6379 (password: your_password)
  MongoDB: mongodb://ante:your_password@SERVER_IP:27017/ante

Security Recommendations:

  1. Use Firewall Rules (UFW):

    bash
    # Allow access only from your IP
    ufw allow from YOUR_IP to any port 5432
    ufw allow from YOUR_IP to any port 6379
    ufw allow from YOUR_IP to any port 27017
  2. Ensure Strong Passwords:

    • Check your .env file for secure passwords
    • Never use default passwords in exposed databases
  3. Remove Access When Done:

    bash
    # Always secure databases after use
    ante db secure

Use Cases:

  • Connect with database GUI tools (pgAdmin, MongoDB Compass, RedisInsight)
  • Remote development via Tailscale or VPN
  • Database administration and troubleshooting
  • Temporary access for migrations or backups

Common Database Tools:


ante db secure

Remove database port bindings to block external access.

Usage:

bash
ante db secure [options]

Options:

  • --force - Skip confirmation prompts
  • --no-restart - Don't restart services automatically

Examples:

bash
# Secure all exposed databases (interactive)
ante db secure

# Non-interactive mode
ante db secure --force

# Secure without restarting services
ante db secure --no-restart

What it does:

  1. Shows currently exposed databases
  2. Creates timestamped backup of docker-compose.yml
  3. Removes port bindings from all database services
  4. Recreates containers to apply changes
  5. Confirms databases are now secured

When to use:

  • After finishing remote database work
  • Before deploying to production
  • As part of security hardening
  • When switching from development to staging

Best Practice: Always run ante db secure after you finish working with exposed databases to maintain security.


ante db port-status

Show current database port exposure status.

Usage:

bash
ante db port-status

Output Example:

Database Port Exposure Status
──────────────────────────────────────────────────
🔓 PostgreSQL: EXPOSED Port: 5432
🔒 Redis: SECURED
🔒 MongoDB: SECURED
──────────────────────────────────────────────────

⚠️  Some databases are exposed. Run 'ante db secure' to block external access.

Status Icons:

  • 🔓 EXPOSED - Port is accessible from external connections
  • 🔒 SECURED - Port is not exposed (internal Docker network only)

When to use:

  • Check security status before deployment
  • Verify databases are secured
  • Audit current port exposure
  • Troubleshoot connection issues

SSL/HTTPS & Security

ante ssl enable

Enable SSL/HTTPS with automatic certificates from Let's Encrypt.

Usage:

bash
ante ssl enable [options]

Options:

  • --email <email> - Email address for certificate notifications (required)
  • --staging - Use Let's Encrypt staging environment for testing
  • --no-interactive - Non-interactive mode (requires --email)

Examples:

bash
# Interactive mode (prompts for email)
ante ssl enable

# Non-interactive mode
ante ssl enable --email admin@company.com --no-interactive

# Test with staging environment (recommended before production)
ante ssl enable --email admin@company.com --staging

Requirements:

  • Domain name configured with ante set-domain (not localhost or IP address)
  • Domain must resolve to your server's public IP address
  • Ports 80 and 443 must be open and accessible from the internet
  • NGINX installed (CLI will auto-install if not present)
  • Valid email address for Let's Encrypt notifications

What it does:

  1. ✅ Checks if certbot is installed (installs if needed)
  2. ✅ Verifies domain DNS resolution
  3. 🔐 Obtains SSL certificates from Let's Encrypt (free, valid for 90 days)
  4. 🔧 Configures NGINX for HTTPS with security headers
  5. 🔄 Sets up HTTP to HTTPS redirect
  6. ⏰ Configures automatic certificate renewal (daily check at 3:00 AM)

Certificate Renewal:

  • Certificates automatically renew when they have 30 days or less remaining
  • Uses systemd timer (modern Linux) or cron job (legacy systems)
  • No manual intervention required

Verification:

bash
# Check certificate status
ante ssl status

# Test HTTPS access
curl -I https://your-domain.com

# Verify auto-renewal is configured
systemctl status certbot.timer
# OR (for cron-based systems)
cat /etc/cron.d/certbot-renewal

Troubleshooting:

DNS not resolving:

bash
# Check if domain points to your server
dig +short your-domain.com
nslookup your-domain.com

# Should return your server's IP address

Ports not accessible:

bash
# Check firewall rules
sudo ufw status

# Allow HTTP and HTTPS
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

# Check if ports are listening
sudo netstat -tlnp | grep -E ':(80|443)'

Certificate already exists:

bash
# View existing certificates
sudo certbot certificates

# Force renewal if needed
sudo certbot renew --force-renewal --nginx
sudo systemctl reload nginx

Let's Encrypt rate limits:

  • If you encounter rate limit errors, use --staging flag to test first
  • Production limit: 50 certificates per domain per week
  • Staging environment has no practical limits

Security features configured:

  • TLS 1.2 and TLS 1.3 protocols
  • Strong cipher suites
  • HSTS (HTTP Strict Transport Security)
  • X-Frame-Options, X-Content-Type-Options headers
  • XSS protection headers

ante ssl status

Check SSL certificate status and expiry information.

Usage:

bash
ante ssl status

No options required.

Example output:

🔒 SSL Certificate Status

Frontend:
   Domain: erp.company.com
   URL: https://erp.company.com
✓ Certificate found
   Expiry: 2026-01-27
   Days remaining: 87
   Status: Valid

API:
   Domain: api.company.com
   URL: https://api.company.com
✓ Certificate found
   Expiry: 2026-01-27
   Days remaining: 87
   Status: Valid

Status indicators:

  • Valid - Certificate is valid and has more than 30 days remaining
  • Expiring soon - Certificate has less than 30 days remaining (auto-renewal will trigger)
  • No certificate found - Domain does not have an SSL certificate

What it checks:

  • Certificate existence
  • Certificate expiry date
  • Days remaining until expiry
  • Certificate validity status

When to use:

  • Regular monitoring (monthly check recommended)
  • After running ante ssl enable
  • When troubleshooting HTTPS issues
  • Before certificate expiry to verify auto-renewal is working

ante set-domain

Configure frontend and API domains/URLs with optional SSL/HTTPS setup.

Usage:

bash
ante set-domain [options]

Options:

Domain Configuration:

  • --frontend <url> - Frontend URL (e.g., https://erp.company.com)
  • --api <url> - API URL (e.g., https://api.company.com)
  • --detect - Auto-detect public IP address

SSL/HTTPS Configuration:

  • --ssl, --enable-ssl - Enable SSL certificate (Let's Encrypt)
  • --email <email> - Email address for SSL certificate notifications (required with --ssl)
  • --ssl-staging - Use Let's Encrypt staging environment (for testing)

Behavior:

  • --no-interactive - Non-interactive mode (requires --frontend and --api)

Examples:

Basic Domain Configuration:

bash
# Interactive mode (recommended)
ante set-domain

# Auto-detect public IP
ante set-domain --detect

# Non-interactive with custom domains
ante set-domain \
  --frontend https://erp.company.com \
  --api https://api.company.com \
  --no-interactive

# Using IP address with custom ports
ante set-domain \
  --frontend http://192.168.1.100:8080 \
  --api http://192.168.1.100:3001 \
  --no-interactive

Domain Configuration with SSL (Combined Workflow):

bash
# Set domain and enable SSL in one command
ante set-domain \
  --frontend https://erp.company.com \
  --api https://api.company.com \
  --ssl \
  --email admin@company.com \
  --no-interactive

# Test SSL setup with staging environment first
ante set-domain \
  --frontend https://erp.company.com \
  --api https://api.company.com \
  --ssl \
  --email admin@company.com \
  --ssl-staging \
  --no-interactive

# After testing, run again without --ssl-staging for production SSL
ante set-domain \
  --frontend https://erp.company.com \
  --api https://api.company.com \
  --ssl \
  --email admin@company.com \
  --no-interactive

What it does:

  1. Updates .env file with new URLs
  2. Configures NGINX reverse proxy (if using domains or HTTPS)
  3. If --ssl flag provided:
    • Installs certbot (if not already installed)
    • Verifies domain DNS resolution
    • Obtains SSL certificates from Let's Encrypt
    • Configures NGINX for HTTPS with security headers
    • Sets up HTTP to HTTPS redirect
    • Configures automatic certificate renewal
  4. Restarts services to apply new configuration
  5. Waits for services to become healthy
  6. Verifies configuration

URL formats:

  • Domain with HTTPS: https://erp.company.com (port 443, requires SSL)
  • Domain with HTTP: http://erp.company.com (port 80)
  • IP with custom port: http://192.168.1.100:8080
  • Localhost: http://localhost:8080 (for development)

When NGINX is configured: NGINX reverse proxy is automatically set up when:

  • Using HTTPS (any URL starting with https://)
  • Using HTTP without explicit port (implies port 80)
  • Using a domain name (not an IP address)

Common workflows:

Development (localhost):

bash
ante set-domain --frontend http://localhost:8080 --api http://localhost:3001

Production (with SSL) - Traditional Two-Step:

bash
# Step 1: Set domains
ante set-domain --frontend https://erp.company.com --api https://api.company.com

# Step 2: Enable SSL separately
ante ssl enable --email admin@company.com

Production (with SSL) - Integrated Single-Step:

bash
# One command does both domain configuration and SSL setup
ante set-domain \
  --frontend https://erp.company.com \
  --api https://api.company.com \
  --ssl \
  --email admin@company.com

SSL Testing Best Practice:

bash
# Step 1: Test with staging SSL first (no rate limits)
ante set-domain \
  --frontend https://erp.company.com \
  --api https://api.company.com \
  --ssl \
  --email admin@company.com \
  --ssl-staging

# Step 2: If successful, run again with production SSL
ante set-domain \
  --frontend https://erp.company.com \
  --api https://api.company.com \
  --ssl \
  --email admin@company.com

After configuration:

  • Frontend accessible at configured URL
  • API accessible at configured URL
  • WebSocket uses same URL as API
  • Services automatically restarted

Updates & Maintenance

ante update

Update ANTE to the latest version.

Usage:

bash
ante update [options]

Alias: ante upgrade

Options:

  • -v, --version <version> - Update to specific version
  • --skip-backup - Skip automatic backup before update
  • --skip-cleanup - Skip Docker cleanup after update (keeps old images)
  • --force - Force update without confirmation

Examples:

bash
# Update to latest version (recommended)
ante update

# Update to specific version
ante update --version 2.0.0

# Update without automatic backup (not recommended)
ante update --skip-backup

# Update without cleanup (if you want to keep old images for rollback)
ante update --skip-cleanup

What it does:

  1. Creates automatic backup (unless --skip-backup)
  2. Pulls latest Docker images
  3. Stops current services
  4. Updates Docker Compose configuration
  5. Starts services with new images
  6. Runs database migrations
  7. Performs health checks
  8. Cleans up unused Docker images (unless --skip-cleanup)

The update process now automatically removes unused Docker images to free disk space. This prevents accumulation of old images over time.

Rollback: If update fails, you can restore from the automatic backup.


ante update-cli

Update the ANTE CLI tool itself to the latest version.

Usage:

bash
ante update-cli [options]

Options:

  • --check - Check for updates without installing
  • --force - Skip confirmation prompt

Examples:

bash
# Check for CLI updates
ante update-cli --check

# Update CLI to latest version
ante update-cli

# Update without confirmation
ante update-cli --force

Note: This updates the CLI tool itself, not the ANTE ERP installation. To update ANTE ERP, use ante update.


ante cleanup

Clean up unused Docker resources to free disk space.

Usage:

bash
ante cleanup [options]

Options:

  • --dry-run - Preview what would be deleted without making changes
  • --volumes - Also remove unused volumes (⚠ WARNING: potential data loss)
  • --force - Skip confirmation prompts

Examples:

bash
# Preview cleanup (see what would be removed)
ante cleanup --dry-run

# Clean up unused images and containers
ante cleanup

# Deep cleanup including volumes (use with caution)
ante cleanup --volumes --force

What it does:

  • Removes dangling Docker images (untagged images from previous updates)
  • Removes stopped containers
  • Removes unused Docker networks
  • Optionally removes unused volumes (if --volumes flag is used)

When to use:

  • After multiple updates to reclaim disk space
  • When low on disk space
  • As part of regular maintenance

Disk Space Savings:

  • Average savings: 500MB - 1GB per update worth of old images
  • Automatic cleanup runs during ante update (can be disabled with --skip-cleanup)

WARNING

Using --volumes flag will remove unused Docker volumes, which may result in data loss. Only use this if you're certain the volumes are not needed.


System Maintenance

ante reset

Reset ANTE ERP system to initial state (complete system reset).

Usage:

bash
ante reset [options]

Options:

  • --force - Skip confirmation prompts (non-interactive mode)
  • --backup-only - Only create backup without proceeding with reset

Examples:

bash
# Interactive reset (with confirmation prompts)
ante reset

# Non-interactive mode (for automation/scripts)
ante reset --force

# Only create pre-reset backup without resetting
ante reset --backup-only

⚠️ EXTREME DANGER: This command performs a COMPLETE SYSTEM RESET and will:

  1. CREATE MANDATORY BACKUP - Automatically creates a timestamped backup before proceeding
  2. DROP ALL DATABASES - Completely drops PostgreSQL and MongoDB schemas (all data lost)
  3. RESET TO FRESH STATE - Returns system to initial installation state
  4. PRESERVE DOCKER CONTAINERS - Keeps containers running (no need to reinstall)

What it does:

  1. Safety Check - Confirms you understand the consequences (unless --force)
  2. Mandatory Backup - Creates timestamped backup: reset_backup_YYYY-MM-DD_HH-MM-SS.tar.gz
  3. Drop PostgreSQL Schema - Completely removes all tables and data (CASCADE)
  4. Drop MongoDB Database - Removes entire MongoDB database
  5. Run Migrations - Applies fresh migrations to recreate schema
  6. Seed Database - Adds initial system data
  7. Restart Services - Ensures all services pick up fresh state

When to use:

  • Development/Testing - Start fresh after extensive testing
  • Demo Reset - Return demo system to initial state
  • Corrupted Data - Fix severely corrupted database issues
  • Clean Slate - Need completely fresh installation without Docker reinstall

When NOT to use:

  • Production Systems - Never use in production without explicit approval
  • Active Data - Never use when you need to preserve data (use backup/restore instead)
  • During Business Hours - High-impact operation, plan downtime

Backup Location: Backups are saved as: ./backups/reset_backup_YYYY-MM-DD_HH-MM-SS.tar.gz

Recovery: If you need to recover after reset:

bash
# Restore from the automatic pre-reset backup
ante restore ./backups/reset_backup_YYYY-MM-DD_HH-MM-SS.tar.gz

Common Scenarios:

  1. Reset development environment:

    bash
    # Interactive with confirmation
    ante reset
  2. Automated reset in CI/CD:

    bash
    # Non-interactive for automation
    ante reset --force
  3. Create safety backup before manual reset:

    bash
    # Only create backup, don't reset
    ante reset --backup-only

Comparison with ante db reset:

  • ante db reset - Only resets PostgreSQL database
  • ante reset - Resets BOTH PostgreSQL and MongoDB databases (complete system reset)

DANGER

This is the most destructive command in the CLI. It will DELETE ALL DATA from both PostgreSQL and MongoDB. Always ensure you have backups before proceeding. The automatic backup created by this command is your safety net.


ante regenerate-compose

Regenerate docker-compose.yml with correct configuration.

Usage:

bash
ante regenerate-compose

No options required.

What it does:

  1. Backs up current docker-compose.yml to docker-compose.yml.backup.TIMESTAMP
  2. Reads current configuration from .env file
  3. Regenerates docker-compose.yml with proper port mappings and volumes
  4. Preserves all environment variables and credentials
  5. Fixes any port conflicts or configuration issues

When to use:

  • Port Mapping Issues - Fix incorrect or conflicting port configurations
  • After Manual Edits - Restore correct structure after manual compose file edits
  • Configuration Problems - Resolve Docker Compose configuration errors
  • Template Updates - Apply updated compose template from CLI updates

Example:

bash
# Regenerate compose file
ante regenerate-compose

# Restart services with new configuration
ante restart

What's preserved:

  • All environment variables from .env
  • Database credentials
  • Custom port configurations
  • Volume mounts

Backup location: Original compose file saved as: docker-compose.yml.backup.YYYYMMDD_HHMMSS

Common use cases:

  1. Fix port conflicts:

    bash
    # After changing ports in .env
    ante regenerate-compose
    ante restart
  2. Recover from manual edits:

    bash
    # Made manual changes that broke configuration
    ante regenerate-compose
    ante restart
  3. Apply CLI template updates:

    bash
    # After updating CLI to get new compose features
    ante update-cli
    ante regenerate-compose
    ante restart

TIP

If you manually edit docker-compose.yml and encounter issues, run this command to restore the correct configuration based on your .env settings.


Cleanup & Uninstallation

ante uninstall

Uninstall ANTE ERP from your system.

Usage:

bash
ante uninstall [options]

Options:

  • --keep-data - Keep database volumes (preserves data)
  • --keep-files - Keep installation files
  • --force - Skip confirmation prompts

Examples:

bash
# Uninstall with confirmation prompts
ante uninstall

# Keep data but remove containers
ante uninstall --keep-data

# Keep everything except containers
ante uninstall --keep-data --keep-files

# Force uninstall without prompts
ante uninstall --force

What it does:

  • Stops all services
  • Removes Docker containers
  • Removes Docker volumes (unless --keep-data)
  • Removes installation files (unless --keep-files)
  • Removes CLI configuration

⚠️ Warning: Unless you use --keep-data, all your data will be permanently deleted.

Recommendation: Create a backup before uninstalling:

bash
ante backup
ante uninstall

Help & Information

ante help

Display help information for commands.

Usage:

bash
ante help [command]

Examples:

bash
# Show all available commands
ante help

# Show help for specific command
ante help install
ante help backup
ante help db

ante version

Display ANTE CLI version.

Usage:

bash
ante version
ante --version
ante -v

Exit Codes

The CLI uses standard exit codes:

  • 0 - Success
  • 1 - General error
  • 2 - Configuration error
  • 3 - Docker error
  • 4 - Database error
  • 5 - Network error

These can be useful in scripts:

bash
if ante status; then
    echo "ANTE is running"
else
    echo "ANTE is not running"
    ante start
fi

Configuration

The CLI stores its configuration in ~/.config/ante-cli/config.json:

json
{
  "installPath": "/path/to/ante-erp",
  "version": "1.0.0",
  "lastBackup": "2025-10-27T10:00:00.000Z",
  "domain": "erp.company.com"
}

You can manually edit this file if needed, but it's recommended to use CLI commands instead.


Tips & Best Practices

Daily Operations

bash
# Morning health check
ante status
ante doctor

# View recent activity
ante logs --lines 50

Before Updates

bash
# Always create backup before updates
ante backup
ante update

Troubleshooting

bash
# When something goes wrong
ante doctor                              # Check system health
ante logs --service backend --follow     # Check backend logs
ante restart                             # Try restarting services

Scheduled Backups

Set up a cron job for automatic backups:

bash
# Daily backup at 2 AM
0 2 * * * cd /path/to/ante-erp && ante backup

# Weekly backup on Sunday at 3 AM
0 3 * * 0 cd /path/to/ante-erp && ante backup

Monitoring

Use the CLI in monitoring scripts:

bash
#!/bin/bash
# health-check.sh

if ! ante status > /dev/null 2>&1; then
    echo "ANTE services are down!"
    ante start
    # Send notification
fi

Next Steps


Support

If you encounter issues not covered in this documentation:

Released under the MIT License.