config
Manage persistent configuration settings for CloudOps Tools.
Usage
cloudops-tools config [subcommand] [options]Subcommands
| Subcommand | Description |
|---|---|
set | Set a configuration value |
get | Get configuration value(s) |
unset | Remove a configuration value |
path | Show the configuration file path |
Configuration Keys
| Key | Type | Description |
|---|---|---|
defaultRegion | string | Default AWS region for scans |
defaultAccount | string | Default AWS account or profile |
defaultFormat | string | Default export format (csv, xlsx, json) |
defaultMode | string | Default scan mode (basic, detailed, security, cost) |
defaultServices | string[] | Default services to scan |
skipGlobal | boolean | Skip global services by default |
onlyGlobal | boolean | Scan only global services by default |
config set
Set a configuration value.
Usage
cloudops-tools config set <key> <value>Examples
# Set default region
cloudops-tools config set defaultRegion eu-west-1
# Set default export format
cloudops-tools config set defaultFormat xlsx
# Set default scan mode
cloudops-tools config set defaultMode security
# Set default services (comma-separated)
cloudops-tools config set defaultServices EC2,RDS,Lambda
# Enable skip global by default
cloudops-tools config set skipGlobal true
# Set default account/profile
cloudops-tools config set defaultAccount productionconfig get
Get one or all configuration values.
Usage
# Get all configuration
cloudops-tools config get
# Get a specific key
cloudops-tools config get <key>Examples
# Show all configuration
cloudops-tools config get
# Get specific value
cloudops-tools config get defaultRegion
cloudops-tools config get defaultFormatconfig unset
Remove a configuration value.
Usage
cloudops-tools config unset <key>Examples
# Remove default region setting
cloudops-tools config unset defaultRegion
# Remove default services
cloudops-tools config unset defaultServicesconfig path
Show the path to the configuration file.
Usage
cloudops-tools config pathExample
cloudops-tools config path
# Output: /Users/username/.config/cloudops-tools/config.jsonConfiguration File
Configuration is stored as JSON. Example configuration:
{
"defaultRegion": "eu-west-1",
"defaultFormat": "xlsx",
"defaultMode": "security",
"defaultServices": ["EC2", "RDS", "Lambda", "S3"],
"skipGlobal": false,
"onlyGlobal": false
}Precedence
Command-line options always take precedence over configuration file settings. This allows you to set sensible defaults while overriding them when needed:
# Uses config file defaults
cloudops-tools init
# Overrides defaultFormat from config
cloudops-tools init --export-format json