cloudops-cli
v0.1.2
Published
CloudOps Enterprise CLI - AI-assisted cloud operations control plane
Maintainers
Readme
CloudOps CLI
CloudOps Enterprise CLI - AI-assisted cloud operations control plane
Installation
npm install -g @cloudops/cliUsage
cloudops [options] [command]Global Options
All commands support the following global options:
--config <path>- Path to config file (default:~/.cloudops/config.yaml)--profile <name>- AI model profile to use for this command--debug- Enable debug output
Examples
# Use custom config file
cloudops --config /path/to/config.yaml investigate "high CPU usage"
# Use specific AI model profile
cloudops --profile production incident inc-123 diagnose
# Enable debug output
cloudops --debug config showOutput Formatting
The CLI uses consistent formatting for all output:
- Success messages: Green checkmark (✓)
- Error messages: Red X (✗)
- Warning messages: Yellow warning symbol (⚠)
- Info messages: Blue info symbol (ℹ)
- Debug messages: Gray arrow (→) - only shown with
--debug
Tables
The CLI can display data in formatted tables:
import { OutputFormatter } from '@cloudops/cli';
// Simple table
OutputFormatter.table(
['Name', 'Status', 'Count'],
[
['Item 1', 'Active', '10'],
['Item 2', 'Inactive', '5']
]
);
// Key-value table
OutputFormatter.keyValue({
'Incident ID': 'inc-123',
'Status': 'active',
'Created': '2024-01-01'
});JSON Output
// Pretty JSON (default)
OutputFormatter.json({ key: 'value' });
// Compact JSON
OutputFormatter.json({ key: 'value' }, false);Development
Build
npm run buildTest
npm testType Check
npm run typecheckArchitecture
The CLI is built with:
- Commander.js - Command parsing and argument handling
- Chalk - Terminal colors and styling
- cli-table3 - Formatted table output
- Inquirer - Interactive prompts
- Axios - HTTP client for API calls
Project Structure
src/
├── cli.ts # Main CLI entry point
├── config/ # Configuration management
│ └── config-handler.ts
├── utils/ # Utility functions
│ └── output-formatter.ts # Output formatting utilities
└── types/ # TypeScript type definitions
└── cli-options.tsRequirements
- Node.js 18.x or higher
- TypeScript 5.x
License
Proprietary - CloudOps Enterprise
