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 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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
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.
kosmo integrations:call aftership.aftership_list_trackings '{}' --json 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.
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 - Parameters
- none
kosmo integrations:call aftership.aftership_list_trackings '{}' --json kosmo integrations:aftership aftership_list_trackings '{}' --json aftership.aftership_create_tracking
Create a shipment tracking.
write - Parameters
- none
kosmo integrations:call aftership.aftership_create_tracking '{}' --json kosmo integrations:aftership aftership_create_tracking '{}' --json aftership.aftership_get_tracking
Get a tracking by ID.
read - Parameters
- none
kosmo integrations:call aftership.aftership_get_tracking '{}' --json kosmo integrations:aftership aftership_get_tracking '{}' --json aftership.aftership_update_tracking
Update a tracking by ID.
write - Parameters
- none
kosmo integrations:call aftership.aftership_update_tracking '{}' --json kosmo integrations:aftership aftership_update_tracking '{}' --json aftership.aftership_delete_tracking
Delete a tracking by ID.
write - Parameters
- none
kosmo integrations:call aftership.aftership_delete_tracking '{}' --json kosmo integrations:aftership aftership_delete_tracking '{}' --json aftership.aftership_retrack_tracking
Retrack an expired tracking by ID.
write - Parameters
- none
kosmo integrations:call aftership.aftership_retrack_tracking '{}' --json kosmo integrations:aftership aftership_retrack_tracking '{}' --json aftership.aftership_mark_tracking_completed
Mark a tracking as completed by ID.
write - Parameters
- none
kosmo integrations:call aftership.aftership_mark_tracking_completed '{}' --json kosmo integrations:aftership aftership_mark_tracking_completed '{}' --json aftership.aftership_list_couriers
List supported couriers.
read - Parameters
- none
kosmo integrations:call aftership.aftership_list_couriers '{}' --json kosmo integrations:aftership aftership_list_couriers '{}' --json aftership.aftership_detect_courier
Detect courier candidates for a tracking number.
read - Parameters
- none
kosmo integrations:call aftership.aftership_detect_courier '{}' --json kosmo integrations:aftership aftership_detect_courier '{}' --json aftership.aftership_list_courier_connections
List courier connections.
read - Parameters
- none
kosmo integrations:call aftership.aftership_list_courier_connections '{}' --json kosmo integrations:aftership aftership_list_courier_connections '{}' --json aftership.aftership_create_courier_connections
Create courier connections.
write - Parameters
- none
kosmo integrations:call aftership.aftership_create_courier_connections '{}' --json kosmo integrations:aftership aftership_create_courier_connections '{}' --json aftership.aftership_get_courier_connection
Get a courier connection by ID.
read - Parameters
- none
kosmo integrations:call aftership.aftership_get_courier_connection '{}' --json kosmo integrations:aftership aftership_get_courier_connection '{}' --json aftership.aftership_update_courier_connection
Update a courier connection by ID.
write - Parameters
- none
kosmo integrations:call aftership.aftership_update_courier_connection '{}' --json kosmo integrations:aftership aftership_update_courier_connection '{}' --json aftership.aftership_delete_courier_connection
Delete a courier connection by ID.
write - Parameters
- none
kosmo integrations:call aftership.aftership_delete_courier_connection '{}' --json kosmo integrations:aftership aftership_delete_courier_connection '{}' --json aftership.aftership_predict_estimated_delivery_date
Predict estimated delivery date for one shipment.
read - Parameters
- none
kosmo integrations:call aftership.aftership_predict_estimated_delivery_date '{}' --json kosmo integrations:aftership aftership_predict_estimated_delivery_date '{}' --json aftership.aftership_batch_predict_estimated_delivery_date
Predict estimated delivery dates for multiple shipments.
read - Parameters
- shipments, raw
kosmo integrations:call aftership.aftership_batch_predict_estimated_delivery_date '{"shipments":"example_shipments","raw":"example_raw"}' --json 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
kosmo integrations:schema aftership.aftership_list_trackings --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_create_tracking 0 parameters
kosmo integrations:schema aftership.aftership_create_tracking --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_get_tracking 0 parameters
kosmo integrations:schema aftership.aftership_get_tracking --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_update_tracking 0 parameters
kosmo integrations:schema aftership.aftership_update_tracking --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_delete_tracking 0 parameters
kosmo integrations:schema aftership.aftership_delete_tracking --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_retrack_tracking 0 parameters
kosmo integrations:schema aftership.aftership_retrack_tracking --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_mark_tracking_completed 0 parameters
kosmo integrations:schema aftership.aftership_mark_tracking_completed --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_list_couriers 0 parameters
kosmo integrations:schema aftership.aftership_list_couriers --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_detect_courier 0 parameters
kosmo integrations:schema aftership.aftership_detect_courier --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_list_courier_connections 0 parameters
kosmo integrations:schema aftership.aftership_list_courier_connections --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_create_courier_connections 0 parameters
kosmo integrations:schema aftership.aftership_create_courier_connections --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_get_courier_connection 0 parameters
kosmo integrations:schema aftership.aftership_get_courier_connection --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_update_courier_connection 0 parameters
kosmo integrations:schema aftership.aftership_update_courier_connection --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_delete_courier_connection 0 parameters
kosmo integrations:schema aftership.aftership_delete_courier_connection --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_predict_estimated_delivery_date 0 parameters
kosmo integrations:schema aftership.aftership_predict_estimated_delivery_date --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
aftership.aftership_batch_predict_estimated_delivery_date 2 parameters
kosmo integrations:schema aftership.aftership_batch_predict_estimated_delivery_date --json | Parameter | Type | Required | Description |
|---|---|---|---|
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.