KosmoKrator

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, 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 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.

KeyEnv varTypeRequiredLabel
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.

Generic CLI call
kosmo integrations:call strava.strava_get_athlete '{}' --json
Provider shortcut
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.

Discovery commands
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 read
Parameters
none
Generic call
kosmo integrations:call strava.strava_get_athlete '{}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call strava.strava_get_current_user '{}' --json
Shortcut
kosmo integrations:strava strava_get_current_user '{}' --json

strava.strava_get_athlete_stats

Get activity totals and recent statistics for a Strava athlete.

Read read
Parameters
athlete_id
Generic call
kosmo integrations:call strava.strava_get_athlete_stats '{"athlete_id":1}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call strava.strava_get_athlete_zones '{}' --json
Shortcut
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 read
Parameters
page, per_page, before, after
Generic call
kosmo integrations:call strava.strava_list_activities '{"page":1,"per_page":1,"before":1,"after":1}' --json
Shortcut
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 read
Parameters
activity_id
Generic call
kosmo integrations:call strava.strava_get_activity '{"activity_id":1}' --json
Shortcut
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 write
Parameters
name, type, start_date_local, elapsed_time, description, distance, trainer, commute
Generic call
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
Shortcut
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 write
Parameters
activity_id, payload
Generic call
kosmo integrations:call strava.strava_update_activity '{"activity_id":1,"payload":"example_payload"}' --json
Shortcut
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 read
Parameters
activity_id, keys, resolution, series_type
Generic call
kosmo integrations:call strava.strava_get_activity_streams '{"activity_id":1,"keys":"example_keys","resolution":"example_resolution","series_type":"example_series_type"}' --json
Shortcut
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 read
Parameters
activity_id
Generic call
kosmo integrations:call strava.strava_list_activity_laps '{"activity_id":1}' --json
Shortcut
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 read
Parameters
activity_id
Generic call
kosmo integrations:call strava.strava_get_activity_zones '{"activity_id":1}' --json
Shortcut
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 write
Parameters
file_path, data_type, name, description, trainer, commute, external_id
Generic call
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
Shortcut
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 read
Parameters
upload_id
Generic call
kosmo integrations:call strava.strava_get_upload '{"upload_id":1}' --json
Shortcut
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 read
Parameters
page, per_page
Generic call
kosmo integrations:call strava.strava_list_clubs '{"page":1,"per_page":1}' --json
Shortcut
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 read
Parameters
club_id
Generic call
kosmo integrations:call strava.strava_get_club '{"club_id":1}' --json
Shortcut
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 read
Parameters
club_id, page, per_page
Generic call
kosmo integrations:call strava.strava_list_club_activities '{"club_id":1,"page":1,"per_page":1}' --json
Shortcut
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 read
Parameters
club_id, page, per_page
Generic call
kosmo integrations:call strava.strava_list_club_members '{"club_id":1,"page":1,"per_page":1}' --json
Shortcut
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 read
Parameters
athlete_id, page, per_page
Generic call
kosmo integrations:call strava.strava_list_routes '{"athlete_id":1,"page":1,"per_page":1}' --json
Shortcut
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 read
Parameters
route_id
Generic call
kosmo integrations:call strava.strava_get_route '{"route_id":1}' --json
Shortcut
kosmo integrations:strava strava_get_route '{"route_id":1}' --json

strava.strava_export_route

Export a Strava route as GPX or TCX.

Read read
Parameters
route_id, format
Generic call
kosmo integrations:call strava.strava_export_route '{"route_id":1,"format":"example_format"}' --json
Shortcut
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 read
Parameters
route_id
Generic call
kosmo integrations:call strava.strava_get_route_streams '{"route_id":1}' --json
Shortcut
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 read
Parameters
page, per_page
Generic call
kosmo integrations:call strava.strava_list_starred_segments '{"page":1,"per_page":1}' --json
Shortcut
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 read
Parameters
segment_id
Generic call
kosmo integrations:call strava.strava_get_segment '{"segment_id":1}' --json
Shortcut
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 write
Parameters
segment_id, starred
Generic call
kosmo integrations:call strava.strava_star_segment '{"segment_id":1,"starred":true}' --json
Shortcut
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 read
Parameters
bounds, activity_type, min_cat, max_cat
Generic call
kosmo integrations:call strava.strava_explore_segments '{"bounds":"example_bounds","activity_type":"example_activity_type","min_cat":1,"max_cat":1}' --json
Shortcut
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 read
Parameters
segment_id, start_date_local, end_date_local, page, per_page
Generic call
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
Shortcut
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 read
Parameters
effort_id
Generic call
kosmo integrations:call strava.strava_get_segment_effort '{"effort_id":1}' --json
Shortcut
kosmo integrations:strava strava_get_segment_effort '{"effort_id":1}' --json

strava.strava_get_segment_streams

Get stream data for a Strava segment.

Read read
Parameters
segment_id, keys, resolution, series_type
Generic call
kosmo integrations:call strava.strava_get_segment_streams '{"segment_id":1,"keys":"example_keys","resolution":"example_resolution","series_type":"example_series_type"}' --json
Shortcut
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 read
Parameters
path, params
Generic call
kosmo integrations:call strava.strava_api_get '{"path":"example_path","params":"example_params"}' --json
Shortcut
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 write
Parameters
path, payload
Generic call
kosmo integrations:call strava.strava_api_post '{"path":"example_path","payload":"example_payload"}' --json
Shortcut
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 write
Parameters
path, payload
Generic call
kosmo integrations:call strava.strava_api_put '{"path":"example_path","payload":"example_payload"}' --json
Shortcut
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 write
Parameters
path, payload
Generic call
kosmo integrations:call strava.strava_api_delete '{"path":"example_path","payload":"example_payload"}' --json
Shortcut
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
Schema command
kosmo integrations:schema strava.strava_get_athlete --json
ParameterTypeRequiredDescription
No parameters.
strava.strava_get_current_user 0 parameters
Schema command
kosmo integrations:schema strava.strava_get_current_user --json
ParameterTypeRequiredDescription
No parameters.
strava.strava_get_athlete_stats 1 parameters
Schema command
kosmo integrations:schema strava.strava_get_athlete_stats --json
ParameterTypeRequiredDescription
athlete_id integer yes Athlete ID.
strava.strava_get_athlete_zones 0 parameters
Schema command
kosmo integrations:schema strava.strava_get_athlete_zones --json
ParameterTypeRequiredDescription
No parameters.
strava.strava_list_activities 4 parameters
Schema command
kosmo integrations:schema strava.strava_list_activities --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema strava.strava_get_activity --json
ParameterTypeRequiredDescription
activity_id integer yes The ID of the activity to retrieve.
strava.strava_create_activity 8 parameters
Schema command
kosmo integrations:schema strava.strava_create_activity --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema strava.strava_update_activity --json
ParameterTypeRequiredDescription
activity_id integer yes Activity ID.
payload object yes Official activity update payload.
strava.strava_get_activity_streams 4 parameters
Schema command
kosmo integrations:schema strava.strava_get_activity_streams --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema strava.strava_list_activity_laps --json
ParameterTypeRequiredDescription
activity_id integer yes Activity ID.
strava.strava_get_activity_zones 1 parameters
Schema command
kosmo integrations:schema strava.strava_get_activity_zones --json
ParameterTypeRequiredDescription
activity_id integer yes Activity ID.
strava.strava_upload_activity 7 parameters
Schema command
kosmo integrations:schema strava.strava_upload_activity --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema strava.strava_get_upload --json
ParameterTypeRequiredDescription
upload_id integer yes Upload ID.
strava.strava_list_clubs 2 parameters
Schema command
kosmo integrations:schema strava.strava_list_clubs --json
ParameterTypeRequiredDescription
page integer no Page number (default: 1).
per_page integer no Number of clubs per page (default: 30).
strava.strava_get_club 1 parameters
Schema command
kosmo integrations:schema strava.strava_get_club --json
ParameterTypeRequiredDescription
club_id integer yes The club ID.
strava.strava_list_club_activities 3 parameters
Schema command
kosmo integrations:schema strava.strava_list_club_activities --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema strava.strava_list_club_members --json
ParameterTypeRequiredDescription
club_id integer yes Club ID.
page integer no Page number.
per_page integer no Items per page.
strava.strava_list_routes 3 parameters
Schema command
kosmo integrations:schema strava.strava_list_routes --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema strava.strava_get_route --json
ParameterTypeRequiredDescription
route_id integer yes Route ID.
strava.strava_export_route 2 parameters
Schema command
kosmo integrations:schema strava.strava_export_route --json
ParameterTypeRequiredDescription
route_id integer yes Route ID.
format string yes Export format.
strava.strava_get_route_streams 1 parameters
Schema command
kosmo integrations:schema strava.strava_get_route_streams --json
ParameterTypeRequiredDescription
route_id integer yes Route ID.
strava.strava_list_starred_segments 2 parameters
Schema command
kosmo integrations:schema strava.strava_list_starred_segments --json
ParameterTypeRequiredDescription
page integer no Page number.
per_page integer no Items per page.
strava.strava_get_segment 1 parameters
Schema command
kosmo integrations:schema strava.strava_get_segment --json
ParameterTypeRequiredDescription
segment_id integer yes Segment ID.
strava.strava_star_segment 2 parameters
Schema command
kosmo integrations:schema strava.strava_star_segment --json
ParameterTypeRequiredDescription
segment_id integer yes Segment ID.
starred boolean yes Whether the segment should be starred.
strava.strava_explore_segments 4 parameters
Schema command
kosmo integrations:schema strava.strava_explore_segments --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema strava.strava_list_segment_efforts --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema strava.strava_get_segment_effort --json
ParameterTypeRequiredDescription
effort_id integer yes Segment effort ID.
strava.strava_get_segment_streams 4 parameters
Schema command
kosmo integrations:schema strava.strava_get_segment_streams --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema strava.strava_api_get --json
ParameterTypeRequiredDescription
path string yes Relative Strava API path.
params object no Query parameters.
strava.strava_api_post 2 parameters
Schema command
kosmo integrations:schema strava.strava_api_post --json
ParameterTypeRequiredDescription
path string yes Relative Strava API path.
payload object no JSON body.
strava.strava_api_put 2 parameters
Schema command
kosmo integrations:schema strava.strava_api_put --json
ParameterTypeRequiredDescription
path string yes Relative Strava API path.
payload object no JSON body.
strava.strava_api_delete 2 parameters
Schema command
kosmo integrations:schema strava.strava_api_delete --json
ParameterTypeRequiredDescription
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.