{"id":43921478,"url":"https://github.com/davidosomething/grunt-toggl","last_synced_at":"2026-02-06T22:33:31.285Z","repository":{"id":16509533,"uuid":"19262519","full_name":"davidosomething/grunt-toggl","owner":"davidosomething","description":"Toggl API for Grunt. E.g. start time tracking with `grunt watch` or `grunt toggl`","archived":false,"fork":false,"pushed_at":"2016-02-22T05:24:33.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-18T04:15:53.513Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidosomething.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-29T03:31:25.000Z","updated_at":"2022-09-29T05:08:45.000Z","dependencies_parsed_at":"2022-07-10T06:16:11.809Z","dependency_job_id":null,"html_url":"https://github.com/davidosomething/grunt-toggl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidosomething/grunt-toggl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidosomething%2Fgrunt-toggl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidosomething%2Fgrunt-toggl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidosomething%2Fgrunt-toggl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidosomething%2Fgrunt-toggl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidosomething","download_url":"https://codeload.github.com/davidosomething/grunt-toggl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidosomething%2Fgrunt-toggl/sbom","scorecard":{"id":327419,"data":{"date":"2025-08-11","repo":{"name":"github.com/davidosomething/grunt-toggl","commit":"f2ee20d764bd12c877f0d0f3379cf1eae32f01ad"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 2/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-MIT:0","Info: FSF or OSI recognized license: MIT License: LICENSE-MIT:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T02:48:20.580Z","repository_id":16509533,"created_at":"2025-08-18T02:48:20.580Z","updated_at":"2025-08-18T02:48:20.580Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29179420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T22:12:24.066Z","status":"ssl_error","status_checked_at":"2026-02-06T22:12:09.859Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-06T22:33:30.666Z","updated_at":"2026-02-06T22:33:31.280Z","avatar_url":"https://github.com/davidosomething.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://davidosomething.com/assets/img/posts/grunt-toggl-logo.png\" alt=\"grunt-toggl Logo\" valign=\"middle\" style=\"width: 2em; margin: 0 0.2em 0.2em 0;\"\u003e grunt-toggl\n\n\u003e Toggl API for Grunt. E.g. start time tracking with `grunt watch` or\n\u003e `grunt toggl`\n\n[![Upstream](http://img.shields.io/badge/upstream-GitHub-lightgrey.svg)](https://github.com/davidosomething/grunt-toggl)\n[![Build Status: Linux](https://travis-ci.org/davidosomething/grunt-toggl.png?branch=master)](https://travis-ci.org/davidosomething/grunt-toggl)\n[![dependencies](https://david-dm.org/davidosomething/grunt-toggl.png)](https://david-dm.org/davidosomething/grunt-toggl)\n[![NPM version](https://badge.fury.io/js/grunt-toggl.svg)](http://badge.fury.io/js/grunt-toggl)\n\u003cbr\u003e[![npm Badge](https://nodei.co/npm/grunt-toggl.png?compact=true)](http://npmjs.org/package/grunt-toggl)\n\n\n## Demo\n\n![Demo of starting a timer from the command line](https://davidosomething.com/assets/img/posts/grunt-toggl.gif)\n\n## Getting Started\n\nThis plugin requires Grunt `\u003e=0.4.4`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out\nthe [Getting Started](http://gruntjs.com/getting-started) guide, as it explains\nhow to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as\ninstall and use Grunt plugins. Once you're familiar with that process, you may\ninstall this plugin with this command:\n\n```shell\nnpm install grunt-toggl --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile\nwith this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-toggl');\n```\n\n## The \"toggl\" task\n\n### Overview\n\nIn your project's Gruntfile, add a section named `toggl` to the data object\npassed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  toggl: {\n    options: {\n      apiKey: '',\n      settingsFile: 'toggl.json'\n      workspace:    null,\n      project:      null,\n      data: {\n        description: '\u003c%= pkg.name %\u003e',\n      }\n    }\n  },\n});\n```\n\n### Options\n\nYour Toggl API key is required for this task. Get it from your profile on\nToggl.com [https://www.toggl.com/app/#profile](https://www.toggl.com/app/#profile).\n\nHere are the ways to specify your API key:\n\n#### options.apiKey\n\nType: `String`\nDefault value: ``\n\nThis is one way to specify your Toggl API key. Not secure if your repo is\npublic.\n\n#### options.apiEnvVar\n\nType: `String`\nDefault value: ``\n\nThis is one way to specify your Toggl API key. Safe but you'll have to configure\nthe shell env var on the machine you're using the task on.\n\n#### options.settingsFile\n\nType: `String`\nDefault value: `.toggl`\n\nThis is another way to specify your Toggl API Key. Enter a filename to a\nJSON file that contains the key \"apiKey\" and value with your Toggl API key.\n\n```json\n{\n  \"apiKey\":     \"demokeydemokeydemokey\",\n  \"workspace\":  12345\n  \"project\":    1111111\n}\n```\n\nYou can also specify the workspace here.\n\nThis format is useful if you keep your Gruntfile in version control and don't\nwant your API key in it (e.g. add your `.toggl` file to your `.gitignore`).\n\n##### Other options\n\n#### options.workspace\n\nType: `Integer`\nDefault value: `null`\n\nOPTIONAL (if specified in settingsFile). Equivalent to `options.data.wid`.\nSpecify the Toggl Workspace ID that newly created time entries should go into.\n\n#### options.project\n\nType: `Integer`\nDefault value: `null`\n\nOPTIONAL. Equivalent to `options.data.pid`. Specify the Toggl Project ID that\nnewly created time entries should go into.\n\n#### options.data\n\nType: `Object`\nDefault value: `{}`\n\nThe `data` object can take any values from the toggl `time_entries` API\nendpoint:\n\n- description: (string, strongly suggested to be used)\n    - I like to use the `package.json` name in the description, assuming you\n      have it loaded into the pkg variable\n      (`pkg: grunt.file.readJSON('package.json')`):\n\n      ```json\n      data: {\n        description: '\u003c%= pkg.name %\u003e'\n      }\n      ```\n\n- wid: workspace ID (integer, **required** if pid or tid not supplied).\n    - See [Finding your workspace IDs](#finding-your-workspace-ids) for\n      how to get the ID using this grunt task.\n- pid: project ID (integer, not required)\n    - See [Finding your project IDs](#finding-your-project-ids) for\n      how to get the ID using this grunt task.\n- tid: task ID (integer, not required)\n- billable: (boolean, not required, default false, available for pro\n  workspaces)\n- start: time entry start time (string, **required**, ISO 8601 date and time)\n- stop: time entry stop time (string, not required, ISO 8601 date and time)\n- duration: time entry duration in seconds. If the time entry is currently\n  running, the duration attribute contains a negative value, denoting the\n  start of the time entry in seconds since epoch (Jan 1 1970). The correct\n  duration can be calculated as current_time + duration, where current_time is\n  the current time in seconds since epoch. (integer, **required**)\n- created_with: the name of your client app (string, **required**)\n- tags: a list of tag names (array of strings, not required)\n- duronly: should Toggl show the start and stop time of this time entry?\n  (boolean, not required)\n- at: timestamp that is sent in the response, indicates the time item was last\n  updated\n\nSee this doc for the latest properties available for the API:\n[https://github.com/toggl/toggl_api_docs/blob/master/chapters/time_entries.md](https://github.com/toggl/toggl_api_docs/blob/master/chapters/time_entries.md)\n\nData in this object will override the `workspace` and `project` properties for\n`data.wid` and `data.pid`\n\n### Usage Examples\n\n#### Finding your workspace IDs\n\nUse:\n\n```bash\ngrunt toggl:MYTASK:workspaces\n```\n\nTo get a JSON list of workspaces. `MYTASK` should be whatever task you have\nconfigured, since you still need a valid API Key to get the workspaces.\n\n*OR* just run the task without a workspace set. It will list your workspaces\nby default.\n\n#### Finding your project IDs\n\nUse:\n\n```bash\ngrunt toggl:MYTASK:projects\n```\n\nTo get a JSON list of projects in the configured workspace. Your task needs to\nhave a Workspace ID properly setup in order to use this argument (valid\n`workspace` or `wid` set in the options).\n\n#### Stop the current task\n\nUse:\n\n```bash\ngrunt toggl:MYTASK:stopCurrent\n```\n\nTo stop the current task timer. This will call the API to find out if there is\na current timer running. If there is, another call is made to stop it.\n\n*OR* add this to your Gruntfile.js\n\n```javascript\ngrunt.registerTask('toggl:stop', ['toggl:default:stopCurrent']);\n```\n\nand you will be able to simply call\n\n```bash\ngrunt toggl:stop\n```\n\n#### Default Options\n\n```js\ngrunt.initConfig({\n  toggl: {\n    options: {\n      settingsFile: '.toggl',\n      workspace: null,\n    }\n  },\n});\n```\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding\nstyle. Add unit tests for any new or changed functionality. Lint and test your\ncode using [Grunt](http://gruntjs.com/).\n\n## TODO\n\n- `debug` option that deletes time entries as soon as they're created.\n\n## Release History\n\n```markdown\n- 2015-02-22   v1.0.0    [CHANGED]  dependency bump\n- 2015-02-21   v0.3.0    [CHANGED]  support grunt \u003e=0.4.4 in package.json\n- 2014-04-29   v0.2.0    [ADDED]    argument for listing projects in a workspace\n- 2014-04-29   v0.2.0    [ADDED]    argument for listing projects in a workspace\n                         [CHANGED]  arg for listing workspaces\n- 2014-04-28   v0.1.1    Alpha READY. It works.\n- 2014-04-28   v0.1.0    Work in progress, not ready.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidosomething%2Fgrunt-toggl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidosomething%2Fgrunt-toggl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidosomething%2Fgrunt-toggl/lists"}