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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user