hrpg - hrpg - Command line interface to HabitRPG


version 0.30



    hrpg status                           : Show current HP/XP/GP
    hrpg tasks [search]                   : Show current tasks
    hrpg habit|daily|reward|todo [search] : Show tasks of current type
    hrpg new                              : Create new task 'hrpg new' for help.
    hrpg [+-][num] [task]                 : Increment/decrement a task or habit
    hrpg history [task]                   : Show the history of a task
    hrpg clear daily                      : Uncheck all daily tasks

    Debugging commands:
    hrpg version                          : Show version information
    hrpg show [task]                      : Show detailed info about a task
    hrpg dump                             : Dump entire user info
    hrpg dump tasks                       : Dump task info


This is a command-line client for the HabitRPG service. Use hrpg with no arguments for help.

When using the + and - commands, any unique shortening of a task name can be used. When using history and show, all tasks matching the name specified will be displayed.

The --beta switch may be provided as a first argument to use the beta API server. The --dev switch may be used to use http://localhost:3000/api/v1 as the server.



If you have not already installed this software, the easiest way is to use cpanm and local::lib. If you don't have them installed, it's easy with:

    curl -L | perl - --self-upgrade
    ~/perl5/bin/cpanm -L ~/perl5 App::local::lib::helper
    source ~/perl5/bin/localenv-bashrc

You might want to put that last line in your ~/.bashrc file.

You can then install hrpg and related utilities with:

    cpanm WebService::HabitRPG


Create a .habitrpgrc file in your home directory. Place in it the following lines:

    user_id   = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    api_token = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Replace the long strings of 'x's with the values you obtain by going to Settings - API> in the HabitRPG web interface.

You may also have an [auth-dev] and/or [auth-beta] section, if you use a development or beta server and have different credentials there. Most users will never need this.

On some systems, the default-behaviour of using keep-alives (which normally improve performance) causes troubles. You can disable keep-alives by adding the following to your .habitrpgrc:

    keep_alive = 0


These features are considered experimental, and may change in the future.


As there is no API for tags yet, you need to include them in your configuration file if you wish to be able to use them. The syntax is:

    study = 96681445-0e8a-43f7-85ac-9b7f1cb130ee
    home  = 1b832ec1-a87c-4c11-9b54-e1c24c27313f
    qs    = 63bc4f62-aaa4-4207-887b-95254bcbcfff

To find out the uuid of a tag, use `hrpg show` on a task having that tag, and examine the resulting data structure. Once the upstream tag API is finished, this process will be obsolete.

Tags can be used in any search by prefixing them with the tag prefix character, which defaults to caret (^). For example:

    hrpg daily ^work      # Show daily tasks tagged with 'work'
    hrpg tasks ^code      # Show all tasks tagged with 'code'

If you don't like the tag prefix character, you can change it in your configuration file. Simply add:

    tag_prefix = @

This might be handy if you tend to use location tags. You could write: hrpg daily @home and hrpg daily @work to show daily tasks with the home and work tags respectively.


If you have WebService::Idonethis installed, then you can add items to your done-list at the same time as you complete habits. This is done by adding an extra argument to the + or - calls to hrpg:

    hrpg + bugfix   "Recalibrated the flux capacitor."
    hrpg - junkfood "Won the local doughnut eating competition."

This integration is extraordinarily simple for now. We simply call out to the idone command-line tool with all additional arugments given. If you're an idone power user, this means you can use switches like -l.

If WebService::Idonethis is not installed, any additional arguments to habit reporting are ignored.


Additional arguments after the value to hrpg new are considered to be custom arguments that are sent to the API. These must be key/value pairs, which are encoded into JSON and passed directly as-is, without any sanity checking. These can allow tasks to be created that may hook into new features on the server, or which contain additional information which is not used by the main HabitRPG servers.


If the HRPG_API_BASE environment variable is set, it will be used as the API base URL. This may be useful in testing, or when working with other servers.


I'm sure there are plenty! Please view and/or record them at .




Paul Fenwick <>


This software is copyright (c) 2013 by Paul Fenwick.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.