Command line interface¶
A command line interface (CLI) is available to manage database, OAuth2 tokens and users.
$ ftcli
Usage: ftcli [OPTIONS] COMMAND [ARGS]...
  FitTrackee Command Line Interface
Options:
  --help  Show this message and exit.
Commands:
  db      Manage database.
  oauth2  Manage OAuth2 tokens.
  users   Manage users.
Warning
fittrackee_set_adminfittrackee_upgrade_dbfittrackee_worker (disabled)Database¶
ftcli db drop¶
New in version 0.6.5.
Empty database and delete uploaded files, only on development environments.
ftcli db upgrade¶
New in version 0.6.5.
Apply migrations.
OAuth2¶
ftcli oauth2 clean¶
New in version 0.7.0.
Remove tokens expired for more than provided number of days
Options  | 
Description  | 
|---|---|
  | 
Number of days.  | 
Users¶
ftcli users clean_archives¶
New in version 0.7.13.
Delete export requests and related archives created more than provided number of days.
Options  | 
Description  | 
|---|---|
  | 
Number of days.  | 
ftcli users clean_tokens¶
New in version 0.7.0.
Remove blacklisted tokens expired for more than provided number of days.
Options  | 
Description  | 
|---|---|
  | 
Number of days.  | 
ftcli users create¶
New in version 0.7.15.
Create a user account.
Note
the newly created account is already active.
the CLI allows to create users when registration is disabled.
Arguments/options  | 
Description  | 
|---|---|
  | 
Username.  | 
  | 
User email (mandatory).  | 
  | 
User password (if not provided, a random password is generated).  | 
ftcli users export_archives¶
New in version 0.7.13.
Process incomplete user export requests. Can be used if redis is not set (no dramatiq workers running).
Options  | 
Description  | 
|---|---|
  | 
Maximum number of export requests to process.  | 
ftcli users update¶
New in version 0.6.5.
Modify a user account (admin rights, active status, email and password).
Arguments/options  | 
Description  | 
|---|---|
  | 
Username.  | 
  | 
Add/remove admin rights (when adding admin rights, it also activates user account if not active).  | 
  | 
Activate user account.  | 
  | 
Reset user password (a new password will be displayed).  | 
  | 
Update user email.  |