# @jaebradley/wakatime-cli

> CLI for the Wakatime Service

Latest version **1.4.9** (published 2020-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jaebradley/wakatime-cli
pnpm add @jaebradley/wakatime-cli
yarn add @jaebradley/wakatime-cli
bun add @jaebradley/wakatime-cli
```

Provides the command `waka`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.9 |
| Published | 2020-08-05 |
| First published | 2018-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 10 |
| Unpacked size | 29.4 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 21 |
| Maintainers | jaebradley |
| Keywords | wakatime, waka time, cli |

## Links

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

## Dependencies (10)

- [ajv](https://npm.io/package/ajv.md) ^6.12.3
- [axios](https://npm.io/package/axios.md) ^0.19.2
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [luxon](https://npm.io/package/luxon.md) ^1.24.1
- [keytar](https://npm.io/package/keytar.md) ^6.0.1
- [inquirer](https://npm.io/package/inquirer.md) ^7.3.2
- [commander](https://npm.io/package/commander.md) ^5.1.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.10.5
- [bar-horizontal](https://npm.io/package/bar-horizontal.md) ^0.5.0
- [wakatime-client](https://npm.io/package/wakatime-client.md) ^2.6.0

## 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.4.9 (latest) — 2020-08-05
- 1.4.8 — 2020-08-03
- 1.4.7 — 2020-08-03
- 1.4.6 — 2020-07-11
- 1.4.5 — 2020-06-17
- 1.4.4 — 2020-02-26
- 1.4.3 — 2020-02-04
- 1.4.2 — 2019-10-02
- 1.4.1 — 2019-09-28
- 1.4.0 — 2019-04-08
- 1.3.0 — 2019-03-16
- 1.2.0 — 2019-03-16
- 1.1.6 — 2019-02-21
- 1.1.5 — 2018-07-02
- 1.1.4 — 2018-06-13
- … 6 more at https://npm.io/package/@jaebradley/wakatime-cli/versions

## README

![Wakatime CLI](https://github.com/jaebradley/wakatime-cli/workflows/Wakatime%20CLI/badge.svg)
[![npm](https://img.shields.io/npm/v/@jaebradley/wakatime-cli.svg)](https://www.npmjs.com/package/@jaebradley/wakatime-cli)
[![npm](https://img.shields.io/npm/dt/@jaebradley/wakatime-cli.svg)](https://www.npmjs.com/package/@jaebradley/wakatime-cli)

# wakatime-cli

- [wakatime-cli](#wakatime-cli)
  - [Introduction](#introduction)
  - [Installation](#installation)
  - [Usage](#usage)
    - [Setup](#setup)
    - [Summary Options](#summary-options)
    - [Section Filters](#section-filters)
    - [Section Options](#section-options)
    - [Today's Summary](#todays-summary)
    - [Footnotes](#footnotes)

## Introduction

![waka-flocka-flame](https://media.giphy.com/media/4FRN8FpBdaJYA/giphy.gif)<sup>[1](#waka-flocka-flame-footnote)</sup>

As a mega-nerd (proven by my use of the term, "mega-nerd"), I am a big fan of [the `WakaTime` service](https://wakatime.com) for tracking my coding.

But I think it'd be pretty damn cool if I could see some of my stats in the `Terminal` via a CLI.

![alt-text](https://imgur.com/nfJ4clj.png)

## Installation

```bash
npm install @jaebradley/wakatime-cli -g
```

## Usage

### Setup

```bash
waka setup
```

![setup](https://imgur.com/ygTGX4u.png)

The `wakatimecli` uses [the `WakaTime` API](https://wakatime.com/developers) to get data. One of the easiest ways to authenticate requests is by using your `WakaTime` API key, which can be retrieved by going to your `WakaTime` user profile.

Then, use the `waka setup` command to set your API key for the `wakatimecli` project, which will store your key using [`node-keytar`](https://github.com/atom/node-keytar) (so in `Keychain` on OSX, for example).

### Summary Options

### Section Filters

There are a couple notable command line options for filtering summary data.

However, filtering only impacts the summary data for the given section. So filtering by a particular project name will only change the output data for the `Projects` section and won't impact the `Editors` or `Languages` section.

This is primarily due to the output from the Wakatime `/summaries` endpoint which doesn't return linked data across editors, projects, and languages.

- `-e <Some Editors Filter>` - filters the editors in the `Editors` section
  - Supports regex, so `-e /vs co.*/i`, for example (which would match `VS Code`)
- `-l <Some Languages Filter>` - filters the languages in the `Languages` section
  - Supports regex, so `-l /java.*/i`, for example (which would match `Java` and `JavaScript`)
- `-p <Some Projects Filter>` - filters the projects in the `Projects` section
  - Supports regex, so `-p /waka.*/i`, for example (which would match `wakatime-cli` and `wakatime-client`)

### Section Options

You might want to restrict the sections that are outputted (if you want to _only_ see your language statistics, for example).

Here are the following ways to toggle specific sections. If no options are specified, **all sections** will be displayed.

- `-E` - show the `Editors` section
- `-L` - show the `Languages` section
- `-P` - show the `Projects` section

If data is not available for a given section, it will _not_ be displayed even if that option was specified.

### Today's Summary

```bash
waka today
```

![alt-text](https://imgur.com/nfJ4clj.png)

Outputs the summary stats (total time recorded, editors, languages, and projects) for the current day using [the `summaries` API](https://wakatime.com/developers#summaries).

```bash
waka yesterday
```

Like [`Today's Summary`](#todays-summary) but, like, the day before.

### Footnotes

<a name="waka-flocka-flame-footnote"><sup>1</sup></a> Get it? Cause that's [Waka Flocka Flame](https://en.wikipedia.org/wiki/Waka_Flocka_Flame) and I like bad jokes. You get it.

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