fix: wire --no-color, add XDG_CONFIG_HOME, add delete confirmations#39
Merged
fix: wire --no-color, add XDG_CONFIG_HOME, add delete confirmations#39
Conversation
Three fixes from a CLI best-practices audit: 1. --no-color flag was declared but never wired to the color system. Colors are now checked lazily at render time and the preAction hook calls setNoColor() when the flag is present. 2. Config path now respects $XDG_CONFIG_HOME instead of hardcoding ~/.config. Falls back to ~/.config when the env var is unset. 3. `apps delete` and `webhooks delete` now prompt for confirmation before executing, matching the existing pattern in `config reset`. Both accept --yes / -y to skip the prompt in scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CodesMcCabe
requested changes
Mar 26, 2026
Collaborator
CodesMcCabe
left a comment
There was a problem hiding this comment.
Run /changeset through Claude to create the changeset md. Having that allows the github action to create a release to NPM.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests were failing on CI because XDG_CONFIG_HOME took precedence over HOME in configPath(), causing config files to be written outside the temp directory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CodesMcCabe
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the three YELLOW items from a CLI best-practices audit against internal design skills:
--no-colorflag wired to color system — flag was declared in Commander but never connected to the actual color logic incolors.ts. Nowesc/rgb/bgRgbchecknoColorlazily at render time, and thepreActionhook callssetNoColor(true)when--no-coloris passed.$XDG_CONFIG_HOMEsupport — config path now respects the XDG env var instead of hardcoding~/.config. Falls back to~/.configwhen unset (no behavior change for most users).apps deleteandwebhooks deletenow prompt before executing, matching the existing pattern inconfig reset. Both accept-y, --yesto skip the prompt in CI/scripts.Test plan
pnpm buildpassespnpm testpasses (245/245 across 37 test files)pnpm lintpassesalchemy apps delete <id>shows confirmation promptalchemy apps delete <id> --yesskips promptalchemy webhooks delete <id>shows confirmation promptecho "test" | alchemy balance --no-colorproduces uncolored outputXDG_CONFIG_HOME=/tmp/xdg alchemy config pathuses/tmp/xdg/alchemy/config.json🤖 Generated with Claude Code