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.

Hubstaff CLI Setup

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

Install, configure, and verify
# 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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
access_token HUBSTAFF_ACCESS_TOKEN Secret secret yes Access Token
url HUBSTAFF_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

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

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
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

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.

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.

Read read
Parameters
startTime, endTime, userIds, projectId, limit, page
Generic 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
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

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

Read read
Parameters
id
Generic call
kosmo integrations:call hubstaff.hubstaff_get_time_entry '{"id":1}' --json
Shortcut
kosmo integrations:hubstaff hubstaff_get_time_entry '{"id":1}' --json

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.

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

hubstaff.hubstaff_list_projects

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

Read read
Parameters
status, limit, page
Generic call
kosmo integrations:call hubstaff.hubstaff_list_projects '{"status":"example_status","limit":1,"page":1}' --json
Shortcut
kosmo integrations:hubstaff hubstaff_list_projects '{"status":"example_status","limit":1,"page":1}' --json

hubstaff.hubstaff_get_project

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

Read read
Parameters
id
Generic call
kosmo integrations:call hubstaff.hubstaff_get_project '{"id":1}' --json
Shortcut
kosmo integrations:hubstaff hubstaff_get_project '{"id":1}' --json

hubstaff.hubstaff_list_organizations

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

Read read
Parameters
limit, page
Generic call
kosmo integrations:call hubstaff.hubstaff_list_organizations '{"limit":1,"page":1}' --json
Shortcut
kosmo integrations:hubstaff hubstaff_list_organizations '{"limit":1,"page":1}' --json

hubstaff.hubstaff_get_current_user

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

Read read
Parameters
none
Generic call
kosmo integrations:call hubstaff.hubstaff_get_current_user '{}' --json
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 6 parameters
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 1 parameters
Schema command
kosmo integrations:schema hubstaff.hubstaff_get_time_entry --json
ParameterTypeRequiredDescription
id integer yes The time entry ID.
hubstaff.hubstaff_create_time_entry 4 parameters
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 3 parameters
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 1 parameters
Schema command
kosmo integrations:schema hubstaff.hubstaff_get_project --json
ParameterTypeRequiredDescription
id integer yes The project ID.
hubstaff.hubstaff_list_organizations 2 parameters
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 0 parameters
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.