Comprehensive CLI tool for managing ANTE ERP self-hosted installations
npm install ante-erp-cli> Comprehensive command-line tool for managing ANTE ERP self-hosted installations


โจ 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
``bash`
npm install -g ante-erp-cli
`bash`
npx ante-erp-cli install
`bashInstall ANTE ERP
ante install
Commands
$3
`bash
ante install # Interactive installation wizard
ante install --preset standard --dir ./my-ante
`Options:
-
--dir - Installation directory (default: ./ante-erp)
- --preset - minimal, standard, or enterprise (default: standard)
- --frontend-domain - Frontend URL (e.g., http://IP:8080 or https://app.example.com)
- --api-domain - API URL (e.g., http://IP:3001 or https://api.example.com)
- --port - Frontend port (default: 8080)
- --no-interactive - Non-interactive mode with defaultsIP 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
$3
`bash
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
`$3
`bash
ante set-domain # Interactive domain configuration
ante set-domain --detect # Auto-detect public IP
ante set-domain --frontend http://IP:8080 --api http://IP:3001
`Options:
-
--detect - Auto-detect public IP address
- --frontend - Frontend URL
- --api - API URL
- --no-interactive - Non-interactive modeUse Cases:
- Change IP after server migration
- Switch from localhost to public IP
- Configure custom domain names
- Update ports after firewall changes
$3
`bash
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 imagesUpdate CLI tool
ante update-cli # Update the CLI itselfDocker cleanup
ante cleanup # Clean up unused Docker resources
ante cleanup --dry-run # Preview what would be removed
ante cleanup --volumes --force # Deep cleanup including volumes
`Auto-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).$3
`bash
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 # Restore from backup
`$3
โ ๏ธ WARNING: This completely resets your ANTE ERP system!
`bash
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 resetting
`The
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 confirmAfter reset:
1. Navigate to
http://localhost:9000
2. Complete the setup wizard
3. Create your first admin account$3
`bash
ante start # Start all services
ante start --service backend
ante stop # Stop all services
ante restart # Restart all services
`$3
`bash
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)
`$3
`bash
ante ssl:setup --domain erp.company.com --email admin@company.com
ante ssl:renew # Renew SSL certificate
ante ssl:info # Show certificate info
`$3
`bash
ante user:create --username admin --email admin@company.com
ante user:reset-password --username admin
ante user:list # List users
`$3
`bash
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 resources
`Uninstall 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:
-
.env files 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, .env files are removed for safetyRecommended Uninstall Process:
`bash
For complete removal (recommended before reinstall)
ante uninstall --force --removeData --removeFilesTo preserve data but reset configuration
ante uninstall --keep-data --removeFilesTo keep installation files but reset services
ante uninstall --keep-data --keep-files
`$3
`bash
ante doctor # Run diagnostic checks
ante version # Show versions
`$3
`bash
ante help # Show all commands
ante help install # Show help for specific command
`Examples
$3
`bash
Interactive installation (auto-detects IP)
ante installNon-interactive with custom settings
ante install --no-interactive --dir /opt/ante --port 8080Installation with specific domain/IP
ante install --frontend-domain http://139.59.110.232:8080 --api-domain http://139.59.110.232:3001Installation with custom domain
ante install --frontend-domain https://erp.company.com --api-domain https://api.company.com
`$3
`bash
Fresh server installation (IP auto-detected)
ssh user@server.com
ante installOr with explicit IP configuration
ante install --frontend-domain http://139.59.110.232:8080 --api-domain http://139.59.110.232:3001After 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 --detect
`$3
`bash
Morning check
ante statusView recent logs
ante logs --lines 50Check system health
ante doctorCreate daily backup
ante backup
`$3
`bash
Check diagnostics
ante doctorView service logs
ante logs --service backend --followRestart problematic service
ante restart --service backendFull system restart
ante restart
`$3
`bash
Create backup before update
ante backupUpdate to latest version
ante updateOptimize database
ante db:optimizeClean old files
ante clean
`Configuration
ANTE CLI stores configuration in
~/.config/ante-cli/:`javascript
{
"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
- Prerequisites
- Installation Guide
- Configuration Reference
- Troubleshooting
Troubleshooting
$3
`bash
Make sure ANTE CLI is installed globally
npm install -g @gtplusnet/ante-cliOr use npx
npx @gtplusnet/ante-cli status
`$3
`bash
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 statusOr reinstall
ante install
`$3
`bash
Run diagnostics
ante doctorCheck logs
ante logsTry restart
ante restartFor more help
https://docs.ante.ph/self-hosting/troubleshooting
`$3
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:
`bash
Option 1: Complete uninstall and reinstall (Recommended)
ante uninstall --force --removeData --removeFiles
ante installOption 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 configOption 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:3001
`Prevention: Always use
--removeFiles flag when uninstalling before reinstalling:
`bash
ante uninstall --removeFiles
ante install
`Note: As of CLI v1.6.0,
.env` files are automatically cleaned during uninstall to prevent this issue.- Documentation: https://docs.ante.ph
- GitHub Issues: https://github.com/gtplusnet/ante-official/issues
- Email: support@ante.ph
MIT ยฉ GT Plus Network
Contributions are welcome! Please read our contributing guidelines first.
---
Made with โค๏ธ by GT Plus Network