Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rationalise CLI #929

Open
DiamondJoseph opened this issue Mar 17, 2025 · 0 comments
Open

Rationalise CLI #929

DiamondJoseph opened this issue Mar 17, 2025 · 0 comments

Comments

@DiamondJoseph
Copy link
Contributor

The available CLI commands (mapped below) would benefit from a rationalisation- tiled serve catalog and tiled catalog serve are both allowed, but tiled serve directory does not have an equivalent tiled directory serve- there are two commands seperately maintained for initializing, upgrading and downgrading a database: tiled catalog <database function> and tiled admin <database function>.

flowchart LR
    tiled{tiled} --> login
    tiled --> logout
    tiled --> whoami
    tiled --> tree
    tiled --> register
    tiled --> admin{admin}
    admin --> initialize_db
    admin --> upgrade_db
    admin --> downgrade_db
    admin --> check_config
    admin --> list_principals
    admin --> show_principal
    tiled --> api_key{api_key}
    api_key --> revoke_api_key(revoke)
    api_key --> create_api_key(create)
    api_key --> list_api_keys(list)
    tiled --> profile{profile}
    profile --> paths
    profile --> list_profiles(list)
    profile --> show
    profile --> edit
    profile --> create_profile(create)
    profile --> delete
    profile --> get_default
    profile --> set_default
    profile --> clear_default
    tiled --> serve{serve}
    serve --> directory
    serve --> serve_catalog(catalog)
    serve --> pyobject
    serve --> demo
    serve --> config
    tiled --> catalog{catalog}
    catalog -- serve --> serve_catalog
    catalog --> init_database
    catalog --> upgrade_database
    catalog --> downgrade_database
Loading

proposed new structure:

flowchart LR
    tiled{tiled} --> user{user}
    user --> logout
    user --> login
    user --> whoami
    tiled --> tree
    tiled --> register
    tiled --> check_config
    tiled --> admin{admin}
    admin --> database{database}
    database --> init
    database --> upgrade
    database --> downgrade
    admin --> principal{principal}
    principal --> show_principal(show)
    principal --> list_principal(list)
    admin --> api_key{api_key}
    api_key --> revoke
    api_key --> create_api_key(create)
    api_key --> list
    tiled --> profile{profiles}
    profile --> paths
    profile --> show
    profile --> list_profiles(list)
    profile --> edit
    profile --> create_profile(create)
    profile --> delete
    profile --> default{default}
    default --> get
    default --> set
    default --> clear
    tiled --> serve{serve}
    serve --> demo
    serve --> directory
    serve --> catalog
    serve --> pyobject
    serve --> config
Loading

This removes the duplicate route for tiled catalog serve in favour of consistency. Moves commands generally but especially within the admin namespace to be more hierarchical.

Each node can then have a help string attached to it for the commands directly underneath it while remaining fairly wieldy (ant. unwieldy).

@DiamondJoseph DiamondJoseph mentioned this issue Mar 17, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant