Skip to Content
DocsutooConfiguration

Configuration

utoo supports multiple configuration methods with hierarchical priority.

Priority Order

CLI flags (highest)

Terminal
ut install --registry https://registry.npmmirror.com

Environment variables

Terminal
export UTOO_REGISTRY=https://registry.npmmirror.com

Project config

.utoo.toml in project root

Global config (lowest)

~/.utoo/config.toml

CLI Configuration

Manage configuration via ut config:

Terminal
# Set locally ut config set registry https://registry.npmmirror.com # Set globally ut config set registry https://registry.npmmirror.com --global

Environment Variables

VariableDescription
UTOO_REGISTRYOverride npm registry
UTOO_CACHE_DIROverride cache directory
Terminal
UTOO_REGISTRY=https://registry.npmmirror.com ut install

TOML Configuration

Location: ~/.utoo/config.toml

~/.utoo/config.toml
[values] registry = "https://registry.npmmirror.com" cache-dir = "~/.cache/nm" legacy-peer-deps = true

Common Settings

KeyDefaultDescription
registryhttps://registry.npmmirror.comnpm registry URL
cache-dir~/.cache/nmPackage cache directory
legacy-peer-depsfalseLegacy peer dependency handling

Custom Commands

Define custom shortcuts for frequently used commands.

Terminal
# Set custom command ut config set hi.cmd "utx cowsay hi" ut config set lint.cmd "ut run lint" # Run custom command ut hi ut lint

Registry Recommendations

Terminal
ut config set registry https://registry.npmmirror.com --global

Faster for users in China.

Last updated on