dev_tools/internals/cli
The cli
module is how we create “scripts” that are intended to be run from
the command line.
Types
Functions
pub fn from_result(result: Result(a, Error)) -> Cli(a)
pub fn get_bool(
name: String,
fallback: Bool,
namespace: List(String),
flag: fn(Flags) -> Result(Bool, a),
) -> Cli(Bool)
pub fn get_config() -> Cli(Config)
pub fn get_config_value(
name: String,
fallback: a,
namespace: List(String),
toml: fn(Dict(String, Toml), List(String)) -> Result(a, b),
flag: fn(Flags) -> Result(a, c),
) -> Cli(a)
pub fn get_int(
name: String,
fallback: Int,
namespace: List(String),
flag: fn(Flags) -> Result(Int, a),
) -> Cli(Int)
pub fn get_string(
name: String,
fallback: String,
namespace: List(String),
flag: fn(Flags) -> Result(String, a),
) -> Cli(String)