Usage#
nux configDescription#
Opens the global nux config in $EDITOR. If the config file does not exist yet, a scaffold with commented examples is created first.
The generated scaffold contains all available settings with sensible defaults. Optional settings are commented out with examples so you can enable them as needed.
Behavior#
When no config exists:
- The config directory and
projects/subdirectory are created. - A scaffold
config.yamlis written with default values, commented examples, and a schema modeline for editor IntelliSense. - nux prints
Created <path>. - If
$EDITORis set, the file is opened in your editor. Otherwise nux printshint: set $EDITOR to open new configs automatically.
When a config already exists:
- If
$EDITORis set, the file is opened in your editor. Otherwise nux prints a hint.
After saving:
When the editor closes, nux re-loads and validates the config. Errors are printed as [error], warnings as [warn], and a clean config prints Config valid. If the YAML is unparseable, a syntax error warning is shown instead.
Generated scaffold#
The scaffold includes a schema modeline and all global options:
# yaml-language-server: $schema=https://raw.githubusercontent.com/Drew-Daniels/nux/main/schemas/global.schema.json
# nux global configuration
# Base directory for project discovery (supports ~ expansion).
project_dirs: ~/projects
# Fuzzy finder backend: fzf or gum.
picker: fzf
# Open the picker when nux is run with no arguments outside a project.
picker_on_bare: false
# Use zoxide for directory lookup when no config file matches.
zoxide: falseOptional settings like default_shell, pane_init, default_session, and groups are included as commented examples.
Examples#
# Open or create the global config
nux config
# Use a custom config directory
nux config --config-dir ~/dotfiles/nux