Skip to content

Conversation

jyecusch
Copy link
Member

Allows user to list all available config keys with nitric config -l and the current values with nitric config.

Fixes NIT-74

Copy link

vercel bot commented Jul 14, 2025

@jyecusch is attempting to deploy a commit to the Nitric Team on Vercel.

A member of the Team first needs to authorize it.

@jyecusch
Copy link
Member Author

jyecusch commented Jul 14, 2025

Some example usage of the config and config list options:

When the current project has a local config file

nitric config
Config file: .nitric/config.yaml
=============================
url: http://localhost:3000

Where there is a global config file

nitric config
Config file: /Users/jye/.nitric/config.yaml
=============================
url: http://localhost:3000

When there is no config file

nitric config
Config file: none (using defaults)
=============================
url: https://app.nitric.io/ (default)

Listing all keys

nitric config -l
Available configuration keys:
=============================
url: The base URL of the Nitric server (e.g., https://app.nitric.io)

Screenshot

zsh example screenshot

@jyecusch
Copy link
Member Author

This also fixes a bug with the set command, which would fail if the config dir hadn't already been created

Copy link

vercel bot commented Jul 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
nitric-docs ⬜️ Ignored (Inspect) Visit Preview Jul 14, 2025 11:55pm

Copy link
Member

@tjholm tjholm left a comment

Choose a reason for hiding this comment

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

Would probably make list a command instead of a flag, but happy with the implementation.

@jyecusch jyecusch merged commit b0669fd into nitrictech:next Jul 15, 2025
4 checks passed
@jyecusch jyecusch deleted the list-config-options branch July 15, 2025 22:42
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.

5 participants