KosmoKrator

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.

12 functions 9 read 3 write Manual OAuth token auth

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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token HARVEST_ACCESS_TOKEN Secret secret yes Access Token
account_id HARVEST_ACCOUNT_ID Text text yes Account ID

Call Harvest Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

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

Use the provider shortcut form for shorter human-facing commands.

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

Agent Discovery Commands

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

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Harvest.

harvest.harvest_list_time_entries

Read read

List Harvest time entries with optional filters for user, client, project, and date range.

Parameters
user_id, client_id, project_id, is_billed, is_running, from, to, page, per_page

Generic CLI call

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

Provider shortcut

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

Write write

Create a new Harvest time entry for a project and task.

Parameters
project_id, task_id, spent_date, hours, notes, timer_started_at

Generic CLI call

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

Provider shortcut

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

Read read

Get a single Harvest time entry by its ID.

Parameters
id

Generic CLI call

kosmo integrations:call harvest.harvest_get_time_entry '{"id":1}' --json

Provider shortcut

kosmo integrations:harvest harvest_get_time_entry '{"id":1}' --json

harvest.harvest_update_time_entry

Write write

Update an existing Harvest time entry (hours, notes, or spent_date).

Parameters
id, hours, notes, spent_date

Generic CLI call

kosmo integrations:call harvest.harvest_update_time_entry '{"id":1,"hours":1,"notes":"example_notes","spent_date":"example_spent_date"}' --json

Provider shortcut

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

Write write

Delete a Harvest time entry by its ID.

Parameters
id

Generic CLI call

kosmo integrations:call harvest.harvest_delete_time_entry '{"id":1}' --json

Provider shortcut

kosmo integrations:harvest harvest_delete_time_entry '{"id":1}' --json

harvest.harvest_list_projects

Read read

List Harvest projects with optional filters for client and active status.

Parameters
client_id, is_active, page, per_page

Generic CLI call

kosmo integrations:call harvest.harvest_list_projects '{"client_id":1,"is_active":true,"page":1,"per_page":1}' --json

Provider shortcut

kosmo integrations:harvest harvest_list_projects '{"client_id":1,"is_active":true,"page":1,"per_page":1}' --json

harvest.harvest_get_project

Read read

Get a single Harvest project by its ID.

Parameters
id

Generic CLI call

kosmo integrations:call harvest.harvest_get_project '{"id":1}' --json

Provider shortcut

kosmo integrations:harvest harvest_get_project '{"id":1}' --json

harvest.harvest_list_clients

Read read

List Harvest clients with optional active status filter.

Parameters
is_active, page

Generic CLI call

kosmo integrations:call harvest.harvest_list_clients '{"is_active":true,"page":1}' --json

Provider shortcut

kosmo integrations:harvest harvest_list_clients '{"is_active":true,"page":1}' --json

harvest.harvest_list_tasks

Read read

List Harvest tasks with optional active status filter.

Parameters
is_active, page

Generic CLI call

kosmo integrations:call harvest.harvest_list_tasks '{"is_active":true,"page":1}' --json

Provider shortcut

kosmo integrations:harvest harvest_list_tasks '{"is_active":true,"page":1}' --json

harvest.harvest_list_users

Read read

List Harvest users with optional active status filter.

Parameters
is_active, page, per_page

Generic CLI call

kosmo integrations:call harvest.harvest_list_users '{"is_active":true,"page":1,"per_page":1}' --json

Provider shortcut

kosmo integrations:harvest harvest_list_users '{"is_active":true,"page":1,"per_page":1}' --json

harvest.harvest_get_user

Read read

Get a single Harvest user by their ID.

Parameters
id

Generic CLI call

kosmo integrations:call harvest.harvest_get_user '{"id":1}' --json

Provider shortcut

kosmo integrations:harvest harvest_get_user '{"id":1}' --json

harvest.harvest_get_current_user

Read read

Get the currently authenticated Harvest user profile.

Parameters
none

Generic CLI call

kosmo integrations:call harvest.harvest_get_current_user '{}' --json

Provider shortcut

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

List Harvest time entries with optional filters for user, client, project, and date range.

Operation
Read read
Schema command
kosmo integrations:schema harvest.harvest_list_time_entries --json
ParameterTypeRequiredDescription
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

Create a new Harvest time entry for a project and task.

Operation
Write write
Schema command
kosmo integrations:schema harvest.harvest_create_time_entry --json
ParameterTypeRequiredDescription
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

Get a single Harvest time entry by its ID.

Operation
Read read
Schema command
kosmo integrations:schema harvest.harvest_get_time_entry --json
ParameterTypeRequiredDescription
id integer yes The time entry ID.

harvest.harvest_update_time_entry

Update an existing Harvest time entry (hours, notes, or spent_date).

Operation
Write write
Schema command
kosmo integrations:schema harvest.harvest_update_time_entry --json
ParameterTypeRequiredDescription
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

Delete a Harvest time entry by its ID.

Operation
Write write
Schema command
kosmo integrations:schema harvest.harvest_delete_time_entry --json
ParameterTypeRequiredDescription
id integer yes The time entry ID to delete.

harvest.harvest_list_projects

List Harvest projects with optional filters for client and active status.

Operation
Read read
Schema command
kosmo integrations:schema harvest.harvest_list_projects --json
ParameterTypeRequiredDescription
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

Get a single Harvest project by its ID.

Operation
Read read
Schema command
kosmo integrations:schema harvest.harvest_get_project --json
ParameterTypeRequiredDescription
id integer yes The project ID.

harvest.harvest_list_clients

List Harvest clients with optional active status filter.

Operation
Read read
Schema command
kosmo integrations:schema harvest.harvest_list_clients --json
ParameterTypeRequiredDescription
is_active boolean no Filter to active clients only.
page integer no Page number (default: 1).

harvest.harvest_list_tasks

List Harvest tasks with optional active status filter.

Operation
Read read
Schema command
kosmo integrations:schema harvest.harvest_list_tasks --json
ParameterTypeRequiredDescription
is_active boolean no Filter to active tasks only.
page integer no Page number (default: 1).

harvest.harvest_list_users

List Harvest users with optional active status filter.

Operation
Read read
Schema command
kosmo integrations:schema harvest.harvest_list_users --json
ParameterTypeRequiredDescription
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

Get a single Harvest user by their ID.

Operation
Read read
Schema command
kosmo integrations:schema harvest.harvest_get_user --json
ParameterTypeRequiredDescription
id integer yes The user ID.

harvest.harvest_get_current_user

Get the currently authenticated Harvest user profile.

Operation
Read read
Schema command
kosmo integrations:schema harvest.harvest_get_current_user --json
ParameterTypeRequiredDescription
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.