AgentEnder / cli-forge

Powerful, Composable CLI Tools
http://craigory.dev/cli-forge/
ISC License
4 stars 0 forks source link

Configuration Loading Support #12

Closed AgentEnder closed 1 month ago

AgentEnder commented 2 months ago

Ability to load flags from config files by default.

Cli overrides env overrides config should be order of precedence

In yargs there are 2 equivalent flags

.config takes either a string path to file that would be required, a resolved object, or a function callback to load the config file

.pkgConf is a shortcut for loading config from package.json specifically.

I don't think we should implement .pkgConf specifically, we can always provide a set of builtin callbacks to pass to .config instead.

AgentEnder commented 1 month ago

Fixed in #23