Skip to content

docs: use INI format in README Quick Start config example - #221

Merged
jennlu330 merged 2 commits into
itential:mainfrom
cody-rester:docs/readme-ini-config-example
Sep 3, 2026
Merged

jennlu330 merged 2 commits into
itential:mainfrom
cody-rester:docs/readme-ini-config-example

Conversation

@cody-rester

Copy link
Copy Markdown
Contributor

Summary

  • The default config auto-discovery path (no --config / IPCTL_CONFIG set) hardcodes the Viper config type to "ini" in internal/config/loader.go's loadConfigFile, so a ~/.platform.d/config.toml found via auto-discovery is actually parsed with the INI decoder, not TOML.
  • TOML-style quoted section headers like ["profile default"] get mangled by the INI parser (which has no quoted-string support — see gopkg.in/ini.v1/parser.go), silently dropping the profile and its settings (e.g. a custom port).
  • This updates the README Quick Start example to plain INI syntax ([profile default], unquoted values), matching what auto-discovery actually parses today, so new users following the README don't hit a silent fallback to the wrong port/host.

Note

This is a docs-only fix to match current default behavior. The underlying auto-discovery format-detection bug (only explicit --config/IPCTL_CONFIG correctly auto-detects TOML/YAML/JSON by extension) is still open — happy to file a separate issue/PR for that if useful.

Test plan

  • Verified the INI syntax in the example parses correctly against ipctl's default auto-discovery path
  • Docs-only change, no functional testing needed

🤖 Generated with Claude Code

cody-rester and others added 2 commits September 2, 2026 10:37
The default config auto-discovery path (no --config/IPCTL_CONFIG set)
hardcodes the Viper config type to "ini", so a ~/.platform.d/config.toml
found via auto-discovery is actually parsed with the INI decoder, not
the TOML decoder. TOML-style quoted section headers like
["profile default"] get mangled by the INI parser, silently dropping
the profile. Switch the Quick Start example to plain INI syntax so it
matches what auto-discovery actually parses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Naming a profile (e.g. "local") in config.ini isn't enough to make it
active - without --profile or an [application] default_profile setting,
ipctl silently falls back to its built-in empty default profile
(port 0, resolved to 443). Show the [application] default_profile
setting so the Quick Start example actually works without extra flags,
and make the verify option explicit since it directly affects whether
self-signed/local TLS certs are trusted.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jennlu330
jennlu330 merged commit 6d0dc65 into itential:main Sep 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants