6 releases
0.0.8 | Jan 2, 2025 |
---|---|
0.0.7 | Dec 26, 2024 |
#1064 in Command line utilities
557 downloads per month
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
- Clone the repository:
git clone https://github.com/yourusername/catalysh.git
cd catalysh
- Build and run using Cargo:
cargo build --release
cargo run
Initial Setup
On first run, catalysh will guide you through the setup process:
- Enter your Cisco Catalyst Center URL (e.g., https://dnac.example.com)
- Provide your username
- Enter your password (input is hidden for security)
- Choose whether to verify SSL certificates
Available Commands
Top-Level Commands
show
- Display information about network devices and configurationsconfig
- Enter configuration modeapp
- Application-specific commandsexit
- Exit the applicationhelp
- Display help information
Show Commands
show ap rf-profile
- Display AP RF profilesshow device
- List network devices- Additional show commands available via
show -help
App Configuration
app config reset
- Reset application configurationapp 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:
- Configuration Storage
- Configuration stored in
~/Library/Application Support/catalysh/config.yml
- Contains non-sensitive settings like API URLs and preferences
- 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
- Session Management
- Authentication tokens managed securely in memory
- Automatic token refresh handling
- Secure password input with hidden characters
Troubleshooting
- 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
- 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