productivity
Kimai CLI for Shell Scripts
Use the Kimai CLI for shell scripts with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Bearer token auth
Kimai CLI for Shell Scripts
Call integration functions from shell scripts with stable JSON input and output.
Use shell scripts for small local automations that need one or more integration calls. The Kimai CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Kimai CLI for Shell Scripts
kosmokrator integrations:configure kimai --set access_token="$KIMAI_ACCESS_TOKEN" --set url="$KIMAI_URL" --enable --read allow --write ask --json
kosmo integrations:call kimai.kimai_list_timesheets '{"page":1,"size":1,"user":"example_user","project":1,"begin":"example_begin","end":"example_end","state":"example_state"}' --json Discovery Before Execution
Agents and scripts can inspect Kimai docs and schemas before choosing a function.
kosmo integrations:docs kimai --json
kosmo integrations:docs kimai.kimai_list_timesheets --json
kosmo integrations:schema kimai.kimai_list_timesheets --json
kosmo integrations:search "Kimai" --json
kosmo integrations:list --json Useful Kimai CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
kimai.kimai_list_timesheets | Read | page, size, user, project, begin, end, state | List time-tracking entries from Kimai. Supports filtering by user, project, date range, and state. Returns paginated results with timesheet details including duration, description, and associated project/activity. |
kimai.kimai_get_timesheet | Read | id | Get details of a specific timesheet entry from Kimai. Returns the full timesheet record including begin/end timestamps, duration, description, project, activity, and user information. |
kimai.kimai_create_timesheet | Write | begin, end, project, activity, description | Create a new time-tracking entry in Kimai. Requires a begin timestamp and at least a project ID. Optionally specify an end time, activity, and description to categorize the time entry. |
kimai.kimai_list_projects | Read | page, size, customer, visible | List projects from Kimai. Supports filtering by customer and visibility. Returns project details including name, customer, budget, and time budget information. |
kimai.kimai_get_project | Read | id | Get details of a specific project from Kimai. Returns the full project record including name, customer, comment, budget, time budget, and visibility status. |
kimai.kimai_list_customers | Read | page, size, visible | List customers from Kimai. Supports filtering by visibility. Returns customer details including name, company, contact information, and associated project count. |
kimai.kimai_get_current_user | Read | none | Get the profile of the currently authenticated Kimai user. Returns user details including username, display name, email, timezone, and language preferences. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.