f_cli.context module

Context object.

class f_cli.context.Context[source]

Bases: object

f-cli context object.

__init__(*, console: Console | None = None) None[source]

Instantiate class.

property config_dir: Path

Configuration directory.

Upon first access, the directory and it’s parents are created if they do not exist.

property sys: SystemInfo

System information.

f_cli.context.GLOBAL_CTX = <f_cli.context.Context object>

Global context object.

The CLI needs a global context object that can be accessed outside of commands to generate some commands. Adding it to f_lib.type_defs.ClickContext is done for convenience.