KosmoKrator

productivity

Motion CLI for AI Agents

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

7 functions 6 read 1 write Bearer token auth

Motion CLI Setup

Motion can be configured headlessly with `kosmokrator integrations:configure motion`.

# 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 motion --set access_token="$MOTION_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor motion --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 MOTION_ACCESS_TOKEN Secret secret yes Access Token
url MOTION_URL URL url no API URL

Call Motion Headlessly

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

kosmo integrations:call motion.motion_list_tasks '{
  "status": "example_status",
  "projectId": "example_projectId",
  "assigneeId": "example_assigneeId",
  "limit": 1,
  "cursor": "example_cursor"
}' --json

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

kosmo integrations:motion motion_list_tasks '{
  "status": "example_status",
  "projectId": "example_projectId",
  "assigneeId": "example_assigneeId",
  "limit": 1,
  "cursor": "example_cursor"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs motion --json
kosmo integrations:docs motion.motion_list_tasks --json
kosmo integrations:schema motion.motion_list_tasks --json
kosmo integrations:search "Motion" --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 Motion.

motion.motion_list_tasks

Read read

List tasks from Motion with optional filters. Filter by status, project, or assignee. Supports cursor-based pagination.

Parameters
status, projectId, assigneeId, limit, cursor

Generic CLI call

kosmo integrations:call motion.motion_list_tasks '{"status":"example_status","projectId":"example_projectId","assigneeId":"example_assigneeId","limit":1,"cursor":"example_cursor"}' --json

Provider shortcut

kosmo integrations:motion motion_list_tasks '{"status":"example_status","projectId":"example_projectId","assigneeId":"example_assigneeId","limit":1,"cursor":"example_cursor"}' --json

motion.motion_get_task

Read read

Get details of a specific task in Motion by its ID. Returns the task name, description, status, assignee, due date, priority, and project.

Parameters
taskId

Generic CLI call

kosmo integrations:call motion.motion_get_task '{"taskId":"example_taskId"}' --json

Provider shortcut

kosmo integrations:motion motion_get_task '{"taskId":"example_taskId"}' --json

motion.motion_create_task

Write write

Create a new task in Motion. Requires a task name. Optionally specify a project, assignee, due date, priority, and description. Motion will auto-schedule the task based on priorities and deadlines.

Parameters
name, projectId, assigneeId, dueDate, priority, description

Generic CLI call

kosmo integrations:call motion.motion_create_task '{"name":"example_name","projectId":"example_projectId","assigneeId":"example_assigneeId","dueDate":"example_dueDate","priority":"example_priority","description":"example_description"}' --json

Provider shortcut

kosmo integrations:motion motion_create_task '{"name":"example_name","projectId":"example_projectId","assigneeId":"example_assigneeId","dueDate":"example_dueDate","priority":"example_priority","description":"example_description"}' --json

motion.motion_list_projects

Read read

List all projects in Motion. Returns project IDs, names, and other metadata. Use project IDs to filter tasks or create tasks in specific projects.

Parameters
none

Generic CLI call

kosmo integrations:call motion.motion_list_projects '{}' --json

Provider shortcut

kosmo integrations:motion motion_list_projects '{}' --json

motion.motion_get_project

Read read

Get details of a specific project in Motion by its ID. Returns the project name, description, status, and other metadata.

Parameters
projectId

Generic CLI call

kosmo integrations:call motion.motion_get_project '{"projectId":"example_projectId"}' --json

Provider shortcut

kosmo integrations:motion motion_get_project '{"projectId":"example_projectId"}' --json

motion.motion_list_schedules

Read read

List schedules from Motion within a date range. Returns scheduled tasks and events for the authenticated user.

Parameters
startDate, endDate

Generic CLI call

kosmo integrations:call motion.motion_list_schedules '{"startDate":"example_startDate","endDate":"example_endDate"}' --json

Provider shortcut

kosmo integrations:motion motion_list_schedules '{"startDate":"example_startDate","endDate":"example_endDate"}' --json

motion.motion_get_current_user

Read read

Get the profile of the currently authenticated Motion user. Returns user ID, name, email, and other account details.

Parameters
none

Generic CLI call

kosmo integrations:call motion.motion_get_current_user '{}' --json

Provider shortcut

kosmo integrations:motion motion_get_current_user '{}' --json

Function Schemas

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

motion.motion_list_tasks

List tasks from Motion with optional filters. Filter by status, project, or assignee. Supports cursor-based pagination.

Operation
Read read
Schema command
kosmo integrations:schema motion.motion_list_tasks --json
ParameterTypeRequiredDescription
status string no Filter by task status. Common values: "Todo", "In Progress", "Done".
projectId string no Filter tasks by project ID.
assigneeId string no Filter tasks by assignee user ID.
limit integer no Maximum number of tasks to return per page (default: 20, max: 100).
cursor string no Pagination cursor from a previous response to fetch the next page.

motion.motion_get_task

Get details of a specific task in Motion by its ID. Returns the task name, description, status, assignee, due date, priority, and project.

Operation
Read read
Schema command
kosmo integrations:schema motion.motion_get_task --json
ParameterTypeRequiredDescription
taskId string yes The unique identifier of the task.

motion.motion_create_task

Create a new task in Motion. Requires a task name. Optionally specify a project, assignee, due date, priority, and description. Motion will auto-schedule the task based on priorities and deadlines.

Operation
Write write
Schema command
kosmo integrations:schema motion.motion_create_task --json
ParameterTypeRequiredDescription
name string yes The title/name of the task.
projectId string no The ID of the project to add the task to.
assigneeId string no The user ID of the person to assign the task to.
dueDate string no Due date in ISO 8601 format (e.g., "2025-12-31"). Motion uses this for auto-scheduling.
priority string no Task priority: "ASAP", "HIGH", "MEDIUM", or "LOW". Defaults to "MEDIUM".
description string no Detailed description of the task. Supports Markdown.

motion.motion_list_projects

List all projects in Motion. Returns project IDs, names, and other metadata. Use project IDs to filter tasks or create tasks in specific projects.

Operation
Read read
Schema command
kosmo integrations:schema motion.motion_list_projects --json
ParameterTypeRequiredDescription
No parameters.

motion.motion_get_project

Get details of a specific project in Motion by its ID. Returns the project name, description, status, and other metadata.

Operation
Read read
Schema command
kosmo integrations:schema motion.motion_get_project --json
ParameterTypeRequiredDescription
projectId string yes The unique identifier of the project.

motion.motion_list_schedules

List schedules from Motion within a date range. Returns scheduled tasks and events for the authenticated user.

Operation
Read read
Schema command
kosmo integrations:schema motion.motion_list_schedules --json
ParameterTypeRequiredDescription
startDate string yes Start date in ISO 8601 format (e.g., "2025-01-01").
endDate string yes End date in ISO 8601 format (e.g., "2025-01-31").

motion.motion_get_current_user

Get the profile of the currently authenticated Motion user. Returns user ID, name, email, and other account details.

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