data
Strava CLI for AI Agents
Use the Strava CLI from KosmoKrator to call Strava tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Strava CLI Setup
Strava can be configured headlessly with `kosmokrator integrations:configure strava`.
# 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 strava --set access_token="$STRAVA_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor strava --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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | STRAVA_ACCESS_TOKEN | Secret secret | yes | Access Token |
url | STRAVA_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call strava.strava_get_athlete '{}' --json kosmo integrations:strava strava_get_athlete '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs strava --json
kosmo integrations:docs strava.strava_get_athlete --json
kosmo integrations:schema strava.strava_get_athlete --json
kosmo integrations:search "Strava" --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.
strava.strava_get_athlete
Get the authenticated athlete's Strava profile: name, location, follower/following counts, and stats.
read - Parameters
- none
kosmo integrations:call strava.strava_get_athlete '{}' --json kosmo integrations:strava strava_get_athlete '{}' --json strava.strava_get_current_user
Get the current authenticated user's Strava profile. This is an alias for strava_get_athlete and returns name, location, follower/following counts, and stats.
read - Parameters
- none
kosmo integrations:call strava.strava_get_current_user '{}' --json kosmo integrations:strava strava_get_current_user '{}' --json strava.strava_get_athlete_stats
Get activity totals and recent statistics for a Strava athlete.
read - Parameters
- athlete_id
kosmo integrations:call strava.strava_get_athlete_stats '{"athlete_id":1}' --json kosmo integrations:strava strava_get_athlete_stats '{"athlete_id":1}' --json strava.strava_get_athlete_zones
Get heart rate and power zones for the authenticated Strava athlete.
read - Parameters
- none
kosmo integrations:call strava.strava_get_athlete_zones '{}' --json kosmo integrations:strava strava_get_athlete_zones '{}' --json strava.strava_list_activities
List recent activities for the authenticated Strava athlete. Supports pagination and date filtering with before/after Unix timestamps.
read - Parameters
- page, per_page, before, after
kosmo integrations:call strava.strava_list_activities '{"page":1,"per_page":1,"before":1,"after":1}' --json kosmo integrations:strava strava_list_activities '{"page":1,"per_page":1,"before":1,"after":1}' --json strava.strava_get_activity
Get detailed information about a specific Strava activity, including distance, pace, elevation, and splits.
read - Parameters
- activity_id
kosmo integrations:call strava.strava_get_activity '{"activity_id":1}' --json kosmo integrations:strava strava_get_activity '{"activity_id":1}' --json strava.strava_create_activity
Create a manual activity on Strava. Requires a name, activity type, start date, and elapsed time in seconds.
write - Parameters
- name, type, start_date_local, elapsed_time, description, distance, trainer, commute
kosmo integrations:call strava.strava_create_activity '{"name":"example_name","type":"example_type","start_date_local":"example_start_date_local","elapsed_time":1,"description":"example_description","distance":1,"trainer":1,"commute":1}' --json kosmo integrations:strava strava_create_activity '{"name":"example_name","type":"example_type","start_date_local":"example_start_date_local","elapsed_time":1,"description":"example_description","distance":1,"trainer":1,"commute":1}' --json strava.strava_update_activity
Update editable fields on a Strava activity, such as name, type, sport_type, description, commute, trainer, or privacy.
write - Parameters
- activity_id, payload
kosmo integrations:call strava.strava_update_activity '{"activity_id":1,"payload":"example_payload"}' --json kosmo integrations:strava strava_update_activity '{"activity_id":1,"payload":"example_payload"}' --json strava.strava_get_activity_streams
Get activity stream data such as time, distance, latlng, altitude, velocity_smooth, heartrate, cadence, watts, temp, moving, or grade_smooth.
read - Parameters
- activity_id, keys, resolution, series_type
kosmo integrations:call strava.strava_get_activity_streams '{"activity_id":1,"keys":"example_keys","resolution":"example_resolution","series_type":"example_series_type"}' --json kosmo integrations:strava strava_get_activity_streams '{"activity_id":1,"keys":"example_keys","resolution":"example_resolution","series_type":"example_series_type"}' --json strava.strava_list_activity_laps
List laps for a Strava activity.
read - Parameters
- activity_id
kosmo integrations:call strava.strava_list_activity_laps '{"activity_id":1}' --json kosmo integrations:strava strava_list_activity_laps '{"activity_id":1}' --json strava.strava_get_activity_zones
Get heart rate and power zone distribution for a Strava activity when available.
read - Parameters
- activity_id
kosmo integrations:call strava.strava_get_activity_zones '{"activity_id":1}' --json kosmo integrations:strava strava_get_activity_zones '{"activity_id":1}' --json strava.strava_upload_activity
Upload a FIT, TCX, or GPX file to create a Strava activity for asynchronous processing.
write - Parameters
- file_path, data_type, name, description, trainer, commute, external_id
kosmo integrations:call strava.strava_upload_activity '{"file_path":"example_file_path","data_type":"example_data_type","name":"example_name","description":"example_description","trainer":1,"commute":1,"external_id":"example_external_id"}' --json kosmo integrations:strava strava_upload_activity '{"file_path":"example_file_path","data_type":"example_data_type","name":"example_name","description":"example_description","trainer":1,"commute":1,"external_id":"example_external_id"}' --json strava.strava_get_upload
Get processing status for a Strava activity upload.
read - Parameters
- upload_id
kosmo integrations:call strava.strava_get_upload '{"upload_id":1}' --json kosmo integrations:strava strava_get_upload '{"upload_id":1}' --json strava.strava_list_clubs
List clubs the authenticated Strava athlete belongs to. Returns club names, member counts, and sport types.
read - Parameters
- page, per_page
kosmo integrations:call strava.strava_list_clubs '{"page":1,"per_page":1}' --json kosmo integrations:strava strava_list_clubs '{"page":1,"per_page":1}' --json strava.strava_get_club
Get details about a specific Strava club, including name, description, member count, and sport types.
read - Parameters
- club_id
kosmo integrations:call strava.strava_get_club '{"club_id":1}' --json kosmo integrations:strava strava_get_club '{"club_id":1}' --json strava.strava_list_club_activities
List recent activities from members of a Strava club the authenticated athlete belongs to.
read - Parameters
- club_id, page, per_page
kosmo integrations:call strava.strava_list_club_activities '{"club_id":1,"page":1,"per_page":1}' --json kosmo integrations:strava strava_list_club_activities '{"club_id":1,"page":1,"per_page":1}' --json strava.strava_list_club_members
List athletes who are members of a Strava club.
read - Parameters
- club_id, page, per_page
kosmo integrations:call strava.strava_list_club_members '{"club_id":1,"page":1,"per_page":1}' --json kosmo integrations:strava strava_list_club_members '{"club_id":1,"page":1,"per_page":1}' --json strava.strava_list_routes
List routes created by a specific Strava athlete. Requires the athlete ID.
read - Parameters
- athlete_id, page, per_page
kosmo integrations:call strava.strava_list_routes '{"athlete_id":1,"page":1,"per_page":1}' --json kosmo integrations:strava strava_list_routes '{"athlete_id":1,"page":1,"per_page":1}' --json strava.strava_get_route
Get details for a Strava route by ID.
read - Parameters
- route_id
kosmo integrations:call strava.strava_get_route '{"route_id":1}' --json kosmo integrations:strava strava_get_route '{"route_id":1}' --json strava.strava_export_route
Export a Strava route as GPX or TCX.
read - Parameters
- route_id, format
kosmo integrations:call strava.strava_export_route '{"route_id":1,"format":"example_format"}' --json kosmo integrations:strava strava_export_route '{"route_id":1,"format":"example_format"}' --json strava.strava_get_route_streams
Get route stream coordinates and elevation data for a Strava route.
read - Parameters
- route_id
kosmo integrations:call strava.strava_get_route_streams '{"route_id":1}' --json kosmo integrations:strava strava_get_route_streams '{"route_id":1}' --json strava.strava_list_starred_segments
List starred segments for the authenticated Strava athlete.
read - Parameters
- page, per_page
kosmo integrations:call strava.strava_list_starred_segments '{"page":1,"per_page":1}' --json kosmo integrations:strava strava_list_starred_segments '{"page":1,"per_page":1}' --json strava.strava_get_segment
Get details for a Strava segment by ID.
read - Parameters
- segment_id
kosmo integrations:call strava.strava_get_segment '{"segment_id":1}' --json kosmo integrations:strava strava_get_segment '{"segment_id":1}' --json strava.strava_star_segment
Star or unstar a Strava segment for the authenticated athlete.
write - Parameters
- segment_id, starred
kosmo integrations:call strava.strava_star_segment '{"segment_id":1,"starred":true}' --json kosmo integrations:strava strava_star_segment '{"segment_id":1,"starred":true}' --json strava.strava_explore_segments
Explore top Strava segments in a bounding box.
read - Parameters
- bounds, activity_type, min_cat, max_cat
kosmo integrations:call strava.strava_explore_segments '{"bounds":"example_bounds","activity_type":"example_activity_type","min_cat":1,"max_cat":1}' --json kosmo integrations:strava strava_explore_segments '{"bounds":"example_bounds","activity_type":"example_activity_type","min_cat":1,"max_cat":1}' --json strava.strava_list_segment_efforts
List efforts for the authenticated athlete on a Strava segment.
read - Parameters
- segment_id, start_date_local, end_date_local, page, per_page
kosmo integrations:call strava.strava_list_segment_efforts '{"segment_id":1,"start_date_local":"example_start_date_local","end_date_local":"example_end_date_local","page":1,"per_page":1}' --json kosmo integrations:strava strava_list_segment_efforts '{"segment_id":1,"start_date_local":"example_start_date_local","end_date_local":"example_end_date_local","page":1,"per_page":1}' --json strava.strava_get_segment_effort
Get a Strava segment effort by ID.
read - Parameters
- effort_id
kosmo integrations:call strava.strava_get_segment_effort '{"effort_id":1}' --json kosmo integrations:strava strava_get_segment_effort '{"effort_id":1}' --json strava.strava_get_segment_streams
Get stream data for a Strava segment.
read - Parameters
- segment_id, keys, resolution, series_type
kosmo integrations:call strava.strava_get_segment_streams '{"segment_id":1,"keys":"example_keys","resolution":"example_resolution","series_type":"example_series_type"}' --json kosmo integrations:strava strava_get_segment_streams '{"segment_id":1,"keys":"example_keys","resolution":"example_resolution","series_type":"example_series_type"}' --json strava.strava_api_get
Call a relative Strava API GET path, such as "/athlete". Absolute URLs are rejected.
read - Parameters
- path, params
kosmo integrations:call strava.strava_api_get '{"path":"example_path","params":"example_params"}' --json kosmo integrations:strava strava_api_get '{"path":"example_path","params":"example_params"}' --json strava.strava_api_post
Call a relative Strava API POST path. Absolute URLs are rejected.
write - Parameters
- path, payload
kosmo integrations:call strava.strava_api_post '{"path":"example_path","payload":"example_payload"}' --json kosmo integrations:strava strava_api_post '{"path":"example_path","payload":"example_payload"}' --json strava.strava_api_put
Call a relative Strava API PUT path. Absolute URLs are rejected.
write - Parameters
- path, payload
kosmo integrations:call strava.strava_api_put '{"path":"example_path","payload":"example_payload"}' --json kosmo integrations:strava strava_api_put '{"path":"example_path","payload":"example_payload"}' --json strava.strava_api_delete
Call a relative Strava API DELETE path. Absolute URLs are rejected.
write - Parameters
- path, payload
kosmo integrations:call strava.strava_api_delete '{"path":"example_path","payload":"example_payload"}' --json kosmo integrations:strava strava_api_delete '{"path":"example_path","payload":"example_payload"}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
strava.strava_get_athlete 0 parameters
kosmo integrations:schema strava.strava_get_athlete --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
strava.strava_get_current_user 0 parameters
kosmo integrations:schema strava.strava_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
strava.strava_get_athlete_stats 1 parameters
kosmo integrations:schema strava.strava_get_athlete_stats --json | Parameter | Type | Required | Description |
|---|---|---|---|
athlete_id | integer | yes | Athlete ID. |
strava.strava_get_athlete_zones 0 parameters
kosmo integrations:schema strava.strava_get_athlete_zones --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
strava.strava_list_activities 4 parameters
kosmo integrations:schema strava.strava_list_activities --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default: 1). |
per_page | integer | no | Number of activities per page (default: 30, max: 200). |
before | integer | no | Unix timestamp for activities before this time. |
after | integer | no | Unix timestamp for activities after this time. |
strava.strava_get_activity 1 parameters
kosmo integrations:schema strava.strava_get_activity --json | Parameter | Type | Required | Description |
|---|---|---|---|
activity_id | integer | yes | The ID of the activity to retrieve. |
strava.strava_create_activity 8 parameters
kosmo integrations:schema strava.strava_create_activity --json | Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name of the activity (e.g., "Morning Run"). |
type | string | yes | Activity type: Run, Ride, Swim, Hike, Walk, Workout, WeightTraining, Yoga, etc. |
start_date_local | string | yes | ISO 8601 local start date and time (e.g., "2025-01-15T09:30:00"). |
elapsed_time | integer | yes | Elapsed time in seconds. |
description | string | no | Description of the activity. |
distance | number | no | Distance in meters. |
trainer | integer | no | Set to 1 if this is a trainer/trainer ride activity. |
commute | integer | no | Set to 1 if this is a commute activity. |
strava.strava_update_activity 2 parameters
kosmo integrations:schema strava.strava_update_activity --json | Parameter | Type | Required | Description |
|---|---|---|---|
activity_id | integer | yes | Activity ID. |
payload | object | yes | Official activity update payload. |
strava.strava_get_activity_streams 4 parameters
kosmo integrations:schema strava.strava_get_activity_streams --json | Parameter | Type | Required | Description |
|---|---|---|---|
activity_id | integer | yes | Activity ID. |
keys | array | yes | Stream keys to request. |
resolution | string | no | Optional stream resolution. |
series_type | string | no | Optional series type. |
strava.strava_list_activity_laps 1 parameters
kosmo integrations:schema strava.strava_list_activity_laps --json | Parameter | Type | Required | Description |
|---|---|---|---|
activity_id | integer | yes | Activity ID. |
strava.strava_get_activity_zones 1 parameters
kosmo integrations:schema strava.strava_get_activity_zones --json | Parameter | Type | Required | Description |
|---|---|---|---|
activity_id | integer | yes | Activity ID. |
strava.strava_upload_activity 7 parameters
kosmo integrations:schema strava.strava_upload_activity --json | Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | yes | Absolute path to the activity file. |
data_type | string | yes | Upload file type. |
name | string | no | Optional activity name. |
description | string | no | Optional activity description. |
trainer | integer | no | Set to 1 for trainer activity. |
commute | integer | no | Set to 1 for commute activity. |
external_id | string | no | Optional unique external ID. |
strava.strava_get_upload 1 parameters
kosmo integrations:schema strava.strava_get_upload --json | Parameter | Type | Required | Description |
|---|---|---|---|
upload_id | integer | yes | Upload ID. |
strava.strava_list_clubs 2 parameters
kosmo integrations:schema strava.strava_list_clubs --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default: 1). |
per_page | integer | no | Number of clubs per page (default: 30). |
strava.strava_get_club 1 parameters
kosmo integrations:schema strava.strava_get_club --json | Parameter | Type | Required | Description |
|---|---|---|---|
club_id | integer | yes | The club ID. |
strava.strava_list_club_activities 3 parameters
kosmo integrations:schema strava.strava_list_club_activities --json | Parameter | Type | Required | Description |
|---|---|---|---|
club_id | integer | yes | Club ID. |
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
strava.strava_list_club_members 3 parameters
kosmo integrations:schema strava.strava_list_club_members --json | Parameter | Type | Required | Description |
|---|---|---|---|
club_id | integer | yes | Club ID. |
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
strava.strava_list_routes 3 parameters
kosmo integrations:schema strava.strava_list_routes --json | Parameter | Type | Required | Description |
|---|---|---|---|
athlete_id | integer | yes | The athlete ID whose routes to list. |
page | integer | no | Page number (default: 1). |
per_page | integer | no | Number of routes per page (default: 30). |
strava.strava_get_route 1 parameters
kosmo integrations:schema strava.strava_get_route --json | Parameter | Type | Required | Description |
|---|---|---|---|
route_id | integer | yes | Route ID. |
strava.strava_export_route 2 parameters
kosmo integrations:schema strava.strava_export_route --json | Parameter | Type | Required | Description |
|---|---|---|---|
route_id | integer | yes | Route ID. |
format | string | yes | Export format. |
strava.strava_get_route_streams 1 parameters
kosmo integrations:schema strava.strava_get_route_streams --json | Parameter | Type | Required | Description |
|---|---|---|---|
route_id | integer | yes | Route ID. |
strava.strava_list_starred_segments 2 parameters
kosmo integrations:schema strava.strava_list_starred_segments --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
strava.strava_get_segment 1 parameters
kosmo integrations:schema strava.strava_get_segment --json | Parameter | Type | Required | Description |
|---|---|---|---|
segment_id | integer | yes | Segment ID. |
strava.strava_star_segment 2 parameters
kosmo integrations:schema strava.strava_star_segment --json | Parameter | Type | Required | Description |
|---|---|---|---|
segment_id | integer | yes | Segment ID. |
starred | boolean | yes | Whether the segment should be starred. |
strava.strava_explore_segments 4 parameters
kosmo integrations:schema strava.strava_explore_segments --json | Parameter | Type | Required | Description |
|---|---|---|---|
bounds | array | yes | Bounding box as southwest lat/lng and northeast lat/lng: [sw_lat, sw_lng, ne_lat, ne_lng]. |
activity_type | string | no | Segment activity type. |
min_cat | integer | no | Minimum climb category. |
max_cat | integer | no | Maximum climb category. |
strava.strava_list_segment_efforts 5 parameters
kosmo integrations:schema strava.strava_list_segment_efforts --json | Parameter | Type | Required | Description |
|---|---|---|---|
segment_id | integer | yes | Segment ID. |
start_date_local | string | no | Start date filter. |
end_date_local | string | no | End date filter. |
page | integer | no | Page number. |
per_page | integer | no | Items per page. |
strava.strava_get_segment_effort 1 parameters
kosmo integrations:schema strava.strava_get_segment_effort --json | Parameter | Type | Required | Description |
|---|---|---|---|
effort_id | integer | yes | Segment effort ID. |
strava.strava_get_segment_streams 4 parameters
kosmo integrations:schema strava.strava_get_segment_streams --json | Parameter | Type | Required | Description |
|---|---|---|---|
segment_id | integer | yes | Segment ID. |
keys | array | yes | Stream keys to request. |
resolution | string | no | Optional stream resolution. |
series_type | string | no | Optional series type. |
strava.strava_api_get 2 parameters
kosmo integrations:schema strava.strava_api_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Strava API path. |
params | object | no | Query parameters. |
strava.strava_api_post 2 parameters
kosmo integrations:schema strava.strava_api_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Strava API path. |
payload | object | no | JSON body. |
strava.strava_api_put 2 parameters
kosmo integrations:schema strava.strava_api_put --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Strava API path. |
payload | object | no | JSON body. |
strava.strava_api_delete 2 parameters
kosmo integrations:schema strava.strava_api_delete --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Strava API path. |
payload | object | no | Optional JSON body. |
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.