All Projects → ro31337 → yaask

ro31337 / yaask

Licence: MIT license
Make your yaml configurable with interactive configurations!

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to yaask

Koanf
Light weight, extensible configuration management library for Go. Built in support for JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.
Stars: ✭ 450 (+2900%)
Mutual labels:  config, yaml, configuration
goodconf
Transparently load variables from environment or JSON/YAML file.
Stars: ✭ 80 (+433.33%)
Mutual labels:  config, yaml, configuration
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (+4960%)
Mutual labels:  config, yaml, configuration
Hoplite
A boilerplate-free library for loading configuration files as data classes in Kotlin
Stars: ✭ 322 (+2046.67%)
Mutual labels:  config, yaml, configuration
Konf
A type-safe cascading configuration library for Kotlin/Java/Android, supporting most configuration formats
Stars: ✭ 225 (+1400%)
Mutual labels:  config, yaml, configuration
Strictyaml
Type-safe YAML parser and validator.
Stars: ✭ 836 (+5473.33%)
Mutual labels:  config, yaml, configuration
Hiyapyco
HiYaPyCo - A Hierarchical Yaml Python Config
Stars: ✭ 58 (+286.67%)
Mutual labels:  config, yaml, configuration
Config Lite
A super simple & flexible & useful config module.
Stars: ✭ 78 (+420%)
Mutual labels:  config, yaml, configuration
Simple Settings
A simple way to manage your project settings.
Stars: ✭ 165 (+1000%)
Mutual labels:  config, yaml, configuration
Dynaconf
Configuration Management for Python ⚙
Stars: ✭ 2,082 (+13780%)
Mutual labels:  config, yaml, configuration
climatecontrol
Python library for loading settings and config data from files and environment variables
Stars: ✭ 20 (+33.33%)
Mutual labels:  config, yaml, configuration
cfg-rs
A Configuration Library for Rust Applications
Stars: ✭ 18 (+20%)
Mutual labels:  config, yaml, configuration
parse it
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.
Stars: ✭ 86 (+473.33%)
Mutual labels:  config, yaml, configuration
network tech
Cisco config syntax and snippets for Sublime Text
Stars: ✭ 82 (+446.67%)
Mutual labels:  config, configuration
salak.rs
A multi layered configuration loader and zero-boilerplate configuration parser.
Stars: ✭ 27 (+80%)
Mutual labels:  config, configuration
eslint-define-config
Provide a defineConfig function for .eslintrc.js files
Stars: ✭ 61 (+306.67%)
Mutual labels:  config, configuration
nginx-conf
Nginx configuration
Stars: ✭ 18 (+20%)
Mutual labels:  config, configuration
theconf
Python Package for Managing Configurations
Stars: ✭ 35 (+133.33%)
Mutual labels:  config, yaml
config
Config component, strictly typed
Stars: ✭ 14 (-6.67%)
Mutual labels:  config, configuration
rails-settings-cached
Global settings for your Rails application.
Stars: ✭ 940 (+6166.67%)
Mutual labels:  config, configuration

Yaask

Make your yaml configurable with interactive configurations!

Requirements

  • Node.js 4.2+
  • npm

Install

npm install yaask -g

Usage

yaask settings-sample.yml -o settings.yml

Before:

# Your yaml file goes here
# These parameters will remain the same:
foo: 1
bar: 2

# Here we ask for the value:
name: # @ask "Your name?"

# The same as above, but with default value:
city: # @ask "City you're from?" (default San Francisco)

# You can select one of the options:
coffee: # @ask "Do you want some coffee?" yes|no

# As many options as you want:
appointment_time: # @ask "Select appointment time" 9am | 11am | 1pm | 3pm | 5pm

# With explanation for each option:
cloud_provider: # @ask "Your cloud provider?" aws (Amazon AWS) | azure (Microsoft Azure) | gloud (Google Cloud)

# Or for some of them:
log_type: # @ask "Select log type" error | warn | info | verbose | none (I don't need any logging)

After:

# Your yaml file goes here
# These parameters will remain the same:
foo: 1
bar: 2

# Here we ask for the value:
name: Roman # @ask "Your name?"

# The same as above, but with default value:
city: San Francisco # @ask "City you're from?" (default San Francisco)

# You can select one of the options:
coffee: no # @ask "Do you want some coffee?" yes|no

# As many options as you want:
appointment_time: 3pm # @ask "Select appointment time" 9am | 11am | 1pm | 3pm | 5pm

# With explanation for each option:
cloud_provider: azure # @ask "Your cloud provider?" aws (Amazon AWS) | azure (Microsoft Azure) | gloud (Google Cloud)

# Or for some of them:
log_type: none # @ask "Select log type" error | warn | info | verbose | none (I don't need any logging)

Formats

There are few formats that can be used after @ask keyword.

Simple

With simple format you'll just ask for input:

"How many cups of coffee do you want?"

Without quotes:

How many cups of coffee do you want?

With colon:

How many cups of coffee do you want:

Yaml file example:

cups: # @ask How many cups of coffee do you want?

Default

Default format allows to specify default value:

"City you're from?" (default San Francisco)

Without quotes:

City you're from? (default San Francisco)

With colon:

City you're from : (default San Francisco)

Without anything:

City you're from (default San Francisco)

Yaml file example (will override value if already specified):

city: # @ask City you're from? (default San Francisco)

List

List format allows to specify the list of options:

"Do you want some coffee?" yes|no

With some spacing:

"Do you want some coffee?" yes | no

With description (description is visible to the user, but value will be used):

"Do you want some coffee?" yes (Yes, please) | no (No, thank you)

With optional description:

"Do you want some coffee?" yes (Yes, please) | no

Without quotes:

Do you want some coffee? yes | no

Without question mark:

Cup size : small | medium | large

Yaml file example:

coffee: # @ask Do you want some coffee? yes (Yes, please) | no (No, thank you)
cup_size: # @ask Cup size : small | medium | large

Why?

I use it to make my Docker containers configurable.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].