# @studiometa/cli-timer

> A time tracking CLI connected to Tempo

Latest version **1.0.0-beta.4** (published 2021-04-21) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @studiometa/cli-timer
pnpm add @studiometa/cli-timer
yarn add @studiometa/cli-timer
bun add @studiometa/cli-timer
```

Provides the command `timer`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.4 |
| Published | 2021-04-21 |
| First published | 2020-09-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 10 |
| Unpacked size | 27.9 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | Studio Meta |
| Maintainers | jeremiewerner |
| Keywords | timer, tempo, jira, cli |

## Links

- npm: https://www.npmjs.com/package/@studiometa/cli-timer
- Repository: https://github.com/studiometa/timer
- Homepage: https://github.com/studiometa/timer#readme
- Issues: https://github.com/studiometa/timer/issues
- npm.io page: https://npm.io/package/@studiometa/cli-timer

## Dependencies (10)

- [cac](https://npm.io/package/cac.md) ^6.6.1
- [conf](https://npm.io/package/conf.md) ^9.0.2
- [axios](https://npm.io/package/axios.md) ^0.20.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [nanoid](https://npm.io/package/nanoid.md) ^3.1.12
- [date-fns](https://npm.io/package/date-fns.md) ^2.16.1
- [inquirer](https://npm.io/package/inquirer.md) ^7.3.3
- [timestring](https://npm.io/package/timestring.md) ^6.0.0
- [chrono-node](https://npm.io/package/chrono-node.md) ^2.1.8

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.0-beta.4 (latest) — 2021-04-21
- 1.0.0-beta.3 — 2021-04-21
- 1.0.0-beta.2 — 2021-04-19
- 1.0.0-beta.1 — 2021-04-19
- 1.0.0-beta.0 — 2021-03-23
- 1.0.0-alpha.8 — 2020-09-23
- 1.0.0-alpha.7 — 2020-09-22
- 1.0.0-alpha.6 — 2020-09-14
- 1.0.0-alpha.5 — 2020-09-11
- 1.0.0-alpha.4 — 2020-09-11
- 1.0.0-alpha.3 — 2020-09-11
- 1.0.0-alpha.2 — 2020-09-11
- 1.0.0-alpha.1 — 2020-09-11
- 1.0.0-alpha.0 — 2020-09-11

## README

# CLI Timer

> A simple CLI tool to track your time when working on Jira issues, synchronized with Tempo.

## Installation

Install it globally with NPM:

```bash
$ npm install -g @studiometa/cli-timer
```

> The package is currently private, you will need an NPM token to be able to install it. Ask [Titouan](mailto:titouan@studiometa.fr) to generate one for you and add it to your `.zshrc` file: `export NPM_TOKEN='...'`.

Then configure the CLI with the `config` command:

```bash
# With the prompt
$ timer config

# Without the prompt
$ timer config \
  --username '<JIRA_USERNAME>' \
  --token '<JIRA_TOKEN>' \
  --org '<JIRA_ORG>' \
  --account-id '<JIRA_ACCOUNT_ID>' \
  --tempo-token '<TEMPO_TOKEN>' \
  --no-prompt
```

To configure the CLI, you will need the following informations:

- You **Jira username**, usually your email address
- Your **Jira organization name**, `ORG_NAME` in `https://ORG_NAME.atlassian.net`
- A **Jira API token**, create one at [`https://id.atlassian.com/manage-profile/security/api-tokens`](https://id.atlassian.com/manage-profile/security/api-tokens)
- Your **Jira account ID**, find it when accessing your profile in Jira: `https://ORG_NAME.atlassian.net/jira/people/ACCOUNT_ID`
- A **Tempo API token**, create one at `https://ORG_NAME.atlassian.net/plugins/servlet/ac/io.tempo.jira/tempo-app#!/configuration/api-integration`

## Usage

```bash
# Start a timer
$ timer start DESK-1234 --message 'Working on something'
# or
$ timer start DESK-1234 -m 'Working on something'

# Check on a timer status
$ timer check
[DESK-1234] Working on something (2 minutes)

# Stop a timer and synchronize it in Tempo
$ timer stop --sync
# or
$ timer stop -s

# Display worklogs for yesterday
$ timer log yesterday

# Display worklogs for a given week
$ timer log Sep7-11

# Display help
$ timer --help
```

### Display the current timer in your macOS menu bar

You can install [Bitbar](https://github.com/matryer/bitbar) and create a [custom plugin](https://github.com/matryer/bitbar#writing-plugins) to trigger the `timer check` command and display your current timer in your menu bar.

---
_Source: https://npm.io/package/@studiometa/cli-timer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
