ante-erp-cli
v1.11.77
Published
Comprehensive CLI tool for managing ANTE ERP self-hosted installations
Maintainers
Readme
ANTE CLI
Comprehensive command-line tool for managing ANTE ERP self-hosted installations
Features
✨ One-Command Installation - Install ANTE ERP in under 5 minutes 🔄 Easy Updates - Update to latest version with automatic backup & cleanup 💾 Automated Backups - Create and restore backups effortlessly 📊 System Monitoring - Check service status and health 🛠️ Service Management - Start, stop, restart services 🔍 Diagnostics - Run comprehensive system checks 🗄️ Database Operations - Manage databases with ease 🧹 Docker Cleanup - Automatic cleanup of unused Docker resources
Installation
Global Installation (Recommended)
npm install -g ante-erp-cliUse with npx (No Installation)
npx ante-erp-cli installQuick Start
# Install ANTE ERP
ante install
# Check status
ante status
# View logs
ante logs --follow
# Create backup
ante backup
# Update to latest
ante updateCommands
📦 Installation & Setup
ante install # Interactive installation wizard
ante install --preset standard --dir ./my-anteOptions:
--dir <path>- Installation directory (default: ./ante-erp)--preset <type>- minimal, standard, or enterprise (default: standard)--frontend-domain <url>- Frontend URL (e.g., http://IP:8080 or https://app.example.com)--api-domain <url>- API URL (e.g., http://IP:3001 or https://api.example.com)--port <port>- Frontend port (default: 8080)--no-interactive- Non-interactive mode with defaults
IP Auto-Detection:
- CLI automatically detects your public IP during installation
- If detection fails, you'll be prompted to enter IP/domain manually
- Supports localhost, IP address, or domain name configurations
📊 Status & Monitoring
ante status # Show service status
ante health # Run health checks (alias: ante doctor)
ante logs # View logs
ante logs --service backend --follow
ante ps # Show running containers🌐 Domain & Network Configuration
ante set-domain # Interactive domain configuration
ante set-domain --detect # Auto-detect public IP
ante set-domain --frontend http://IP:8080 --api http://IP:3001Options:
--detect- Auto-detect public IP address--frontend <url>- Frontend URL--api <url>- API URL--no-interactive- Non-interactive mode
Use Cases:
- Change IP after server migration
- Switch from localhost to public IP
- Configure custom domain names
- Update ports after firewall changes
🔄 Updates & Maintenance
# Update ANTE ERP
ante update # Update to latest version (with auto-cleanup)
ante upgrade # Alias for update
ante update --version 2.0.0 # Update to specific version
ante update --skip-cleanup # Update without cleaning old images
# Update CLI tool
ante update-cli # Update the CLI itself
# Docker cleanup
ante cleanup # Clean up unused Docker resources
ante cleanup --dry-run # Preview what would be removed
ante cleanup --volumes --force # Deep cleanup including volumesAuto-Cleanup: The ante update command now automatically removes unused Docker images after updating. This prevents disk space accumulation over time (saves 500MB-1GB per update).
💾 Backup & Restore
ante backup # Create backup
ante dump # Alias for backup
ante backup -o /backups/my-backup.tar.gz
ante backup:list # List available backups
ante restore <file> # Restore from backup🔄 System Reset
⚠️ WARNING: This completely resets your ANTE ERP system!
ante reset # Reset system to initial state (with mandatory backup)
ante reset --force # Skip confirmation (backup still created)
ante reset --backup-only # Create backup without resettingThe ante reset command:
- ✅ Creates mandatory backup before resetting (cannot be skipped)
- ❌ Deletes all companies, users, and data
- 🔄 Resets PostgreSQL and MongoDB databases
- 🆕 Prepares system for setup wizard
- ⚠️ Requires typing "RESET ALL DATA" to confirm
After reset:
- Navigate to
http://localhost:9000 - Complete the setup wizard
- Create your first admin account
🎮 Service Management
ante start # Start all services
ante start --service backend
ante stop # Stop all services
ante restart # Restart all services🗄️ Database Operations
ante db:migrate # Run database migrations
ante db:seed # Seed database
ante db:shell # Open PostgreSQL shell
ante db:optimize # Optimize database
ante db:reset # Reset database (⚠️ destructive)🔒 SSL & Security
ante ssl:setup --domain erp.company.com --email [email protected]
ante ssl:renew # Renew SSL certificate
ante ssl:info # Show certificate info👤 User Management
ante user:create --username admin --email [email protected]
ante user:reset-password --username admin
ante user:list # List users🧹 Cleanup
ante uninstall # Uninstall ANTE ERP (interactive)
ante uninstall --force --removeData --removeFiles # Complete removal
ante uninstall --keep-data # Keep database volumes
ante uninstall --keep-files # Keep installation files
ante clean # Clean old files/logs
ante prune # Remove unused Docker resourcesUninstall Options:
--force- Skip confirmation prompts--removeData/--keep-data- Remove/keep database volumes--removeFiles/--keep-files- Remove/keep installation directory--verbose- Show detailed cleanup information
⚠️ Important Notes:
.envfiles are always cleaned during uninstall to prevent configuration conflicts- This ensures fresh configuration when reinstalling
- Old configuration is backed up with timestamp before deletion
- Even with
--keep-files,.envfiles are removed for safety
Recommended Uninstall Process:
# For complete removal (recommended before reinstall)
ante uninstall --force --removeData --removeFiles
# To preserve data but reset configuration
ante uninstall --keep-data --removeFiles
# To keep installation files but reset services
ante uninstall --keep-data --keep-files🔍 Diagnostics
ante doctor # Run diagnostic checks
ante version # Show versions📚 Help
ante help # Show all commands
ante help install # Show help for specific commandExamples
Fresh Installation
# Interactive installation (auto-detects IP)
ante install
# Non-interactive with custom settings
ante install --no-interactive --dir /opt/ante --port 8080
# Installation with specific domain/IP
ante install --frontend-domain http://139.59.110.232:8080 --api-domain http://139.59.110.232:3001
# Installation with custom domain
ante install --frontend-domain https://erp.company.com --api-domain https://api.company.comServer Deployment
# Fresh server installation (IP auto-detected)
ssh [email protected]
ante install
# Or with explicit IP configuration
ante install --frontend-domain http://139.59.110.232:8080 --api-domain http://139.59.110.232:3001
# After installation, access via detected/configured IP
# Frontend: http://YOUR-IP:8080
# Backend: http://YOUR-IP:3001
# Change domain/IP later if needed
ante set-domain --detectDaily Operations
# Morning check
ante status
# View recent logs
ante logs --lines 50
# Check system health
ante doctor
# Create daily backup
ante backupTroubleshooting
# Check diagnostics
ante doctor
# View service logs
ante logs --service backend --follow
# Restart problematic service
ante restart --service backend
# Full system restart
ante restartMaintenance
# Create backup before update
ante backup
# Update to latest version
ante update
# Optimize database
ante db:optimize
# Clean old files
ante cleanConfiguration
ANTE CLI stores configuration in ~/.config/ante-cli/:
{
"installPath": "/path/to/ante-erp",
"version": "1.0.0",
"lastBackup": "2025-10-27T10:00:00.000Z",
"domain": "erp.company.com"
}Requirements
- Node.js: 18.0.0 or higher
- Docker: 20.10+ with Docker Compose v2
- System: Linux, macOS, or Windows (WSL2)
- RAM: 4GB minimum, 8GB recommended
- Disk: 20GB minimum, 50GB recommended
Documentation
Full documentation available at: https://docs.ante.ph/self-hosting
Troubleshooting
Command not found
# Make sure ANTE CLI is installed globally
npm install -g @gtplusnet/ante-cli
# Or use npx
npx @gtplusnet/ante-cli statusInstallation not detected
# ANTE CLI looks for docker-compose.yml and .env in:
# 1. Current directory
# 2. Saved installation path
# Navigate to installation directory
cd /path/to/ante-erp
ante status
# Or reinstall
ante installServices won't start
# Run diagnostics
ante doctor
# Check logs
ante logs
# Try restart
ante restart
# For more help
https://docs.ante.ph/self-hosting/troubleshootingFrontend connects to wrong backend URL
Symptom: After reinstalling, frontend still connects to old IP address or backend URL.
Cause: Old .env files persist from previous installation, causing configuration conflicts.
Solution:
# Option 1: Complete uninstall and reinstall (Recommended)
ante uninstall --force --removeData --removeFiles
ante install
# Option 2: If you get stuck during uninstall, manually clean .env files
cd /path/to/ante-installation
find . -name ".env*" -type f # Find all .env files
rm -f .env .env.* backend/.env frontend/.env # Remove them
ante install # Reinstall with fresh config
# Option 3: Use set-domain to update configuration
ante set-domain --detect # Auto-detect new IP
# or
ante set-domain --frontend http://NEW_IP:8080 --api http://NEW_IP:3001Prevention: Always use --removeFiles flag when uninstalling before reinstalling:
ante uninstall --removeFiles
ante installNote: As of CLI v1.6.0, .env files are automatically cleaned during uninstall to prevent this issue.
Support
- Documentation: https://docs.ante.ph
- GitHub Issues: https://github.com/gtplusnet/ante-official/issues
- Email: [email protected]
License
MIT © GT Plus Network
Contributing
Contributions are welcome! Please read our contributing guidelines first.
Made with ❤️ by GT Plus Network
