What is Ankra CLI?
The Ankra CLI is a powerful command-line interface for interacting with the Ankra platform. It enables you to manage clusters, chat with AI about your infrastructure, browse Helm charts, manage credentials, deploy stacks, and automate platform operations directly from your terminal. Main use cases:- SSO authentication with the Ankra platform
- AI-powered chat for troubleshooting and assistance
- Cluster management (list, select, reconcile, clone)
- Stack management (create, list, rename, delete)
- Helm chart discovery and search
- Credentials management
- API token management
Features
- SSO Login - Browser-based authentication with PKCE
- AI Chat - Interactive and one-shot AI-powered troubleshooting
- Cluster Management - List, select, reconcile, and clone clusters
- Stack Management - Create, list, rename, delete, and view stack history
- Helm Charts - Browse, search, and get details on available charts
- Credentials - Manage cloud provider and Git credentials
- API Tokens - Create, list, revoke, and delete API tokens
- Secure - Credentials stored locally in
~/.ankra.yaml
Installation
Single Command Installation (Recommended)
Direct Download
Download the binary directly from GitHub Releases.Authentication
SSO Login (Recommended)
The easiest way to authenticate is using browser-based SSO:- Open your browser to the Ankra login page
- After you authenticate, save your credentials locally
- You can then use all ankra CLI commands
~/.ankra.yaml.
To logout and clear credentials:
Environment Variables (Alternative)
You can also use environment variables:~/.zshrc or ~/.bashrc) for persistence.
Quick Start
Command Reference
Authentication
login
Authenticate with the Ankra platform using browser-based SSO.logout
Remove saved credentials from~/.ankra.yaml.
AI Chat
chat
AI-powered chat for troubleshooting and assistance. Interactive mode:exit,quit,q- Exit chatclear- Clear conversation history
chat health
Get AI-analyzed cluster health for the selected cluster.chat history
List previous chat conversations.chat show
Show a specific conversation.chat delete
Delete a conversation.Cluster Operations
cluster list
List all clusters.cluster get
Get details of a specific cluster.cluster select
Interactively select a cluster for subsequent commands.cluster reconcile
Trigger cluster reconciliation to sync desired state with actual state.cluster clone
Clone stacks from an existing cluster to a new cluster configuration.Stack Management
All stack commands operate on the currently selected cluster.cluster stacks list
List all stacks for the active cluster.cluster stacks create
Create a new stack.cluster stacks delete
Delete a stack.cluster stacks rename
Rename a stack.cluster stacks history
Show change history for a stack.Helm Charts
charts list
List available Helm charts.charts search
Search for Helm charts by name.charts info
Get detailed information about a chart.Credentials
credentials list
List all credentials.ankra creds, ankra cred, ankra credential
credentials get
Get details of a specific credential.credentials validate
Check if a credential name is available.credentials delete
Delete a credential.API Tokens
tokens list
List all API tokens.ankra token list
tokens create
Create a new API token.tokens revoke
Revoke an API token (must be revoked before deletion).tokens delete
Delete a revoked API token.Global Flags
| Flag | Description |
|---|---|
--version | Show CLI version |
--help | Show help for any command |
--base-url | Base URL for the Ankra API |
--config | Config file (default: ~/.ankra.yaml) |
--token | API token for authentication |
Configuration
The CLI stores configuration in~/.ankra.yaml:
ANKRA_API_TOKEN- Override the stored tokenANKRA_BASE_URL- Override the base URL
Troubleshooting
Common Issues
PATH issues:Error Messages
- “No active cluster selected” - Run
ankra cluster selectfirst - “Resource not found” - Verify the resource name and selected cluster
- “Unauthorized” - Re-authenticate with
ankra login
Support & Resources
- Slack: Join Ankra Community
- Email: [email protected]
- GitHub: ankraio/ankra-cli
For more advanced usage, see the full documentation or contact support.