[PATCH 00 of 17 v3] Introduction of kallithea-cli command

Thomas De Schampheleire patrickdepinguin at gmail.com
Thu Oct 18 20:49:23 UTC 2018


This series introduces a kallithea-cli command to replace our custom gearbox
commands.
At the end of this series, the help text will show:


Usage: kallithea-cli [OPTIONS] COMMAND [ARGS]...

  Various commands to set up a Kallithea instance.

Options:
  --help  Show this message and exit.

Commands:
  cache-cleanup-keys  Clean up existing cache keys.
  cache-show-keys     Show existing cache keys with their status.
  celery-run          Start Celery worker(s) for asynchronous tasks.
  config-create       Create a new configuration file.
  db-create           Initialize the database.
  extensions-create   Write template file for extending Kallithea in Python.
  front-end-create    Create the front-end.
  iis-install         Install into IIS using isapi-wsgi.
  index-create        Create or update full text search index
  ishell-run          Interactive shell for Kallithea.
  repo-purge-deleted  Purge backups of deleted repositories.
  repo-scan           Scan filesystem for repositories.
  repo-update-cache   Update repo cache after external modification.



Some notes:
- In v1 and v2, each topic was a separate word in the CLI, e.g. 'repo
  update-cache' rather than 'repo-update-cache'. There were two problems
  with that approach:
  1. to know which commands are available, you'd use 'kallithea-cli --help'
     to discover the topics, then 'kallithea-cli topic --help', and then
     you'd still need another 'kallithea-cli topic command --help' to
     get a list of the actual options.
  2. some command-lines would become quite long, and distinction between
  elements of the command itself, and its arguments, were hard to see. For
  example, to update repository caches:
     kallithea-cli repo update-cache my.ini foorepo barrepo
     vs.
     kallithea-cli repo-update-cache my.ini foorepo barrepo

- We need to find a better place for template.ini.mako which is now the sole
  inhabitant of kallithea/lib/paster_commands/.

Best regards,
Thomas


More information about the kallithea-general mailing list