rConfig V8 Core CLI Commands Reference
rConfig V8 Core ships a set of php artisan rconfig:* CLI commands for downloading configurations, reporting on backup status, clearing caches, and importing devices from other tools. After reading this page you can find the right command, run it with the correct arguments, and wire rConfig operations into your own scripts and pipelines.
Why use the CLI commands?
Section titled “Why use the CLI commands?”The CLI is useful whenever the web interface is not the right tool for the job:
- Automation and orchestration: Drive rConfig operations from Ansible, Terraform, or Chef.
- Custom scripting: Build your own workflows and scheduled jobs that call rConfig.
- System administration: Clear caches, archive logs, and troubleshoot directly on the server.
- CI/CD pipelines: Fold network configuration backups into your DevOps workflows.
- Remote management: Run operations without opening the web UI.
- Bulk operations: Skip UI overhead for large or scheduled jobs.
Running CLI commands
Section titled “Running CLI commands”All rConfig CLI commands run from the rConfig installation directory and require root privileges (or sudo). You need SSH access to the rConfig server.
Change to the installation directory first:
cd /var/www/html/rconfigEvery command uses the same format:
php artisan [command-name] [arguments] [options]To list all available rConfig-specific commands with their descriptions:
php artisan rconfig:listAvailable commands
Section titled “Available commands”┌──────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────┐│ Command │ Description │├──────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────┤│ rconfig:archive-logs │ Will archive x amount of activity log rows or days ││ rconfig:clear-all │ Clear all cache and config elements for Laravel, NPM and other dependencies ││ rconfig:clear-horizon │ Clear Horizon Queue History ││ rconfig:clone-templates │ Clone templates from git repo https://github.com/rconfig/rconfig-templates ││ rconfig:config-summaries-sync │ Sync Config Summaries ││ rconfig:download-category │ Download configurations for one or multiple categories of devices ││ rconfig:download-device │ Download configurations for one or multiple devices via the CLI ││ rconfig:download-tag │ Download configurations for devices with one or multiple tags ││ rconfig:download-task │ Download configurations for devices with one or multiple tasks ││ rconfig:list │ List all rconfig:* commands with their descriptions ││ rconfig:list-categories │ List all category IDs and names in rConfig ││ rconfig:list-devices │ List all Device IDs and names in rConfig ││ rconfig:list-tags │ List all tag IDs and names in rConfig ││ rconfig:list-tasks │ List all task IDs and names in rConfig ││ rconfig:oxidized-device-mappings │ Manage device type mappings for Oxidized import ││ rconfig:oxidized-import-devices │ Import devices from JSON file to rConfig database ││ rconfig:oxidized-load-devices │ Import devices from Oxidized to rConfig ││ rconfig:purge-failedconfigs │ Purge failed configs for some or all devices ││ rconfig:rancid-device-mappings │ Manage device type mappings for RANCID import ││ rconfig:rancid-import-devices │ Import devices from RANCID JSON file to rConfig database ││ rconfig:rancid-load-devices │ Load devices from RANCID to create rConfig import JSON ││ rconfig:report-lastDownload │ Output report of all devices latest downloaded configs ││ rconfig:search-configs │ Search all config files for a given string ││ rconfig:sync-tasks │ Sync the schedule of the app with the schedule monitor │└──────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────┘Command reference
Section titled “Command reference”rconfig:archive-logs
Section titled “rconfig:archive-logs”Archives a specified number of activity log rows or days worth of logs. Helps maintain database performance by moving old logs to archive storage.
# Archive logs older than 90 daysphp artisan rconfig:archive-logs --days=90
# Archive specific number of rowsphp artisan rconfig:archive-logs --rows=10000Options:
--days: Number of days to keep (archive older logs)--rows: Number of rows to archive
rconfig:clear-all
Section titled “rconfig:clear-all”Clears all cache and config elements for Laravel, NPM, and other dependencies. This is an essential command for resolving application issues after updates or configuration changes.
php artisan rconfig:clear-allUse cases:
- After updating rConfig
- When encountering 500 errors
- After modifying configuration files
- When the UI behaves unexpectedly
rconfig:clear-horizon
Section titled “rconfig:clear-horizon”Clears Horizon queue history and failed jobs from the database.
php artisan rconfig:clear-horizonUse cases:
- Database cleanup
- Resolving queue processing issues
- After clearing failed job backlogs
rconfig:clone-templates
Section titled “rconfig:clone-templates”Clones vendor device templates from the official rConfig templates repository on GitHub. This ensures you have the latest device support templates.
php artisan rconfig:clone-templatesWhat it does:
- Downloads latest templates from https://github.com/rconfig/rconfig-templates
- Updates existing templates
- Adds new vendor support
rconfig:config-summaries-sync
Section titled “rconfig:config-summaries-sync”Syncs configuration count summaries to the database for faster UI load times. This command runs automatically every day at 3AM.
php artisan rconfig:config-summaries-syncWhen to run manually:
- After bulk configuration imports
- When dashboard statistics appear incorrect
- After database maintenance
rconfig:download-category
Section titled “rconfig:download-category”Downloads configurations for all devices in specified categories (Command Groups).
# Download from one or more categoriesphp artisan rconfig:download-category 1 2 3
# With debug outputphp artisan rconfig:download-category 1 -dArguments:
- Category IDs (space-separated for multiple)
Options:
-d: Enable debug output
Example:
# Download all routers (category ID 1) and switches (category ID 2)php artisan rconfig:download-category 1 2rconfig:download-device
Section titled “rconfig:download-device”Downloads configurations for specified devices. This is one of the most commonly used commands for on-demand config retrieval and debugging.
# Download from specific devicesphp artisan rconfig:download-device 1002 1003 1004
# Enable debug output for troubleshootingphp artisan rconfig:download-device 1002 -dArguments:
- Device IDs (space-separated for multiple)
Options:
-d: Enable debug output (shows connection details, commands executed, output received)
Use cases:
- On-demand configuration backups
- Testing device connectivity
- Troubleshooting connection issues
- Immediate backup before changes
Example:
# Backup router before making changes, with debug outputphp artisan rconfig:download-device 1002 -drconfig:download-tag
Section titled “rconfig:download-tag”Downloads configurations for all devices with specified tags.
# Download all devices tagged with specific tagsphp artisan rconfig:download-tag 1001 1002
# With debug outputphp artisan rconfig:download-tag 1001 -dArguments:
- Tag IDs (space-separated for multiple)
Example:
# Backup all devices tagged "production" (tag ID 1001)php artisan rconfig:download-tag 1001rconfig:download-task
Section titled “rconfig:download-task”Downloads configurations for all devices associated with specified tasks.
# Download configs for devices in specific tasksphp artisan rconfig:download-task 555555 666666
# With debug outputphp artisan rconfig:download-task 555555 -dArguments:
- Task IDs (space-separated for multiple)
rconfig:list
Section titled “rconfig:list”Lists all rconfig:* commands with their descriptions. Provides a quick reference to available commands.
php artisan rconfig:listrconfig:list-categories
Section titled “rconfig:list-categories”Lists all category (Command Group) IDs and names in rConfig. Useful for finding category IDs for use with other commands.
php artisan rconfig:list-categoriesOutput example:
ID | Category Name------|---------------1 | Routers2 | Switches3 | Firewallsrconfig:list-devices
Section titled “rconfig:list-devices”Lists all device IDs and names in rConfig. Essential for finding device IDs for backup commands.
php artisan rconfig:list-devicesOutput example:
ID | Device Name | IP Address------|--------------------|--------------1001 | core-router-01 | 10.0.0.11002 | access-switch-02 | 10.0.1.10rconfig:list-tags
Section titled “rconfig:list-tags”Lists all tag IDs and names in rConfig.
php artisan rconfig:list-tagsOutput example:
ID | Tag Name------|----------1001 | production1002 | staging1003 | datacenter-1rconfig:list-tasks
Section titled “rconfig:list-tasks”Lists all task IDs and names in rConfig.
php artisan rconfig:list-tasksrconfig:oxidized-device-mappings
Section titled “rconfig:oxidized-device-mappings”Manages device type mappings for Oxidized import. Used to map Oxidized device types to rConfig vendor templates.
php artisan rconfig:oxidized-device-mappingsSee also: Migrate from Oxidized to rConfig.
rconfig:oxidized-import-devices
Section titled “rconfig:oxidized-import-devices”Imports devices from an Oxidized JSON file to the rConfig database.
php artisan rconfig:oxidized-import-devices /path/to/devices.jsonSee also: Migrate from Oxidized to rConfig.
rconfig:oxidized-load-devices
Section titled “rconfig:oxidized-load-devices”Imports devices from Oxidized to rConfig. This command connects to an Oxidized instance and imports its device inventory.
php artisan rconfig:oxidized-load-devicesPrerequisites:
- Oxidized integration configured in rConfig settings
- Network access to the Oxidized instance
See also: Migrate from Oxidized to rConfig.
rconfig:purge-failedconfigs
Section titled “rconfig:purge-failedconfigs”Purges failed configuration download attempts for specified or all devices. Helps clean up failed backup records.
# Purge failed configs for specific devicesphp artisan rconfig:purge-failedconfigs 1001 1002
# Purge all failed configsphp artisan rconfig:purge-failedconfigs --allArguments:
- Device IDs (space-separated for multiple)
Options:
--all: Purge failed configs for all devices
rconfig:rancid-device-mappings
Section titled “rconfig:rancid-device-mappings”Manages device type mappings for RANCID import. Used to map RANCID device types to rConfig vendor templates.
php artisan rconfig:rancid-device-mappingsSee also: Migrate from RANCID to rConfig.
rconfig:rancid-import-devices
Section titled “rconfig:rancid-import-devices”Imports devices from a RANCID JSON file to the rConfig database.
php artisan rconfig:rancid-import-devices /path/to/rancid-devices.jsonSee also: Migrate from RANCID to rConfig.
rconfig:rancid-load-devices
Section titled “rconfig:rancid-load-devices”Loads devices from a RANCID installation to create an rConfig import JSON file.
php artisan rconfig:rancid-load-devicesPrerequisites:
- Access to the RANCID installation and configuration files
See also: Migrate from RANCID to rConfig.
rconfig:report-lastDownload
Section titled “rconfig:report-lastDownload”Generates a CLI report of all devices’ latest downloaded configurations. Useful for auditing backup status.
php artisan rconfig:report-lastDownloadOutput includes:
- Device name
- Last successful backup date
- Days since last backup
- Backup status
Use cases:
- Identifying devices with stale backups
- Backup compliance auditing
- Troubleshooting backup schedules
rconfig:search-configs
Section titled “rconfig:search-configs”Searches all configuration files for a given string. A useful tool for finding specific configurations across your entire network.
# Search for a specific stringphp artisan rconfig:search-configs "ntp server"
# Search with regex patternphp artisan rconfig:search-configs --pattern="ip route.*192.168"Arguments:
- Search string or pattern
Options:
--pattern: Use a regex pattern for advanced searching--case-sensitive: Perform a case-sensitive search
Use cases:
- Finding all devices with a specific configuration
- Security audits (finding weak passwords, old protocols)
- Compliance checking
- Configuration standardization verification
Example:
# Find all devices configured with a specific NTP serverphp artisan rconfig:search-configs "ntp server 10.0.0.1"rconfig:sync-tasks
Section titled “rconfig:sync-tasks”Syncs the application schedule with the schedule monitor. Ensures scheduled tasks are properly registered.
php artisan rconfig:sync-tasksWhen to run:
- After creating new scheduled tasks
- When scheduled tasks aren’t running
- After system updates