Skip to content

rConfig V8 Core CLI Commands Reference - Network Automation Guide

rConfig V8 Core includes a comprehensive set of command-line interface (CLI) commands for managing your network configuration platform. These commands enable automation, scripting, and system administration tasks directly from the command line.

CLI commands are essential for several key use cases:

  • Automation & Orchestration: Integrate rConfig operations into Infrastructure as Code platforms like Ansible, Terraform, or Chef
  • Custom Scripting: Build your own automation workflows and scheduled tasks that interact with rConfig
  • System Administration: Perform maintenance tasks, clear caches, and troubleshoot issues directly from the command line
  • CI/CD Pipelines: Incorporate network configuration management into your DevOps workflows
  • Remote Management: Execute operations on rConfig without requiring access to the web interface
  • Performance: Bypass UI overhead for bulk operations and scheduled tasks

All rConfig CLI commands must be run from the rConfig installation directory and require root privileges.

  1. SSH access to your rConfig server
  2. Root user privileges (or use sudo)
  3. Navigate to the rConfig installation directory:
Terminal window
cd /var/www/html/rconfig

To view all available rConfig-specific commands:

Terminal window
php artisan rconfig:list

This command displays a list of all available rConfig commands with their descriptions.

Tip: Use the documentation search feature to quickly find detailed information about any command by searching for its name (e.g., “rconfig:download-device”).

┌──────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────┐
│ 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 │
└──────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────┘

All commands must be run from within the rconfig directory in the following format:

Terminal window
php artisan [command-name] [arguments] [options]

Archives a specified number of activity log rows or days worth of logs. Helps maintain database performance by moving old logs to archive storage.

Terminal window
# Archive logs older than 90 days
php artisan rconfig:archive-logs --days=90
# Archive specific number of rows
php artisan rconfig:archive-logs --rows=10000

Options:

  • --days: Number of days to keep (archive older logs)
  • --rows: Number of rows to archive

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.

Terminal window
php artisan rconfig:clear-all

Use cases:

  • After updating rConfig
  • When encountering 500 errors
  • After modifying configuration files
  • When the UI behaves unexpectedly

Clears Horizon queue history and failed jobs from the database.

Terminal window
php artisan rconfig:clear-horizon

Use cases:

  • Database cleanup
  • Resolving queue processing issues
  • After clearing failed job backlogs

Clones vendor device templates from the official rConfig templates repository on GitHub. This ensures you have the latest device support templates.

Terminal window
php artisan rconfig:clone-templates

What it does:

Best practice: Run this command periodically to keep templates updated with the latest device support.


Syncs configuration count summaries to the database for faster UI load times. This command is run automatically daily at 3AM.

Terminal window
php artisan rconfig:config-summaries-sync

When to run manually:

  • After bulk configuration imports
  • When dashboard statistics appear incorrect
  • After database maintenance

Downloads configurations for all devices in specified categories (Command Groups).

Terminal window
# Download from one or more categories
php artisan rconfig:download-category 1 2 3
# With debug output
php artisan rconfig:download-category 1 -d

Arguments:

  • Category IDs (space-separated for multiple)

Options:

  • -d: Enable debug output

Example:

Terminal window
# Download all routers (category ID 1) and switches (category ID 2)
php artisan rconfig:download-category 1 2

Downloads configurations for specified devices. This is one of the most commonly used commands for on-demand config retrieval and debugging.

Terminal window
# Download from specific devices
php artisan rconfig:download-device 1002 1003 1004
# Enable debug output for troubleshooting
php artisan rconfig:download-device 1002 -d

Arguments:

  • 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:

Terminal window
# Backup router before making changes, with debug output
php artisan rconfig:download-device 1002 -d

Downloads configurations for all devices with specified tags.

Terminal window
# Download all devices tagged with specific tags
php artisan rconfig:download-tag 1001 1002
# With debug output
php artisan rconfig:download-tag 1001 -d

Arguments:

  • Tag IDs (space-separated for multiple)

Example:

Terminal window
# Backup all devices tagged "production" (tag ID 1001)
php artisan rconfig:download-tag 1001

Downloads configurations for all devices associated with specified tasks.

Terminal window
# Download configs for devices in specific tasks
php artisan rconfig:download-task 555555 666666
# With debug output
php artisan rconfig:download-task 555555 -d

Arguments:

  • Task IDs (space-separated for multiple)

Lists all rconfig:* commands with their descriptions. Provides a quick reference to available commands.

Terminal window
php artisan rconfig:list

Lists all category (Command Group) IDs and names in rConfig. Useful for finding category IDs for use with other commands.

Terminal window
php artisan rconfig:list-categories

Output example:

ID | Category Name
------|---------------
1 | Routers
2 | Switches
3 | Firewalls

Lists all device IDs and names in rConfig. Essential for finding device IDs for backup commands.

Terminal window
php artisan rconfig:list-devices

Output example:

ID | Device Name | IP Address
------|--------------------|--------------
1001 | core-router-01 | 10.0.0.1
1002 | access-switch-02 | 10.0.1.10

Lists all tag IDs and names in rConfig.

Terminal window
php artisan rconfig:list-tags

Output example:

ID | Tag Name
------|----------
1001 | production
1002 | staging
1003 | datacenter-1

Lists all task IDs and names in rConfig.

Terminal window
php artisan rconfig:list-tasks

Manages device type mappings for Oxidized import. Used to map Oxidized device types to rConfig vendor templates.

Terminal window
php artisan rconfig:oxidized-device-mappings

See also: Oxidized Migration Guide


Imports devices from Oxidized JSON file to rConfig database.

Terminal window
php artisan rconfig:oxidized-import-devices /path/to/devices.json

See also: Oxidized Migration Guide


Imports devices from Oxidized to rConfig. This command connects to an Oxidized instance and imports its device inventory.

Terminal window
php artisan rconfig:oxidized-load-devices

Prerequisites:

  • Oxidized integration configured in rConfig settings
  • Network access to Oxidized instance

See also: Oxidized Migration Guide


Purges failed configuration download attempts for specified or all devices. Helps clean up failed backup records.

Terminal window
# Purge failed configs for specific devices
php artisan rconfig:purge-failedconfigs 1001 1002
# Purge all failed configs
php artisan rconfig:purge-failedconfigs --all

Arguments:

  • Device IDs (space-separated for multiple)

Options:

  • --all: Purge failed configs for all devices

Manages device type mappings for RANCID import. Used to map RANCID device types to rConfig vendor templates.

Terminal window
php artisan rconfig:rancid-device-mappings

See also: RANCID Migration Guide


Imports devices from RANCID JSON file to rConfig database.

Terminal window
php artisan rconfig:rancid-import-devices /path/to/rancid-devices.json

See also: RANCID Migration Guide


Loads devices from RANCID installation to create rConfig import JSON file.

Terminal window
php artisan rconfig:rancid-load-devices

Prerequisites:

  • Access to RANCID installation and configuration files

See also: RANCID Migration Guide


Generates a CLI report of all devices’ latest downloaded configurations. Useful for auditing backup status.

Terminal window
php artisan rconfig:report-lastDownload

Output 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

Searches all configuration files for a given string. Powerful tool for finding specific configurations across your entire network.

Terminal window
# Search for a specific string
php artisan rconfig:search-configs "ntp server"
# Search with regex pattern
php artisan rconfig:search-configs --pattern="ip route.*192.168"

Arguments:

  • Search string or pattern

Options:

  • --pattern: Use regex pattern for advanced searching
  • --case-sensitive: Perform case-sensitive search

Use cases:

  • Finding all devices with specific configuration
  • Security audits (finding weak passwords, old protocols)
  • Compliance checking
  • Configuration standardization verification

Example:

Terminal window
# Find all devices configured with a specific NTP server
php artisan rconfig:search-configs "ntp server 10.0.0.1"

Syncs the application schedule with the schedule monitor. Ensures scheduled tasks are properly registered.

Terminal window
php artisan rconfig:sync-tasks

When to run:

  • After creating new scheduled tasks
  • When scheduled tasks aren’t running
  • After system updates