Skip to content

fix(cli): use XDG config paths consistently - #1179

Merged
SequeI merged 3 commits into
mainfrom
fix/1175-xdg-config-paths
Jun 17, 2026
Merged

fix(cli): use XDG config paths consistently#1179
SequeI merged 3 commits into
mainfrom
fix/1175-xdg-config-paths

Conversation

@SequeI

@SequeI SequeI commented Jun 16, 2026

Copy link
Copy Markdown
Member

Linked Issue

Closes #1175

Summary

Route user config (config.toml, trusted-keys cache) through resolve_user_config_dir() instead of dirs::config_dir(), so macOS matches ~/.config/nono like profiles and packages already did.

Add $NONO_CONFIG profile expansion, display path helpers for CLI output, and update schema/docs/scripts to prefer XDG variables in machine-readable paths while keeping ~/.config/nono in user-facing docs and --help.

tldr: user facing docs = use absolute path just so mac users aren't lost. For inside code files, use XDG since it is expanded/replaced by defaults internally anyway is set/unset on both platforms. With this, we will be fully unified on the XDG spec

Test Plan

Checklist

  • An issue exists and is linked above
  • All commits are signed-off, using DCO
  • All new code follows the project's coding standards (CLAUDE.md) and is covered by tests
  • Public-facing changes are paired with documentation updates
  • Release note has been added to CHANGELOG.md if needed

@github-actions github-actions Bot added bug Something isn't working nono-cli size/medium labels Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

PR Review Summary

Size

Metric Value
Lines added +228
Lines removed -55
Total changed 283
Classification Medium (50–300 lines)

Affected crates

  • crates/nono-cli — CLI changes. Verify argument parsing, flag documentation, and UX behaviour across supported platforms.

Blast radius — Broad

This PR touches: source code,documentation,configuration / policy files


Updated automatically on each push to this PR.

@SequeI
SequeI force-pushed the fix/1175-xdg-config-paths branch from 766578a to d618672 Compare June 16, 2026 23:41

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request standardizes configuration and profile path resolution across the codebase to use $XDG_CONFIG_HOME/nono (defaulting to ~/.config/nono) and introduces the $NONO_CONFIG variable for path expansion. It updates CLI output helpers, documentation, helper scripts, and integration tests to support this change. Feedback on the documentation changes highlights that replacing $HOME with ~ in file:// URIs will prevent proper shell expansion and fail runtime validation, so those instances should be reverted to $HOME.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docs/cli/features/trust.mdx Outdated
Comment thread docs/cli/features/trust.mdx Outdated
SequeI added 2 commits June 17, 2026 09:51
Route user config (config.toml, trusted-keys cache) through
resolve_user_config_dir() instead of dirs::config_dir(), so macOS
matches ~/.config/nono like profiles and packages already did.

Add $NONO_CONFIG profile expansion, display path helpers for CLI
output, and update schema/docs/scripts to prefer XDG variables in
machine-readable paths while keeping ~/.config/nono in user-facing
docs and --help.

Signed-off-by: Aleksy Siek <aleksy@alwaysfurther.ai>
Signed-off-by: Aleksy Siek <aleksy@alwaysfurther.ai>
@SequeI
SequeI force-pushed the fix/1175-xdg-config-paths branch from 7a44e63 to 5b6090d Compare June 17, 2026 08:51
@SequeI
SequeI merged commit 8e0d94f into main Jun 17, 2026
13 checks passed
oscarmackjr-twg pushed a commit to OscarMackJr/nono that referenced this pull request Jun 23, 2026
* fix(cli): use XDG config paths consistently

Route user config (config.toml, trusted-keys cache) through
resolve_user_config_dir() instead of dirs::config_dir(), so macOS
matches ~/.config/nono like profiles and packages already did.

Add $NONO_CONFIG profile expansion, display path helpers for CLI
output, and update schema/docs/scripts to prefer XDG variables in
machine-readable paths while keeping ~/.config/nono in user-facing
docs and --help.

Signed-off-by: Aleksy Siek <aleksy@alwaysfurther.ai>

* fix

Signed-off-by: Aleksy Siek <aleksy@alwaysfurther.ai>

---------

Signed-off-by: Aleksy Siek <aleksy@alwaysfurther.ai>
(cherry picked from commit 8e0d94f)
Signed-off-by: oscarmackjr-twg <oscar.mack.jr@gmail.com>
klassm pushed a commit to klassm/nono that referenced this pull request Jul 3, 2026
* fix(cli): use XDG config paths consistently

Route user config (config.toml, trusted-keys cache) through
resolve_user_config_dir() instead of dirs::config_dir(), so macOS
matches ~/.config/nono like profiles and packages already did.

Add $NONO_CONFIG profile expansion, display path helpers for CLI
output, and update schema/docs/scripts to prefer XDG variables in
machine-readable paths while keeping ~/.config/nono in user-facing
docs and --help.

Signed-off-by: Aleksy Siek <aleksy@alwaysfurther.ai>

* fix

Signed-off-by: Aleksy Siek <aleksy@alwaysfurther.ai>

---------

Signed-off-by: Aleksy Siek <aleksy@alwaysfurther.ai>
@SequeI
SequeI deleted the fix/1175-xdg-config-paths branch July 10, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working nono-cli size/medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use $XDG_CONFIG_HOME in profile grants instead of hardcoded $HOME/.config

2 participants