The ultimate command-line companion for Cisco Intersight. Designed for DevOps professionals, bringing kubectl-style semantics to your infrastructure management, isctl allows you to manage your Intersight resources with ease and precision.
- OpenAPI-Driven: Automatically generated from the Intersight OpenAPI v3 spec, ensuring capability with the latest features.
- Cross-Platform: Native binaries for macOS, Linux, and Windows.
- Flexible Authentication: Supports both API Key and OAuth 2.0 authentication with automatic token caching.
- Developer Friendly: Human, JSON, or YAML output with JSONpath and Go Template support for powerful data extraction.
- Shell Autocompletion: Native support for Bash, Zsh, Fish, and PowerShell.
- Operational Reports: Built-in reports for HCL compliance, Contract status, and more.
If you use Homebrew, the easiest way to install isctl is:
brew install cgascoig/isctl/isctl
If you don't use Homebrew:
- Download the latest release from the Releases page.
- Unzip and move the
isctlbinary somewhere that is on your path (e.g./usr/local/bin).
The easiest way is using the scoop.sh installer:
scoop install https://github.com/cgascoig/isctl/raw/devel/isctl.json
Otherwise:
- Download the latest release from the Releases page.
- Unzip and move the
isctl.exebinary somewhere that is on your path.
If you use Homebrew, the easiest way to install isctl is:
brew install cgascoig/isctl/isctl
If you don't use Homebrew:
- Download the latest release from the Releases page.
- Extract the
.tar.gzand move theisctlbinary somewhere that is on your path (e.g./usr/local/bin).
The Quick Start below covers the basics but you should review the Users Guide for complete documentation.
- Basic Queries
- Advanced Queries
- Create, Update, Delete
- Bulk Operations
- Example Use Cases
- Configuration
- Shell Autocompletion
- Reports
isctl interacts with the Cisco Intersight REST API, so it needs either an API key or OAuth application credentials.
- Login to the Intersight GUI.
- Generate a new API Key (under Settings -> API Keys). Choose "API key for OpenAPI schema version 2" as the API Key Purpose.
- Save the key somewhere on your desktop and make a note of the key ID.
- Login to the Intersight GUI.
- Generate a new OAuth application (under Settings -> OAuth).
- Make a note of the Client ID and Client Secret.
Run isctl configure to configure it. Follow the prompts for your preferred authentication method.
Let's setup authentication. You can either configure intersight_api_key_id and intersight_secret_key (for API Key authentication), or you can configure intersight_client_id and intersight_client_secret (for OAuth authentication).
intersight_api_key_id is currently ''
Enter new intersight_api_key_id or press Enter to keep existing:
...
To retrieve resources from Intersight, use the isctl get ... commands.
For example, to query all objects of a certain type:
isctl get ntp policy
Output:
------------ ----------------------------- ------------------------ -----------------------------
Enabled Moid Name NtpServers
------------ ----------------------------- ------------------------ -----------------------------
False 5ecb069c6275722d3143e668 test-ntp-policy
True 5ee1aa076275722d3122a944 cg-tf-ntp-test-1 10.10.10.10, 10.10.10.12
------------ ----------------------------- ------------------------ -----------------------------
For detailed documentation, see the isctl Users Guide.
Run operational reports directly from the CLI:
# Check Hardware Compatibility List (HCL) status
isctl report hcl
# Check device contract status
isctl report contract-status
Generate autocompletion scripts for your shell:
# Load bash completion
source <(isctl completion bash)
# For other shells (zsh, fish, powershell), see the documentation
isctl completion --help