KosmoKrator

data

OpenAlex CLI for AI Agents

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

OpenAlex CLI Setup

OpenAlex can be configured headlessly with `kosmokrator integrations:configure openalex`.

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 openalex --set api_key="$OPENALEX_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor openalex --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 OPENALEX_API_KEY Secret secret yes API Key
url OPENALEX_URL URL url no 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 openalex.openalex_list_works '{}' --json
Provider shortcut
kosmo integrations:openalex openalex_list_works '{}' --json

Discovery

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

Discovery commands
kosmo integrations:docs openalex --json
kosmo integrations:docs openalex.openalex_list_works --json
kosmo integrations:schema openalex.openalex_list_works --json
kosmo integrations:search "OpenAlex" --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.

openalex.openalex_list_works

List, search, filter, sort, sample, or group works.

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

openalex.openalex_get_work

Get one work by OpenAlex ID, DOI, PMID, or supported external ID.

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

openalex.openalex_list_authors

List, search, filter, sort, sample, or group authors.

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

openalex.openalex_get_author

Get one author by OpenAlex ID, ORCID, or supported external ID.

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

openalex.openalex_list_sources

List, search, filter, sort, sample, or group sources.

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

openalex.openalex_get_source

Get one source by OpenAlex ID, ISSN, or supported external ID.

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

openalex.openalex_list_institutions

List, search, filter, sort, sample, or group institutions.

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

openalex.openalex_get_institution

Get one institution by OpenAlex ID, ROR, or supported external ID.

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

openalex.openalex_list_topics

List, search, filter, sort, sample, or group topics.

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

openalex.openalex_get_topic

Get one topic by OpenAlex ID.

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

openalex.openalex_list_domains

List, search, filter, sort, sample, or group domains.

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

openalex.openalex_get_domain

Get one domain by OpenAlex ID.

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

openalex.openalex_list_fields

List, search, filter, sort, sample, or group fields.

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

openalex.openalex_get_field

Get one field by OpenAlex ID.

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

openalex.openalex_list_subfields

List, search, filter, sort, sample, or group subfields.

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

openalex.openalex_get_subfield

Get one subfield by OpenAlex ID.

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

openalex.openalex_list_sdgs

List, search, filter, sort, sample, or group Sustainable Development Goals.

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

openalex.openalex_get_sdg

Get one Sustainable Development Goal by OpenAlex ID.

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

openalex.openalex_list_countries

List, search, filter, sort, sample, or group countries.

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

openalex.openalex_get_country

Get one country by OpenAlex ID.

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

openalex.openalex_list_continents

List, search, filter, sort, sample, or group continents.

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

openalex.openalex_get_continent

Get one continent by OpenAlex ID.

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

openalex.openalex_list_languages

List, search, filter, sort, sample, or group languages.

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

openalex.openalex_get_language

Get one language by OpenAlex ID.

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

openalex.openalex_list_keywords

List, search, filter, sort, sample, or group keywords.

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

openalex.openalex_get_keyword

Get one keyword by OpenAlex ID.

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

openalex.openalex_list_publishers

List, search, filter, sort, sample, or group publishers.

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

openalex.openalex_get_publisher

Get one publisher by OpenAlex ID, Wikidata ID, or supported external ID.

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

openalex.openalex_list_funders

List, search, filter, sort, sample, or group funders.

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

openalex.openalex_get_funder

Get one funder by OpenAlex ID.

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

openalex.openalex_list_awards

List, search, filter, sort, sample, or group awards.

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

openalex.openalex_get_award

Get one award by OpenAlex ID.

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

openalex.openalex_list_work_types

List OpenAlex work type enumerations.

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

openalex.openalex_get_work_type

Get one work type by OpenAlex ID.

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

openalex.openalex_list_source_types

List OpenAlex source type enumerations.

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

openalex.openalex_get_source_type

Get one source type by OpenAlex ID.

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

openalex.openalex_list_institution_types

List OpenAlex institution type enumerations.

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

openalex.openalex_get_institution_type

Get one institution type by OpenAlex ID.

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

openalex.openalex_list_licenses

List OpenAlex license enumerations.

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

openalex.openalex_get_license

Get one license by OpenAlex ID.

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

openalex.openalex_autocomplete

Search OpenAlex autocomplete suggestions for works, authors, sources, institutions, topics, keywords, publishers, or funders.

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

openalex.openalex_rate_limit

Check the current OpenAlex API key rate-limit status and remaining allowance.

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

openalex.openalex_list_changefiles

List available OpenAlex changefile dates. Changefile access may require a paid OpenAlex plan.

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

openalex.openalex_get_changefile

Get OpenAlex changefile details and download links for a specific date. Changefile access may require a paid OpenAlex plan.

Read read
Parameters
date
Generic call
kosmo integrations:call openalex.openalex_get_changefile '{"date":"example_date"}' --json
Shortcut
kosmo integrations:openalex openalex_get_changefile '{"date":"example_date"}' --json

Function Schemas

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

openalex.openalex_list_works 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_works --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_work 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_work --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_authors 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_authors --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_author 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_author --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_sources 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_sources --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_source 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_source --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_institutions 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_institutions --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_institution 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_institution --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_topics 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_topics --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_topic 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_topic --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_domains 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_domains --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_domain 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_domain --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_fields 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_fields --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_field 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_field --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_subfields 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_subfields --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_subfield 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_subfield --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_sdgs 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_sdgs --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_sdg 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_sdg --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_countries 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_countries --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_country 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_country --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_continents 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_continents --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_continent 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_continent --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_languages 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_languages --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_language 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_language --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_keywords 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_keywords --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_keyword 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_keyword --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_publishers 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_publishers --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_publisher 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_publisher --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_funders 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_funders --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_funder 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_funder --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_awards 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_awards --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_award 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_award --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_work_types 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_work_types --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_work_type 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_work_type --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_source_types 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_source_types --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_source_type 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_source_type --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_institution_types 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_institution_types --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_institution_type 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_institution_type --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_licenses 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_licenses --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_license 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_license --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_autocomplete 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_autocomplete --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_rate_limit 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_rate_limit --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_list_changefiles 0 parameters
Schema command
kosmo integrations:schema openalex.openalex_list_changefiles --json
ParameterTypeRequiredDescription
No parameters.
openalex.openalex_get_changefile 1 parameters
Schema command
kosmo integrations:schema openalex.openalex_get_changefile --json
ParameterTypeRequiredDescription
date string yes Changefile date in YYYY-MM-DD format.

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.