Skip to content

Commit f29d2f7

Browse files
Fix documented config options/env vars/flags (#94)
1 parent e649a27 commit f29d2f7

3 files changed

Lines changed: 55 additions & 43 deletions

File tree

CLAUDE.md

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -225,17 +225,11 @@ The CLI uses a layered configuration approach:
225225
3. Environment variables with `TIGER_` prefix
226226
4. Command-line flags (highest precedence)
227227

228-
Key configuration values:
229-
- `api_url`: Tiger API endpoint
230-
- `console_url`: Tiger Console URL
231-
- `gateway_url`: Tiger Gateway URL
232-
- `docs_mcp`: Enable/disable proxied docs MCP tools
233-
- `docs_mcp_url`: URL for docs MCP server
234-
- `service_id`: Default service ID
235-
- `output`: Output format (json, yaml, table)
236-
- `analytics`: Usage analytics toggle
237-
- `password_storage`: Password storage method (keyring, pgpass, none)
238-
- `debug`: Debug logging toggle
228+
For a complete list of valid configuration options, see `internal/tiger/config/config.go`.
229+
All configuration options also have corresponding `TIGER_` environment variables.
230+
231+
For a complete list of global command-line flags, see `internal/tiger/cmd/root.go`.
232+
Note that not all config options have corresponding global flags, and not all global flags correspond to config options.
239233

240234
### MCP Server Architecture
241235

@@ -318,14 +312,6 @@ Two-mode logging system using zap:
318312
- **Production mode**: Minimal output, warn level and above, clean formatting
319313
- **Debug mode**: Full development logging with colors and debug level
320314

321-
Global flags available on all commands:
322-
- `--config-dir`: Path to configuration directory
323-
- `--debug`: Enable debug logging
324-
- `--output/-o`: Set output format
325-
- `--service-id`: Override service ID
326-
- `--analytics`: Toggle analytics
327-
- `--password-storage`: Password storage method
328-
329315
### Dependencies
330316

331317
- **Cobra**: CLI framework and command structure

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -213,36 +213,40 @@ tiger config reset
213213

214214
All configuration options can be set via `tiger config set <key> <value>`:
215215

216+
- `analytics` - Enable/disable analytics (default: `true`)
217+
- `color` - Enable/disable colored output (default: `true`)
218+
- `debug` - Enable/disable debug logging (default: `false`)
216219
- `docs_mcp` - Enable/disable docs MCP proxy (default: `true`)
217-
- `service_id` - Default service ID
218220
- `output` - Output format: `json`, `yaml`, or `table` (default: `table`)
219-
- `analytics` - Enable/disable analytics (default: `true`)
220221
- `password_storage` - Password storage method: `keyring`, `pgpass`, or `none` (default: `keyring`)
221-
- `debug` - Enable/disable debug logging (default: `false`)
222+
- `service_id` - Default service ID
223+
- `version_check_interval` - How often the CLI will check for new versions, 0 to disable (default: `24h`)
222224

223225
### Environment Variables
224226

225227
Environment variables override configuration file values. All variables use the `TIGER_` prefix:
226228

229+
- `TIGER_ANALYTICS` - Enable/disable analytics
230+
- `TIGER_COLOR` - Enable/disable colored output
227231
- `TIGER_CONFIG_DIR` - Path to configuration directory (default: `~/.config/tiger`)
232+
- `TIGER_DEBUG` - Enable/disable debug logging
228233
- `TIGER_DOCS_MCP` - Enable/disable docs MCP proxy
229-
- `TIGER_SERVICE_ID` - Default service ID
230234
- `TIGER_OUTPUT` - Output format: `json`, `yaml`, or `table`
231-
- `TIGER_ANALYTICS` - Enable/disable analytics
232235
- `TIGER_PASSWORD_STORAGE` - Password storage method: `keyring`, `pgpass`, or `none`
233-
- `TIGER_DEBUG` - Enable/disable debug logging
234-
- `TIGER_VERSION_CHECK_URL` - URL to check for latest version
235-
- `TIGER_VERSION_CHECK_INTERVAL` - Seconds between version checks, 0 to disable
236+
- `TIGER_SERVICE_ID` - Default service ID
237+
- `TIGER_VERSION_CHECK_INTERVAL` - How often the CLI will check for new versions, 0 to disable
236238

237239
### Global Flags
238240

239241
These flags are available on all commands and take precedence over both environment variables and configuration file values:
240242

241-
- `--config-dir <path>` - Path to configuration directory (default: `~/.config/tiger`)
242-
- `--service-id <id>` - Specify service ID
243243
- `--analytics` - Enable/disable analytics
244-
- `--password-storage <method>` - Password storage method: `keyring`, `pgpass`, or `none`
244+
- `--color` - Enable/disable colored output
245+
- `--config-dir <path>` - Path to configuration directory (default: `~/.config/tiger`)
245246
- `--debug` - Enable/disable debug logging
247+
- `--password-storage <method>` - Password storage method: `keyring`, `pgpass`, or `none`
248+
- `--service-id <id>` - Specify service ID
249+
- `--skip-update-check` - Skip checking for updates on startup (default: `false`)
246250
- `-h, --help` - Show help information
247251

248252
## Contributing

specs/spec.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,54 @@ mv tiger /usr/local/bin/
2323

2424
### Environment Variables
2525

26-
- `TIGER_API_URL`: Base URL for Tiger Cloud API (default: https://api.tigerdata.com/public/v1)
27-
- `TIGER_SERVICE_ID`: Default service ID to use
28-
- `TIGER_CONFIG_DIR`: Configuration directory (default: ~/.config/tiger)
29-
- `TIGER_OUTPUT`: Default output format (json, yaml, table)
30-
- `TIGER_ANALYTICS`: Enable/disable usage analytics (true/false)
26+
Environment variables override configuration file values. All variables use the `TIGER_` prefix:
27+
28+
- `TIGER_ANALYTICS` - Enable/disable analytics
29+
- `TIGER_COLOR` - Enable/disable colored output
30+
- `TIGER_CONFIG_DIR` - Path to configuration directory (default: ~/.config/tiger)
31+
- `TIGER_DEBUG` - Enable/disable debug logging
32+
- `TIGER_DOCS_MCP` - Enable/disable docs MCP proxy
33+
- `TIGER_OUTPUT` - Output format: json, yaml, or table
34+
- `TIGER_PASSWORD_STORAGE` - Password storage method: keyring, pgpass, or none
35+
- `TIGER_SERVICE_ID` - Default service ID
36+
- `TIGER_VERSION_CHECK_INTERVAL` - How often the CLI will check for new versions, 0 to disable
3137

3238
### Configuration File
3339

3440
Location: `~/.config/tiger/config.yaml`
3541

42+
All configuration options can be set via `tiger config set <key> <value>`:
43+
44+
- `analytics` - Enable/disable analytics (default: true)
45+
- `color` - Enable/disable colored output (default: true)
46+
- `debug` - Enable/disable debug logging (default: false)
47+
- `docs_mcp` - Enable/disable docs MCP proxy (default: true)
48+
- `output` - Output format: json, yaml, or table (default: table)
49+
- `password_storage` - Password storage method: keyring, pgpass, or none (default: keyring)
50+
- `service_id` - Default service ID
51+
- `version_check_interval` - How often the CLI will check for new versions, 0 to disable (default: 24h)
52+
53+
#### Example
54+
3655
```yaml
3756
api_url: https://api.tigerdata.com/public/v1
3857
service_id: your-default-service-id
3958
output: table
4059
analytics: true
4160
```
4261
43-
### Global Options
62+
### Global Flags
63+
64+
These flags are available on all commands and take precedence over both environment variables and configuration file values:
4465
45-
- `--config-dir`: Path to configuration directory
46-
- `--service-id`: Override default service ID (can also be specified positionally for single-service commands)
47-
- `--analytics`: Toggle analytics collection
48-
- `--password-storage`: Password storage method (keyring, pgpass, none) (default: keyring)
49-
- `-v, --version`: Show CLI version
50-
- `-h, --help`: Show help information
51-
- `--debug`: Enable debug logging
66+
- `--analytics` - Enable/disable analytics
67+
- `--color` - Enable/disable colored output
68+
- `--config-dir <path>` - Path to configuration directory (default: ~/.config/tiger)
69+
- `--debug` - Enable/disable debug logging
70+
- `--password-storage <method>` - Password storage method: keyring, pgpass, or none
71+
- `--service-id <id>` - Specify service ID
72+
- `--skip-update-check` - Skip checking for updates on startup (default: false)
73+
- `-h, --help` - Show help information
5274

5375
## Command Structure
5476

0 commit comments

Comments
 (0)