Skip to content

Clean up admin CLI commands to simplify url parameter passing #122

Description

@allenporter

Currently, the admin CLI commands in supernote/cli/admin.py pass the url parameter around through several function calls (e.g., list_users_async, add_user_async, reset_password_async, queue_status_async, etc.) to support the global --url override flag.

This leads to unnecessary boilerplate and verbose function signatures. We should clean this up and simplify the codebase, perhaps by:

  1. Managing the active URL context globally or storing it in a config/session context.
  2. Modifying the create_session context manager / load_cached_auth helper to automatically retrieve the active override URL from the argparse execution context so subcommands don't need to explicitly accept and pass the url parameter down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions