KosmoKrator

productivity

Hubstaff CLI for AI Agents

Use the Hubstaff CLI from KosmoKrator to call Hubstaff tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write Bearer token auth

Hubstaff CLI Setup

Hubstaff can be configured headlessly with `kosmokrator integrations:configure hubstaff`.

# 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 hubstaff --set access_token="$HUBSTAFF_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor hubstaff --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_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 HUBSTAFF_ACCESS_TOKEN Secret secret yes Access Token
url HUBSTAFF_URL URL url no API Base URL

Call Hubstaff Headlessly

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

kosmo integrations:call hubstaff.hubstaff_list_time_entries '{
  "startTime": "example_startTime",
  "endTime": "example_endTime",
  "userIds": "example_userIds",
  "projectId": 1,
  "limit": 1,
  "page": 1
}' --json

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

kosmo integrations:hubstaff hubstaff_list_time_entries '{
  "startTime": "example_startTime",
  "endTime": "example_endTime",
  "userIds": "example_userIds",
  "projectId": 1,
  "limit": 1,
  "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 hubstaff --json
kosmo integrations:docs hubstaff.hubstaff_list_time_entries --json
kosmo integrations:schema hubstaff.hubstaff_list_time_entries --json
kosmo integrations:search "Hubstaff" --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 Hubstaff.

hubstaff.hubstaff_list_time_entries

Read read

List time entries from Hubstaff. Supports filtering by date range, user IDs, and project ID. Returns tracked time entries with duration, notes, and associated project/user information.

Parameters
startTime, endTime, userIds, projectId, limit, page

Generic CLI call

kosmo integrations:call hubstaff.hubstaff_list_time_entries '{"startTime":"example_startTime","endTime":"example_endTime","userIds":"example_userIds","projectId":1,"limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:hubstaff hubstaff_list_time_entries '{"startTime":"example_startTime","endTime":"example_endTime","userIds":"example_userIds","projectId":1,"limit":1,"page":1}' --json

hubstaff.hubstaff_get_time_entry

Read read

Get details for a specific Hubstaff time entry by its ID. Returns the full time entry record including duration, notes, project, and user information.

Parameters
id

Generic CLI call

kosmo integrations:call hubstaff.hubstaff_get_time_entry '{"id":1}' --json

Provider shortcut

kosmo integrations:hubstaff hubstaff_get_time_entry '{"id":1}' --json

hubstaff.hubstaff_create_time_entry

Write write

Create a new manual time entry in Hubstaff. Requires a project ID, date, and duration. Optionally add notes to describe the work performed.

Parameters
project_id, date, duration, notes

Generic CLI call

kosmo integrations:call hubstaff.hubstaff_create_time_entry '{"project_id":1,"date":"example_date","duration":1,"notes":"example_notes"}' --json

Provider shortcut

kosmo integrations:hubstaff hubstaff_create_time_entry '{"project_id":1,"date":"example_date","duration":1,"notes":"example_notes"}' --json

hubstaff.hubstaff_list_projects

Read read

List projects from Hubstaff. Optionally filter by status (active, archived). Supports pagination to browse through large numbers of projects.

Parameters
status, limit, page

Generic CLI call

kosmo integrations:call hubstaff.hubstaff_list_projects '{"status":"example_status","limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:hubstaff hubstaff_list_projects '{"status":"example_status","limit":1,"page":1}' --json

hubstaff.hubstaff_get_project

Read read

Get details for a specific Hubstaff project by its ID. Returns project name, status, budget, and other metadata.

Parameters
id

Generic CLI call

kosmo integrations:call hubstaff.hubstaff_get_project '{"id":1}' --json

Provider shortcut

kosmo integrations:hubstaff hubstaff_get_project '{"id":1}' --json

hubstaff.hubstaff_list_organizations

Read read

List organizations the authenticated user belongs to in Hubstaff. Returns organization names, IDs, and other metadata. Supports pagination.

Parameters
limit, page

Generic CLI call

kosmo integrations:call hubstaff.hubstaff_list_organizations '{"limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:hubstaff hubstaff_list_organizations '{"limit":1,"page":1}' --json

hubstaff.hubstaff_get_current_user

Read read

Get the profile of the currently authenticated Hubstaff user. Returns name, email, timezone, and other account information.

Parameters
none

Generic CLI call

kosmo integrations:call hubstaff.hubstaff_get_current_user '{}' --json

Provider shortcut

kosmo integrations:hubstaff hubstaff_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

hubstaff.hubstaff_list_time_entries

List time entries from Hubstaff. Supports filtering by date range, user IDs, and project ID. Returns tracked time entries with duration, notes, and associated project/user information.

Operation
Read read
Schema command
kosmo integrations:schema hubstaff.hubstaff_list_time_entries --json
ParameterTypeRequiredDescription
startTime string no Start of the date range (ISO 8601, e.g., "2026-04-01T00:00:00Z"). Required for most queries.
endTime string no End of the date range (ISO 8601, e.g., "2026-04-06T23:59:59Z"). Required for most queries.
userIds string no Comma-separated user IDs to filter by (e.g., "123,456").
projectId integer no Project ID to filter time entries by.
limit integer no Maximum number of time entries to return per page (default: 50, max: 500).
page integer no Page number for pagination (starts at 1).

hubstaff.hubstaff_get_time_entry

Get details for a specific Hubstaff time entry by its ID. Returns the full time entry record including duration, notes, project, and user information.

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

hubstaff.hubstaff_create_time_entry

Create a new manual time entry in Hubstaff. Requires a project ID, date, and duration. Optionally add notes to describe the work performed.

Operation
Write write
Schema command
kosmo integrations:schema hubstaff.hubstaff_create_time_entry --json
ParameterTypeRequiredDescription
project_id integer yes The ID of the project to log time against.
date string yes The date for the time entry (ISO 8601, e.g., "2026-04-06").
duration integer yes Duration in seconds (e.g., 3600 for 1 hour).
notes string no Notes describing the work performed in this time entry.

hubstaff.hubstaff_list_projects

List projects from Hubstaff. Optionally filter by status (active, archived). Supports pagination to browse through large numbers of projects.

Operation
Read read
Schema command
kosmo integrations:schema hubstaff.hubstaff_list_projects --json
ParameterTypeRequiredDescription
status string no Filter by project status: "active" or "archived".
limit integer no Maximum number of projects to return per page (default: 50).
page integer no Page number for pagination (starts at 1).

hubstaff.hubstaff_get_project

Get details for a specific Hubstaff project by its ID. Returns project name, status, budget, and other metadata.

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

hubstaff.hubstaff_list_organizations

List organizations the authenticated user belongs to in Hubstaff. Returns organization names, IDs, and other metadata. Supports pagination.

Operation
Read read
Schema command
kosmo integrations:schema hubstaff.hubstaff_list_organizations --json
ParameterTypeRequiredDescription
limit integer no Maximum number of organizations to return per page (default: 50).
page integer no Page number for pagination (starts at 1).

hubstaff.hubstaff_get_current_user

Get the profile of the currently authenticated Hubstaff user. Returns name, email, timezone, and other account information.

Operation
Read read
Schema command
kosmo integrations:schema hubstaff.hubstaff_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.