Skip to content

register_commands() plugin hook to register extra CLI commands #1449

@simonw

Description

@simonw

The datasette CLI tool currently has 7 subcommands: serve, inspect, install, package, plugins, publish and uninstall.

A plugin hook could allow plugins to register extra subcommands.

I've avoided this for quite a while because I didn't have good use-cases for it - but the existence of the datasette install xxx command for installing packages into the correct virtual environment means that actually there's a good reason to do this: it would allow plugins to provide additional command-line mechanisms without the user having to understand how virtual environments work in order to install those commands into the same environment as the rest of Datasette.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions