Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@beauraines/toggl-cli

beauraines207MIT2.5.7

CLI client for Toggl Time Tracker

toggl, cli, time, tracking

readme

toggl-cli-node

All Contributors

UPDATED TO USE Toggl v9 API

A command line interface for toggl written in node, based on the python TogglCli project. Attempting to use similar syntax.

This was made possible because saintedlama had already built a node API for toggl.

Configuration

Configuration File

You can create the .toggl-cli.json in your home directory manually using the template below or with the toggl create-config command. The values can be found in your Toggl profile and from the URL for your account settings. The current workspace id is https://track.toggl.com/${workspace_id}}/settings/general. Don't forget to change the permissions chmod 600 so that only you can read/write the configuration file as it has your API token.

{
  "api_token": "",
  "default_workspace_id": "",
  "timezone": "",
  "default_project_id": ""
}

Environment Variables

Configure your environment, with environment variables or a .env file in the project root. Environment variables will take precedence over a config file.

  1. TOGGL_API_TOKEN (required)
  2. TOGGL_DEFAULT_WORKSPACE_ID (required)
  3. TOGGL_DEFAULT_PROJECT_ID (optional)
  4. TOGGL_TIMEZONE=America/Los_Angeles (defaults to America/New_York)

Features

Feature Available Comments
Start time entry
Start time entry with description
Start time entry with project
stop time entry
Continue named time entry
Report today by project
Report this week by project by day
Edit current time entry
Use config from file
Save config to file
Refactor: Display and format modules |
Client: reset PAT | Is this really necessary?
Client: specify client name
Colorize output
Better table output
List recent time entries
Command line completion #6
Delete time entry by id Contributed by @benthayer #160
Edit other time entries than the current |
Display earlier time entries |
Add a completed time entry with start and end times Contributed by @benthayer #165
Overlap detection on editing or adding entries | Issue #134

Planned Limitations

There are several features that I do not use from Toggl, so including them is a priority for me. I'm not opposed to them being in there and would welcome contributions to include them.

  1. tags
  2. multiple workspaces
  3. billable

How to Contribute

I need to clean up and refactor the code and establish a few more helper and utility functions, but I'm open to contributions!

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Ben Thayer
Ben Thayer

💻
Christoph Walcher
Christoph Walcher

🔧 📆

This project follows the all-contributors specification. Contributions of any kind welcome!

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

2.5.7 (2025-02-17)

2.5.6 (2025-01-12)

2.5.5 (2024-12-30)

2.5.4 (2024-12-15)

Bug Fixes

  • deps: bump debug from 4.3.7 to 4.4.0 (#207) (1e8bb9a)

2.5.3 (2024-12-07)

2.5.2 (2024-12-07)

Bug Fixes

  • deps: bump dotenv from 16.4.5 to 16.4.7 (#206) (1dce79b)

2.5.1 (2024-11-29)

2.5.0 (2024-11-25)

Features

  • add time entry command will use default project if none provided (#204) (82b32d4)

2.4.5 (2024-11-13)

2.4.4 (2024-10-25)

2.4.3 (2024-10-13)

2.4.2 (2024-10-06)

2.4.1 (2024-09-28)

2.4.0 (2024-09-23)

Features

  • error handling when removing non-existent time entry (#196) (5506de2), closes #195
  • short alias for description on start command (#197) (c01bf27)

Bug Fixes

  • deps: bump debug from 4.3.6 to 4.3.7 (#192) (2aa2cb8)

2.3.15 (2024-09-05)

2.3.14 (2024-08-30)

2.3.13 (2024-08-23)

Bug Fixes

  • deps: bump dayjs from 1.11.12 to 1.11.13 (#188) (4b76670)

2.3.12 (2024-08-16)

2.3.11 (2024-08-16)

Bug Fixes

  • deps: bump debug from 4.3.5 to 4.3.6 (#184) (1273e5a)

2.3.10 (2024-08-08)

2.3.9 (2024-07-23)

Bug Fixes

  • deps: bump dayjs from 1.11.11 to 1.11.12 (#182) (5e81f91)

2.3.8 (2024-07-21)

2.3.7 (2024-07-06)

2.3.6 (2024-07-01)

2.3.5 (2024-06-22)

2.3.4 (2024-06-22)

2.3.3 (2024-06-21)

2.3.2 (2024-06-20)

Bug Fixes

  • deps: bump debug from 4.3.4 to 4.3.5 (6a6a62f)

2.3.1 (2024-05-25)

Bug Fixes

  • missed required start/end option on add command (5b1ca68)

2.3.0 (2024-05-25)

Features

  • Add time entry, include start with create (#165) (d73f181)

2.2.1 (2024-05-17)

Bug Fixes

  • deps: bump cli-table3 from 0.6.4 to 0.6.5 (#163) (1cac277)

2.2.0 (2024-05-15)

Features

2.1.8 (2024-05-07)

Bug Fixes

  • deps: bump dayjs from 1.11.10 to 1.11.11 (#157) (dbe0dde)

2.1.7 (2024-04-14)

Bug Fixes

  • deps: bump cli-table3 from 0.6.3 to 0.6.4 (#151) (8aa717e)

2.1.6 (2024-02-26)

Bug Fixes

  • deps: bump dotenv from 16.4.4 to 16.4.5 (#147) (f34e000)

2.1.5 (2024-02-19)

Bug Fixes

  • deps: bump dotenv from 16.4.1 to 16.4.4 (#145) (e0342e3)

2.1.4 (2024-01-27)

Bug Fixes

  • deps: bump dotenv from 16.3.1 to 16.4.1 (dd44c58)

2.1.3 (2024-01-15)

Bug Fixes

  • weekly report: fixes weekly report heading when there is no data (#142) (7514fd3)

2.1.2 (2024-01-12)

Bug Fixes

  • weekly report: Fixes spacing in header row values (41f421a)

2.1.1 (2024-01-04)

Bug Fixes

  • Improves handling of time entries with out a description (#136) (888248d), closes #135

2.1.0 (2023-10-17)

Features

  • ls: - improves ls display for running events (554ed05), closes #92

2.0.3 (2023-10-16)

2.0.2 (2023-10-16)

Bug Fixes

  • ls: makes ls command search case insensitive (a6c35d9), closes #93

2.0.1 (2023-09-22)

Bug Fixes

  • deps: bump dayjs from 1.11.9 to 1.11.10 (f4f2d6f)

2.0.0 (2023-07-08)

⚠ BREAKING CHANGES

  • ready for version 1.0.0 Reads configuration (API token, timezone, default workspace and projects) from .toggl-cli.json from the users home. Adds a command to create the configuration file.

Features

0.10.22 (2023-07-08)

Features

Bug Fixes

  • edit: updates duration when editing a running entry (60a6d47)
  • utils: properly handles null time in displayTimeEntry (0476db0)

0.10.21 (2023-07-08)

Features

  • ls: adds details to time entry listing (7ad05c7), closes #72

0.10.20 (2023-07-08)

0.10.19 (2023-07-08)

Features

  • weekly report: Add weekly report options (73bb7fe), closes #44

Bug Fixes

  • deps: bump dayjs from 1.11.7 to 1.11.8 (2b47fde)
  • deps: bump dotenv from 16.1.3 to 16.1.4 (14eaefa)
  • deps: bump dotenv from 16.1.4 to 16.3.1 (#83) (6511956)

0.10.18 (2023-06-03)

Bug Fixes

  • deps: bump dotenv from 16.0.3 to 16.1.3 (5aba3a8)

0.10.17 (2023-04-29)

Bug Fixes

  • deps: bump yargs from 17.7.1 to 17.7.2 (be029e7)

0.10.16 (2023-04-08)

Bug Fixes

  • weekly report: handles entries without project (4668dbe), closes #63

0.10.15 (2023-04-07)

Bug Fixes

  • deps: bump toggl-client from 3.2.0 to 3.3.0 (#65) (020de32)

0.10.14 (2023-04-01)

Features

  • adds color to current time entry (ec660a7)

0.10.13 (2023-04-01)

Features

0.10.12 (2023-03-23)

0.10.11 (2023-03-19)

Features

0.10.10 (2023-03-16)

Features

0.10.9 (2023-03-13)

Features

0.10.8 (2023-03-13)

Features

  • today report: improves output (0025d4a)
  • weekly report: improves table output format (4e58b1a)

Bug Fixes

0.10.7 (2023-03-12)

Features

  • updates app name sent with API requests (9cf9a2b)

Bug Fixes

0.10.6 (2023-03-12)

Bug Fixes

  • update git links in npm registry (b9e1a9e)

0.10.5 (2023-03-04)

Bug Fixes

  • makes weekly report work in v9 API (#42) (5de62c8)

0.10.4 (2023-03-02)

Bug Fixes

0.10.3 (2023-03-02)

Bug Fixes

  • converts project id, workspace id to number (8cefe8c), closes #38

0.10.2 (2023-02-28)

Features

0.10.1 (2023-02-28)

Features