tempo-planned-time v1.1.3
Tempo Planned Time CLI
This is a simple CLI program for fetching and displaying planned time from the Tempo REST API, and displaying it in a table format. Why? Because the browser tab is too many damn clicks away.
Installation
Install using npm or yarn:
# NPM
npm install -g tempo-planned-time
# Or Yarn
yarn global add tempo-planned-time
# Start using it!
tempo-planned-time
To install from source:
git clone git@github.com:sdunham/tempo-planned-time-cli.git
cd tempo-planned-time-cli
npm install
# Optionally expose the program globally
npm link
# If you ran npm link, commands can be run as specified in the usage docs below
# Otherwise, commands can be run using node:
node bin/cli.js get
Usage
In order to use this program, you need to configure a minimum of 2 options:
1. accountId
– A Jira accountId. Can be found at {jiraBaseUrl}/rest/api/3/myself (must be logged in).
2. accessToken
– A Tempo REST API access token associated with the above accountId. Can be generated by going to Tempo > Settings and selecting API integration.
A third optional value (jiraBaseUrl
) can be configured to specify the base URL of the Jira instance the user's planned time is associated with. This is primarily used for display purposes.
Once you have obtained these values, use the config
command to store them for future use:
# Set your accountId and accessToken so you can access the Tempo API
tempo-planned-time config --account {your-account-id-here} --token {your-access-token-here}
# Optionally set your jiraBaseUrl (used for display purposes when outputting plan data)
# The default value is https://sitecrafting.atlassian.net/, as this is primarily a tool for SiteCrafting developers
tempo-planned-time config --url https://mycompany.atlassian.net
Once your accountId
and accessToken
have been set, you're ready to pull planned time:
# Pull today's planned time
tempo-planned-time get
# Pull planned time for a specific range of days
# Expected date format is YYYY-MM-DD, and a maximum range of 14 days can be specified
tempo-planned-time get --from 2020-01-01 --to 2020-01-14
# Pull tomorrow's planned time
tempo-planned-time get --tomorrow
# Pull planned time for the next 7 days (including today)
tempo-planned-time get --week