productivity
Harvest CLI for Headless Automation
Use the Harvest CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
12 functions 9 read 3 write Manual OAuth token auth
Harvest CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Harvest CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Harvest CLI for Headless Automation
kosmokrator integrations:configure harvest --set access_token="$HARVEST_ACCESS_TOKEN" --set account_id="$HARVEST_ACCOUNT_ID" --enable --read allow --write ask --json
kosmo integrations:call harvest.harvest_list_time_entries '{"user_id":1,"client_id":1,"project_id":1,"is_billed":true,"is_running":true,"from":"example_from","to":"example_to","page":1}' --json Discovery Before Execution
Agents and scripts can inspect Harvest docs and schemas before choosing a function.
kosmo integrations:docs harvest --json
kosmo integrations:docs harvest.harvest_list_time_entries --json
kosmo integrations:schema harvest.harvest_list_time_entries --json
kosmo integrations:search "Harvest" --json
kosmo integrations:list --json Useful Harvest CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
harvest.harvest_list_time_entries | Read | user_id, client_id, project_id, is_billed, is_running, from, to, page, per_page | List Harvest time entries with optional filters for user, client, project, and date range. |
harvest.harvest_create_time_entry | Write | project_id, task_id, spent_date, hours, notes, timer_started_at | Create a new Harvest time entry for a project and task. |
harvest.harvest_get_time_entry | Read | id | Get a single Harvest time entry by its ID. |
harvest.harvest_update_time_entry | Write | id, hours, notes, spent_date | Update an existing Harvest time entry (hours, notes, or spent_date). |
harvest.harvest_delete_time_entry | Write | id | Delete a Harvest time entry by its ID. |
harvest.harvest_list_projects | Read | client_id, is_active, page, per_page | List Harvest projects with optional filters for client and active status. |
harvest.harvest_get_project | Read | id | Get a single Harvest project by its ID. |
harvest.harvest_list_clients | Read | is_active, page | List Harvest clients with optional active status filter. |
harvest.harvest_list_tasks | Read | is_active, page | List Harvest tasks with optional active status filter. |
harvest.harvest_list_users | Read | is_active, page, per_page | List Harvest users with optional active status filter. |
harvest.harvest_get_user | Read | id | Get a single Harvest user by their ID. |
harvest.harvest_get_current_user | Read | none | Get the currently authenticated Harvest user profile. |
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.