Package: hopla-cli
Hoplahopla - a command line interface (CLI) forhabitica.comHopla is a XDG-compliant CLI which usespython3to interact with
theHabitica API.Hopla is currently under active development so new features are added rapidly.How to Use HoplaInstallationHopla can be installed by running the following command:python3-mpipinstall--userhopla-cliFirst Time UsageHopla needs yourUser IdandAPI Tokento connect to Habitica.
You can find these over athttps://habitica.com/user/settings/api.Run the following command to configure this automatically:$hoplaauthenticatePleaseenteryourcredentials.
Youcanfindthemoverat<https://habitica.com/user/settings/api>.
Theyhavethefollowingformat:'c0ffee69-dada-feed-abb1-5ca1ab1ed004'.
Theuseridcanbefoundunder'User ID'.
PleasepasteyouruserIDhere(pressCtrl-Ctoabort):c0ffee69-dada-feed-abb1-5ca1ab1ed004
PleasepasteyouruserAPITokenhere(inputremainshidden):This will create a credentials file at~/.config/hopla/authenticate.confthat Hopla uses.
If you want to use a different file, you can set the${HOPLA_AUTH_FILE}environment
variable to choose your own file.AutocompletionIf you want bash autocompletion, you can run the following command:$hoplacompletebash--enable
enabledautocompletion
restartbashtomakeuseofitTo make use of the autocompletion you need to reload your bashrc.
You can do this by either opening up a new terminal window, or
runningbashagain, or runningsource ~/.bashrc.To print the autocomplete code for bash|zsh|fish, so that you can install
it yourself, optionally run:# optionally, install the autocomplete code yourself:hoplacompletebash
hoplacompletezsh
hoplacompletefishEveryday UsageAfter installation, you can usehopla.
The supported commands can be found by running:$hopla--help
Usage:hopla[OPTIONS]COMMAND[ARGS]...hopla-acommandlineinterface(CLI)tointeractwithhabitica.com

Options:--versionShowtheversionandexit.-h,--helpShowthismessageandexit.

Commands:addGROUPforaddingthingstoHabitica.apiGROUPforrequestingHabiticaAPImetadata.authenticateAuthorizeyourselftoaccesstheHabitica.comAPI.buyGROUPtobuythings.completePrintorenableshellautocompletion.# etceteraMore functionality is currently being implemented.
Hopla is open-source.
Pull request, feature requests, and issues are welcomed athttps://github.com/melvio/hopla.
If you want to contribute, but don't know where to start, you might want to look at.github/CONTRIBUTING.mdand the./developersfolder.Environment Variables for Hopla's optionsUse case: You can use environment variables to set default values for all Hopla options.Hopla automatically recognizes environment variables starting withHOPLA_.
All option (such as--difficultyforhopla add todoand--timesforhopla feed) can be
set in this manner.To get the right environment variable name, use this logic:Define an environment variable starting withHOPLA_Append the subcommand to the environment variable as follows:hopla add todo->HOPLA_ADD_TODO_hopla support-development->HOPLA_SUPPORT_DEVELOPMENT_hopla feed->HOPLA_FEED_Append the option name that you want to set as follows:hopla add todo --difficulty->HOPLA_ADD_TODO_DIFFICULTYhopla support-development --gems->HOPLA_SUPPORT_DEVELOPMENT_GEMShopla feed --times->HOPLA_FEED_TIMESFor example:HOPLA_ADD_TODO_DIFFICULTY=hardhoplaaddtodo"Hello"HOPLA_SUPPORT_DEVELOPMENT_GEMS=8hoplasupport-developmentHOPLA_FEED_AMOUNT=3hoplafeedWolf-ShadeChocolateOther examples:# add a To-Do for todayHOPLA_ADD_TODO_DUE_DATE=todayhoplaaddtodo"Task with Deadline from today"# automatically enable autocomplete for bashHOPLA_COMPLETE_ENABLE=truehoplacompletebashHOPLA_COMPLETE_ENABLE=yeshoplacompletebashHOPLA_COMPLETE_ENABLE=1hoplacompletebash# only print autocomplete for bashHOPLA_COMPLETE_ENABLE=0hoplacompletebashHOPLA_COMPLETE_ENABLE=falsehoplacompletebashHOPLA_COMPLETE_ENABLE=nohoplacompletebashBackgroundHopla is a XDG-compliant bash-based command line interface (CLI).
It was created because no other CLI supported the creation of To-Dos with both a
due date and a checklist.
Hopla provides the following command to create these with the following command:# Add a hard To-Do. Every line in the specified file will being added as#  an item of this To-Do's checklist.hoplaaddtodo--difficultyhard\--due-date2027-12-07\--checklist./my_todo.txt\"my todo name here"The most simple way to add a To-Do would be to runhopla add todowithout arguments.
Hopla will then prompt you for a To-Do name:$hoplaaddtodo
Pleaseprovideanameforyourtodo:Feedthedog