config
konigle.cli.config
¶
Configuration management for Konigle CLI.
ConfigManager
¶
Manages CLI configuration for multiple projects.
__init__()
¶
Initialize configuration manager.
add_project(name, api_key, base_url=None)
¶
Add a new project configuration.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Project name.
TYPE:
|
api_key
|
API key for the project.
TYPE:
|
base_url
|
Optional base URL for the project.
TYPE:
|
get_active_project()
¶
Get the active project configuration.
| RETURNS | DESCRIPTION |
|---|---|
Optional[Dict[str, str]]
|
Dictionary with api_key and base_url, or None if no active |
Optional[Dict[str, str]]
|
project. |
get_active_project_name()
¶
Get the name of the active project.
| RETURNS | DESCRIPTION |
|---|---|
Optional[str]
|
Name of active project or None. |
list_projects()
¶
List all configured projects.
| RETURNS | DESCRIPTION |
|---|---|
Dict[str, Dict[str, str]]
|
Dictionary mapping project names to their configurations. |
remove_project(name)
¶
Remove a project configuration.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Project name to remove.
TYPE:
|
set_active_project(name)
¶
Set the active project.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Project name to activate.
TYPE:
|