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.

Motion CLI Setup

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

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

KeyEnv varTypeRequiredLabel
access_token MOTION_ACCESS_TOKEN Secret secret yes Access Token
url MOTION_URL URL url no API URL

Command Patterns

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

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

Discovery

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

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

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.

motion.motion_list_tasks

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

Read read
Parameters
status, projectId, assigneeId, limit, cursor
Generic call
kosmo integrations:call motion.motion_list_tasks '{"status":"example_status","projectId":"example_projectId","assigneeId":"example_assigneeId","limit":1,"cursor":"example_cursor"}' --json
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

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

Read read
Parameters
taskId
Generic call
kosmo integrations:call motion.motion_get_task '{"taskId":"example_taskId"}' --json
Shortcut
kosmo integrations:motion motion_get_task '{"taskId":"example_taskId"}' --json

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.

Write write
Parameters
name, projectId, assigneeId, dueDate, priority, description
Generic 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
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

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

Read read
Parameters
none
Generic call
kosmo integrations:call motion.motion_list_projects '{}' --json
Shortcut
kosmo integrations:motion motion_list_projects '{}' --json

motion.motion_get_project

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

Read read
Parameters
projectId
Generic call
kosmo integrations:call motion.motion_get_project '{"projectId":"example_projectId"}' --json
Shortcut
kosmo integrations:motion motion_get_project '{"projectId":"example_projectId"}' --json

motion.motion_list_schedules

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

Read read
Parameters
startDate, endDate
Generic call
kosmo integrations:call motion.motion_list_schedules '{"startDate":"example_startDate","endDate":"example_endDate"}' --json
Shortcut
kosmo integrations:motion motion_list_schedules '{"startDate":"example_startDate","endDate":"example_endDate"}' --json

motion.motion_get_current_user

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

Read read
Parameters
none
Generic call
kosmo integrations:call motion.motion_get_current_user '{}' --json
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 5 parameters
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 1 parameters
Schema command
kosmo integrations:schema motion.motion_get_task --json
ParameterTypeRequiredDescription
taskId string yes The unique identifier of the task.
motion.motion_create_task 6 parameters
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 0 parameters
Schema command
kosmo integrations:schema motion.motion_list_projects --json
ParameterTypeRequiredDescription
No parameters.
motion.motion_get_project 1 parameters
Schema command
kosmo integrations:schema motion.motion_get_project --json
ParameterTypeRequiredDescription
projectId string yes The unique identifier of the project.
motion.motion_list_schedules 2 parameters
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 0 parameters
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.