productivity
Toggl CLI for AI Agents
Use the Toggl CLI from KosmoKrator to call Toggl tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Toggl CLI Setup
Toggl can be configured headlessly with `kosmokrator integrations:configure toggl`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure toggl --set api_token="$TOGGL_API_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor toggl --json
kosmokrator integrations:status --json Credentials
Authentication type: API token api_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
api_token | TOGGL_API_TOKEN | Secret secret | yes | API Token |
url | TOGGL_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call toggl.toggl_create_time_entry '{"workspace_id":"example_workspace_id","description":"example_description","start":"example_start","stop":"example_stop","duration":1,"project_id":"example_project_id","tags":"example_tags"}' --json kosmo integrations:toggl toggl_create_time_entry '{"workspace_id":"example_workspace_id","description":"example_description","start":"example_start","stop":"example_stop","duration":1,"project_id":"example_project_id","tags":"example_tags"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs toggl --json
kosmo integrations:docs toggl.toggl_create_time_entry --json
kosmo integrations:schema toggl.toggl_create_time_entry --json
kosmo integrations:search "Toggl" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
toggl.toggl_create_time_entry
Create a new time entry in a Toggl workspace. Provide a description, start time, and optionally a project and stop time.
write - Parameters
- workspace_id, description, start, stop, duration, project_id, tags
kosmo integrations:call toggl.toggl_create_time_entry '{"workspace_id":"example_workspace_id","description":"example_description","start":"example_start","stop":"example_stop","duration":1,"project_id":"example_project_id","tags":"example_tags"}' --json kosmo integrations:toggl toggl_create_time_entry '{"workspace_id":"example_workspace_id","description":"example_description","start":"example_start","stop":"example_stop","duration":1,"project_id":"example_project_id","tags":"example_tags"}' --json toggl.toggl_get_current_user
Get the authenticated Toggl user profile. Use this to verify your API token is working.
read - Parameters
- none
kosmo integrations:call toggl.toggl_get_current_user '{}' --json kosmo integrations:toggl toggl_get_current_user '{}' --json toggl.toggl_get_project
Get details for a single Toggl project by ID.
read - Parameters
- workspace_id, project_id
kosmo integrations:call toggl.toggl_get_project '{"workspace_id":"example_workspace_id","project_id":"example_project_id"}' --json kosmo integrations:toggl toggl_get_project '{"workspace_id":"example_workspace_id","project_id":"example_project_id"}' --json toggl.toggl_get_time_entry
Get details for a single Toggl time entry by ID.
read - Parameters
- time_entry_id
kosmo integrations:call toggl.toggl_get_time_entry '{"time_entry_id":"example_time_entry_id"}' --json kosmo integrations:toggl toggl_get_time_entry '{"time_entry_id":"example_time_entry_id"}' --json toggl.toggl_list_projects
List projects in a Toggl workspace. Optionally filter for active projects only.
read - Parameters
- workspace_id, active
kosmo integrations:call toggl.toggl_list_projects '{"workspace_id":"example_workspace_id","active":true}' --json kosmo integrations:toggl toggl_list_projects '{"workspace_id":"example_workspace_id","active":true}' --json toggl.toggl_list_time_entries
List recent Toggl time entries. Optionally filter by date range.
read - Parameters
- start_date, end_date
kosmo integrations:call toggl.toggl_list_time_entries '{"start_date":"example_start_date","end_date":"example_end_date"}' --json kosmo integrations:toggl toggl_list_time_entries '{"start_date":"example_start_date","end_date":"example_end_date"}' --json toggl.toggl_list_workspaces
List all Toggl workspaces the authenticated user belongs to. Returns workspace IDs and names needed for other Toggl tools.
read - Parameters
- none
kosmo integrations:call toggl.toggl_list_workspaces '{}' --json kosmo integrations:toggl toggl_list_workspaces '{}' --json toggl.toggl_create_project
Create a new project in a Toggl Track workspace.
write - Parameters
- workspace_id, name, color, billable, is_private, active, estimated_hours, client_id
kosmo integrations:call toggl.toggl_create_project '{"workspace_id":1,"name":"example_name","color":"example_color","billable":true,"is_private":true,"active":true,"estimated_hours":1,"client_id":1}' --json kosmo integrations:toggl toggl_create_project '{"workspace_id":1,"name":"example_name","color":"example_color","billable":true,"is_private":true,"active":true,"estimated_hours":1,"client_id":1}' --json toggl.toggl_update_time_entry
Update an existing time entry in Toggl Track. Use this to edit description, times, project, tags, or billable status.
write - Parameters
- workspace_id, time_entry_id, description, start, stop, duration, project_id, task_id, tags, tag_ids, billable
kosmo integrations:call toggl.toggl_update_time_entry '{"workspace_id":1,"time_entry_id":1,"description":"example_description","start":"example_start","stop":"example_stop","duration":1,"project_id":1,"task_id":1}' --json kosmo integrations:toggl toggl_update_time_entry '{"workspace_id":1,"time_entry_id":1,"description":"example_description","start":"example_start","stop":"example_stop","duration":1,"project_id":1,"task_id":1}' --json toggl.toggl_delete_time_entry
Delete a time entry from Toggl Track. This action is permanent and cannot be undone.
write - Parameters
- workspace_id, time_entry_id
kosmo integrations:call toggl.toggl_delete_time_entry '{"workspace_id":1,"time_entry_id":1}' --json kosmo integrations:toggl toggl_delete_time_entry '{"workspace_id":1,"time_entry_id":1}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
toggl.toggl_create_time_entry 7 parameters
kosmo integrations:schema toggl.toggl_create_time_entry --json | Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | string | yes | The workspace ID. |
description | string | no | Description of the time entry. |
start | string | no | Start time (ISO 8601, e.g. "2026-04-05T09:00:00Z"). Defaults to now. |
stop | string | no | Stop time (ISO 8601). Omit for a running timer. |
duration | integer | no | Duration in seconds. Use -1 for a running timer (default: -1). |
project_id | string | no | Project ID to assign the time entry to. |
tags | array | no | Tags for the time entry. |
toggl.toggl_get_current_user 0 parameters
kosmo integrations:schema toggl.toggl_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
toggl.toggl_get_project 2 parameters
kosmo integrations:schema toggl.toggl_get_project --json | Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | string | yes | The workspace ID. |
project_id | string | yes | The project ID. |
toggl.toggl_get_time_entry 1 parameters
kosmo integrations:schema toggl.toggl_get_time_entry --json | Parameter | Type | Required | Description |
|---|---|---|---|
time_entry_id | string | yes | The time entry ID. |
toggl.toggl_list_projects 2 parameters
kosmo integrations:schema toggl.toggl_list_projects --json | Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | string | yes | The workspace ID. |
active | boolean | no | Filter for active projects only (default: true). |
toggl.toggl_list_time_entries 2 parameters
kosmo integrations:schema toggl.toggl_list_time_entries --json | Parameter | Type | Required | Description |
|---|---|---|---|
start_date | string | no | Start date filter (ISO 8601 date, e.g. "2026-01-01"). |
end_date | string | no | End date filter (ISO 8601 date). |
toggl.toggl_list_workspaces 0 parameters
kosmo integrations:schema toggl.toggl_list_workspaces --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
toggl.toggl_create_project 8 parameters
kosmo integrations:schema toggl.toggl_create_project --json | Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | integer | yes | The workspace ID. |
name | string | yes | Project name (e.g., "Website Redesign"). |
color | string | no | Project color as a hex code (e.g., "#0b83d9"). |
billable | boolean | no | Whether the project is billable. Defaults to false. |
is_private | boolean | no | Whether the project is private. Defaults to false. |
active | boolean | no | Whether the project is active. Defaults to true. |
estimated_hours | number | no | Estimated hours for the project. |
client_id | integer | no | Client ID to associate with the project. |
toggl.toggl_update_time_entry 11 parameters
kosmo integrations:schema toggl.toggl_update_time_entry --json | Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | integer | yes | The workspace ID. |
time_entry_id | integer | yes | The time entry ID to update. |
description | string | no | Updated description. |
start | string | no | Updated start time in ISO 8601 format. |
stop | string | no | Updated stop time in ISO 8601 format. |
duration | integer | no | Updated duration in seconds. |
project_id | integer | no | Updated project ID. |
task_id | integer | no | Updated task ID. |
tags | array | no | Updated array of tag names. |
tag_ids | array | no | Updated array of tag IDs. |
billable | boolean | no | Updated billable status. |
toggl.toggl_delete_time_entry 2 parameters
kosmo integrations:schema toggl.toggl_delete_time_entry --json | Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | integer | yes | The workspace ID. |
time_entry_id | integer | yes | The time entry ID to delete. |
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.