feat: implement role-based configuration system for CLI with automatic API key management

- Add role detection to command groups (admin, client, miner, blockchain)
- Load role-specific config files (~/.aitbc/{role}-config.yaml)
- Add role field to Config class with environment variable support
- Implement automatic role detection from invoked subcommand
- Add development mode API key bypass for testing (APP_ENV=dev)
- Update CLI checklist with role-based configuration documentation
- Add configuration override priority and
This commit is contained in:
oib
2026-03-05 14:02:51 +01:00
parent 83b5152b40
commit c8ee2a3e6e
11 changed files with 216 additions and 21 deletions

View File

@@ -8,9 +8,12 @@ from ..utils import output, error, success
@click.group()
def admin():
@click.pass_context
def admin(ctx):
"""System administration commands"""
pass
# Set role for admin commands
ctx.ensure_object(dict)
ctx.parent.detected_role = 'admin'
@admin.command()