productivity
Harvest CLI for AI Agents
Use the Harvest CLI from KosmoKrator to call Harvest tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Harvest CLI Setup
Harvest can be configured headlessly with `kosmokrator integrations:configure harvest`.
# 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 harvest --set access_token="$HARVEST_ACCESS_TOKEN" --set account_id="$HARVEST_ACCOUNT_ID" --enable --read allow --write ask --json
kosmokrator integrations:doctor harvest --json
kosmokrator integrations:status --json Credentials
Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | HARVEST_ACCESS_TOKEN | Secret secret | yes | Access Token |
account_id | HARVEST_ACCOUNT_ID | Text text | yes | Account ID |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
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 kosmo integrations: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
These commands return structured output for coding agents that need to inspect capabilities 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 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.
harvest.harvest_list_time_entries
List Harvest time entries with optional filters for user, client, project, and date range.
read - Parameters
- user_id, client_id, project_id, is_billed, is_running, from, to, page, per_page
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 kosmo integrations: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 harvest.harvest_create_time_entry
Create a new Harvest time entry for a project and task.
write - Parameters
- project_id, task_id, spent_date, hours, notes, timer_started_at
kosmo integrations:call harvest.harvest_create_time_entry '{"project_id":1,"task_id":1,"spent_date":"example_spent_date","hours":1,"notes":"example_notes","timer_started_at":"example_timer_started_at"}' --json kosmo integrations:harvest harvest_create_time_entry '{"project_id":1,"task_id":1,"spent_date":"example_spent_date","hours":1,"notes":"example_notes","timer_started_at":"example_timer_started_at"}' --json harvest.harvest_get_time_entry
Get a single Harvest time entry by its ID.
read - Parameters
- id
kosmo integrations:call harvest.harvest_get_time_entry '{"id":1}' --json kosmo integrations:harvest harvest_get_time_entry '{"id":1}' --json harvest.harvest_update_time_entry
Update an existing Harvest time entry (hours, notes, or spent_date).
write - Parameters
- id, hours, notes, spent_date
kosmo integrations:call harvest.harvest_update_time_entry '{"id":1,"hours":1,"notes":"example_notes","spent_date":"example_spent_date"}' --json kosmo integrations:harvest harvest_update_time_entry '{"id":1,"hours":1,"notes":"example_notes","spent_date":"example_spent_date"}' --json harvest.harvest_delete_time_entry
Delete a Harvest time entry by its ID.
write - Parameters
- id
kosmo integrations:call harvest.harvest_delete_time_entry '{"id":1}' --json kosmo integrations:harvest harvest_delete_time_entry '{"id":1}' --json harvest.harvest_list_projects
List Harvest projects with optional filters for client and active status.
read - Parameters
- client_id, is_active, page, per_page
kosmo integrations:call harvest.harvest_list_projects '{"client_id":1,"is_active":true,"page":1,"per_page":1}' --json kosmo integrations:harvest harvest_list_projects '{"client_id":1,"is_active":true,"page":1,"per_page":1}' --json harvest.harvest_get_project
Get a single Harvest project by its ID.
read - Parameters
- id
kosmo integrations:call harvest.harvest_get_project '{"id":1}' --json kosmo integrations:harvest harvest_get_project '{"id":1}' --json harvest.harvest_list_clients
List Harvest clients with optional active status filter.
read - Parameters
- is_active, page
kosmo integrations:call harvest.harvest_list_clients '{"is_active":true,"page":1}' --json kosmo integrations:harvest harvest_list_clients '{"is_active":true,"page":1}' --json harvest.harvest_list_tasks
List Harvest tasks with optional active status filter.
read - Parameters
- is_active, page
kosmo integrations:call harvest.harvest_list_tasks '{"is_active":true,"page":1}' --json kosmo integrations:harvest harvest_list_tasks '{"is_active":true,"page":1}' --json harvest.harvest_list_users
List Harvest users with optional active status filter.
read - Parameters
- is_active, page, per_page
kosmo integrations:call harvest.harvest_list_users '{"is_active":true,"page":1,"per_page":1}' --json kosmo integrations:harvest harvest_list_users '{"is_active":true,"page":1,"per_page":1}' --json harvest.harvest_get_user
Get a single Harvest user by their ID.
read - Parameters
- id
kosmo integrations:call harvest.harvest_get_user '{"id":1}' --json kosmo integrations:harvest harvest_get_user '{"id":1}' --json harvest.harvest_get_current_user
Get the currently authenticated Harvest user profile.
read - Parameters
- none
kosmo integrations:call harvest.harvest_get_current_user '{}' --json kosmo integrations:harvest harvest_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
harvest.harvest_list_time_entries 9 parameters
kosmo integrations:schema harvest.harvest_list_time_entries --json | Parameter | Type | Required | Description |
|---|---|---|---|
user_id | integer | no | Filter by user ID. |
client_id | integer | no | Filter by client ID. |
project_id | integer | no | Filter by project ID. |
is_billed | boolean | no | Filter by billed status (true/false). |
is_running | boolean | no | Filter to only running timers. |
from | string | no | Start date filter (YYYY-MM-DD). |
to | string | no | End date filter (YYYY-MM-DD). |
page | integer | no | Page number (default: 1). |
per_page | integer | no | Results per page (default: 100, max: 2000). |
harvest.harvest_create_time_entry 6 parameters
kosmo integrations:schema harvest.harvest_create_time_entry --json | Parameter | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | Project ID to log time against. |
task_id | integer | yes | Task ID to associate with the entry. |
spent_date | string | yes | Date the time was spent (YYYY-MM-DD). |
hours | number | no | Number of hours logged (e.g. 1.5). |
notes | string | no | Notes describing the time entry. |
timer_started_at | string | no | ISO 8601 timestamp when the timer was started. |
harvest.harvest_get_time_entry 1 parameters
kosmo integrations:schema harvest.harvest_get_time_entry --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The time entry ID. |
harvest.harvest_update_time_entry 4 parameters
kosmo integrations:schema harvest.harvest_update_time_entry --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The time entry ID to update. |
hours | number | no | Updated number of hours (e.g. 2.5). |
notes | string | no | Updated notes for the time entry. |
spent_date | string | no | Updated spent date (YYYY-MM-DD). |
harvest.harvest_delete_time_entry 1 parameters
kosmo integrations:schema harvest.harvest_delete_time_entry --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The time entry ID to delete. |
harvest.harvest_list_projects 4 parameters
kosmo integrations:schema harvest.harvest_list_projects --json | Parameter | Type | Required | Description |
|---|---|---|---|
client_id | integer | no | Filter by client ID. |
is_active | boolean | no | Filter to active projects only. |
page | integer | no | Page number (default: 1). |
per_page | integer | no | Results per page (default: 100). |
harvest.harvest_get_project 1 parameters
kosmo integrations:schema harvest.harvest_get_project --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The project ID. |
harvest.harvest_list_clients 2 parameters
kosmo integrations:schema harvest.harvest_list_clients --json | Parameter | Type | Required | Description |
|---|---|---|---|
is_active | boolean | no | Filter to active clients only. |
page | integer | no | Page number (default: 1). |
harvest.harvest_list_tasks 2 parameters
kosmo integrations:schema harvest.harvest_list_tasks --json | Parameter | Type | Required | Description |
|---|---|---|---|
is_active | boolean | no | Filter to active tasks only. |
page | integer | no | Page number (default: 1). |
harvest.harvest_list_users 3 parameters
kosmo integrations:schema harvest.harvest_list_users --json | Parameter | Type | Required | Description |
|---|---|---|---|
is_active | boolean | no | Filter to active users only. |
page | integer | no | Page number (default: 1). |
per_page | integer | no | Results per page (default: 100). |
harvest.harvest_get_user 1 parameters
kosmo integrations:schema harvest.harvest_get_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The user ID. |
harvest.harvest_get_current_user 0 parameters
kosmo integrations:schema harvest.harvest_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
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.