#cisco #catalyst #networking #cli #command-line-tool #dnac

app catalysh

A command line utility for interaction with Ciscos Catalyst Center, utilizing it's API

6 releases

0.0.8 Jan 2, 2025
0.0.7 Dec 26, 2024

#1064 in Command line utilities

Download history 187/week @ 2024-11-27 130/week @ 2024-12-04 34/week @ 2024-12-11 9/week @ 2024-12-18 383/week @ 2024-12-25 150/week @ 2025-01-01 12/week @ 2025-01-08

557 downloads per month

Custom license

145KB
3.5K SLoC

catalysh

A Rust-based CLI shell for interacting with Cisco Catalyst Center through its API. catalysh provides a user-friendly interface for managing and monitoring your Cisco network infrastructure.

Features

  • Interactive shell with command history and auto-completion
  • Secure credential storage
  • Command-line completion with Tab
  • Comprehensive network device management
  • SSL certificate verification options

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/catalysh.git
cd catalysh
  1. Build and run using Cargo:
cargo build --release
cargo run

Initial Setup

On first run, catalysh will guide you through the setup process:

  1. Enter your Cisco Catalyst Center URL (e.g., https://dnac.example.com)
  2. Provide your username
  3. Enter your password (input is hidden for security)
  4. Choose whether to verify SSL certificates

Available Commands

Top-Level Commands

  • show - Display information about network devices and configurations
  • config - Enter configuration mode
  • app - Application-specific commands
  • exit - Exit the application
  • help - Display help information

Show Commands

  • show ap rf-profile - Display AP RF profiles
  • show device - List network devices
  • Additional show commands available via show -help

App Configuration

  • app config reset - Reset application configuration
  • app config show - Display current configuration

Command Help

Get help for any command by adding -help:

show device -help
config -help

Data Storage and Security

catalysh prioritizes security in handling sensitive data:

  1. Configuration Storage
  • Configuration stored in ~/Library/Application Support/catalysh/config.yml
  • Contains non-sensitive settings like API URLs and preferences
  1. Credential Security
  • Credentials stored securely in an encrypted SQLite database
  • Located at ~/Library/Application Support/catalysh/credentials.db
  • Passwords are encrypted using industry-standard encryption
  • No plaintext passwords stored anywhere
  1. Session Management
  • Authentication tokens managed securely in memory
  • Automatic token refresh handling
  • Secure password input with hidden characters

Troubleshooting

  1. Authentication Issues
  • Use app config reset to clear the full applicatoin config (You will be prompted to set it back up on the next command that utilizes the Catalyst Center API)
  • Verify your Catalyst Center URL is correct using:
app config show

  • Ensure your user account has appropriate permissions
  1. SSL Certificate Issues
  • During setup, choose 'n' for SSL verification if using self-signed certificates
  • For production environments, always use valid certificates and enable verification

Support

For issues, questions, or contributions:

  • Open an issue on GitHub
  • Check the CONTRIBUTING.md file for development guidelines

Dependencies

~43–60MB
~1M SLoC