data
REST Countries CLI for AI Agents
Use the REST Countries CLI from KosmoKrator to call REST Countries tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.REST Countries CLI Setup
REST Countries can be configured headlessly with `kosmokrator integrations:configure rest-countries`.
# 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 rest-countries --enable --read allow --write ask --json
kosmokrator integrations:doctor rest-countries --json
kosmokrator integrations:status --json Credentials
Authentication type: No credentials none. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
No credentials are required.
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call rest-countries.rest_countries_all '{}' --json kosmo integrations:rest-countries rest_countries_all '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs rest-countries --json
kosmo integrations:docs rest-countries.rest_countries_all --json
kosmo integrations:schema rest-countries.rest_countries_all --json
kosmo integrations:search "REST Countries" --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.
rest-countries.rest_countries_all
Retrieve all countries with selected fields.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_all '{}' --json kosmo integrations:rest-countries rest_countries_all '{}' --json rest-countries.rest_countries_name
Search countries by common or official name.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_name '{}' --json kosmo integrations:rest-countries rest_countries_name '{}' --json rest-countries.rest_countries_alpha
Retrieve one country by alpha, numeric, or IOC code.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_alpha '{}' --json kosmo integrations:rest-countries rest_countries_alpha '{}' --json rest-countries.rest_countries_alpha_codes
Retrieve multiple countries by code list.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_alpha_codes '{}' --json kosmo integrations:rest-countries rest_countries_alpha_codes '{}' --json rest-countries.rest_countries_currency
Search countries by currency code or name.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_currency '{}' --json kosmo integrations:rest-countries rest_countries_currency '{}' --json rest-countries.rest_countries_language
Search countries by language code or name.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_language '{}' --json kosmo integrations:rest-countries rest_countries_language '{}' --json rest-countries.rest_countries_capital
Search countries by capital city.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_capital '{}' --json kosmo integrations:rest-countries rest_countries_capital '{}' --json rest-countries.rest_countries_region
Filter countries by region.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_region '{}' --json kosmo integrations:rest-countries rest_countries_region '{}' --json rest-countries.rest_countries_subregion
Filter countries by subregion.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_subregion '{}' --json kosmo integrations:rest-countries rest_countries_subregion '{}' --json rest-countries.rest_countries_demonym
Search countries by demonym.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_demonym '{}' --json kosmo integrations:rest-countries rest_countries_demonym '{}' --json rest-countries.rest_countries_translation
Search countries by translated country name.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_translation '{}' --json kosmo integrations:rest-countries rest_countries_translation '{}' --json rest-countries.rest_countries_independent
List independent or non-independent countries.
read - Parameters
- none
kosmo integrations:call rest-countries.rest_countries_independent '{}' --json kosmo integrations:rest-countries rest_countries_independent '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
rest-countries.rest_countries_all 0 parameters
kosmo integrations:schema rest-countries.rest_countries_all --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_name 0 parameters
kosmo integrations:schema rest-countries.rest_countries_name --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_alpha 0 parameters
kosmo integrations:schema rest-countries.rest_countries_alpha --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_alpha_codes 0 parameters
kosmo integrations:schema rest-countries.rest_countries_alpha_codes --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_currency 0 parameters
kosmo integrations:schema rest-countries.rest_countries_currency --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_language 0 parameters
kosmo integrations:schema rest-countries.rest_countries_language --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_capital 0 parameters
kosmo integrations:schema rest-countries.rest_countries_capital --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_region 0 parameters
kosmo integrations:schema rest-countries.rest_countries_region --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_subregion 0 parameters
kosmo integrations:schema rest-countries.rest_countries_subregion --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_demonym 0 parameters
kosmo integrations:schema rest-countries.rest_countries_demonym --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_translation 0 parameters
kosmo integrations:schema rest-countries.rest_countries_translation --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
rest-countries.rest_countries_independent 0 parameters
kosmo integrations:schema rest-countries.rest_countries_independent --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.