KosmoKrator

data

AfterShip CLI for AI Agents

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

AfterShip CLI Setup

AfterShip can be configured headlessly with `kosmokrator integrations:configure aftership`.

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 aftership --set api_key="$AFTERSHIP_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor aftership --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key AFTERSHIP_API_KEY Secret secret yes API Key

Command Patterns

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

Generic CLI call
kosmo integrations:call aftership.aftership_list_trackings '{}' --json
Provider shortcut
kosmo integrations:aftership aftership_list_trackings '{}' --json

Discovery

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

Discovery commands
kosmo integrations:docs aftership --json
kosmo integrations:docs aftership.aftership_list_trackings --json
kosmo integrations:schema aftership.aftership_list_trackings --json
kosmo integrations:search "AfterShip" --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.

aftership.aftership_list_trackings

List shipment trackings with filters and pagination.

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

aftership.aftership_create_tracking

Create a shipment tracking.

Write write
Parameters
none
Generic call
kosmo integrations:call aftership.aftership_create_tracking '{}' --json
Shortcut
kosmo integrations:aftership aftership_create_tracking '{}' --json

aftership.aftership_get_tracking

Get a tracking by ID.

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

aftership.aftership_update_tracking

Update a tracking by ID.

Write write
Parameters
none
Generic call
kosmo integrations:call aftership.aftership_update_tracking '{}' --json
Shortcut
kosmo integrations:aftership aftership_update_tracking '{}' --json

aftership.aftership_delete_tracking

Delete a tracking by ID.

Write write
Parameters
none
Generic call
kosmo integrations:call aftership.aftership_delete_tracking '{}' --json
Shortcut
kosmo integrations:aftership aftership_delete_tracking '{}' --json

aftership.aftership_retrack_tracking

Retrack an expired tracking by ID.

Write write
Parameters
none
Generic call
kosmo integrations:call aftership.aftership_retrack_tracking '{}' --json
Shortcut
kosmo integrations:aftership aftership_retrack_tracking '{}' --json

aftership.aftership_mark_tracking_completed

Mark a tracking as completed by ID.

Write write
Parameters
none
Generic call
kosmo integrations:call aftership.aftership_mark_tracking_completed '{}' --json
Shortcut
kosmo integrations:aftership aftership_mark_tracking_completed '{}' --json

aftership.aftership_list_couriers

List supported couriers.

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

aftership.aftership_detect_courier

Detect courier candidates for a tracking number.

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

aftership.aftership_list_courier_connections

List courier connections.

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

aftership.aftership_create_courier_connections

Create courier connections.

Write write
Parameters
none
Generic call
kosmo integrations:call aftership.aftership_create_courier_connections '{}' --json
Shortcut
kosmo integrations:aftership aftership_create_courier_connections '{}' --json

aftership.aftership_get_courier_connection

Get a courier connection by ID.

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

aftership.aftership_update_courier_connection

Update a courier connection by ID.

Write write
Parameters
none
Generic call
kosmo integrations:call aftership.aftership_update_courier_connection '{}' --json
Shortcut
kosmo integrations:aftership aftership_update_courier_connection '{}' --json

aftership.aftership_delete_courier_connection

Delete a courier connection by ID.

Write write
Parameters
none
Generic call
kosmo integrations:call aftership.aftership_delete_courier_connection '{}' --json
Shortcut
kosmo integrations:aftership aftership_delete_courier_connection '{}' --json

aftership.aftership_predict_estimated_delivery_date

Predict estimated delivery date for one shipment.

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

aftership.aftership_batch_predict_estimated_delivery_date

Predict estimated delivery dates for multiple shipments.

Read read
Parameters
shipments, raw
Generic call
kosmo integrations:call aftership.aftership_batch_predict_estimated_delivery_date '{"shipments":"example_shipments","raw":"example_raw"}' --json
Shortcut
kosmo integrations:aftership aftership_batch_predict_estimated_delivery_date '{"shipments":"example_shipments","raw":"example_raw"}' --json

Function Schemas

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

aftership.aftership_list_trackings 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_list_trackings --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_create_tracking 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_create_tracking --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_get_tracking 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_get_tracking --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_update_tracking 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_update_tracking --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_delete_tracking 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_delete_tracking --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_retrack_tracking 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_retrack_tracking --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_mark_tracking_completed 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_mark_tracking_completed --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_list_couriers 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_list_couriers --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_detect_courier 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_detect_courier --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_list_courier_connections 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_list_courier_connections --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_create_courier_connections 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_create_courier_connections --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_get_courier_connection 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_get_courier_connection --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_update_courier_connection 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_update_courier_connection --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_delete_courier_connection 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_delete_courier_connection --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_predict_estimated_delivery_date 0 parameters
Schema command
kosmo integrations:schema aftership.aftership_predict_estimated_delivery_date --json
ParameterTypeRequiredDescription
No parameters.
aftership.aftership_batch_predict_estimated_delivery_date 2 parameters
Schema command
kosmo integrations:schema aftership.aftership_batch_predict_estimated_delivery_date --json
ParameterTypeRequiredDescription
shipments array no Batch shipment prediction payload.
raw object no Full batch prediction payload.

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.