KosmoKrator

productivity

Immigrant CLI for AI Agents

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

7 functions 6 read 1 write Bearer token auth

Immigrant CLI Setup

Immigrant can be configured headlessly with `kosmokrator integrations:configure immigrant`.

# 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 immigrant --set access_token="$IMMIGRANT_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor immigrant --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token IMMIGRANT_ACCESS_TOKEN Secret secret yes Access Token
url IMMIGRANT_URL URL url no Custom Base URL

Call Immigrant Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call immigrant.immigrant_list_applications '{
  "limit": 1,
  "page": 1,
  "status": "example_status"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:immigrant immigrant_list_applications '{
  "limit": 1,
  "page": 1,
  "status": "example_status"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs immigrant --json
kosmo integrations:docs immigrant.immigrant_list_applications --json
kosmo integrations:schema immigrant.immigrant_list_applications --json
kosmo integrations:search "Immigrant" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Immigrant.

immigrant.immigrant_list_applications

Read read

List immigration applications. Returns a paginated list of applications, optionally filtered by status.

Parameters
limit, page, status

Generic CLI call

kosmo integrations:call immigrant.immigrant_list_applications '{"limit":1,"page":1,"status":"example_status"}' --json

Provider shortcut

kosmo integrations:immigrant immigrant_list_applications '{"limit":1,"page":1,"status":"example_status"}' --json

immigrant.immigrant_get_application

Read read

Get details of a specific immigration application by its ID.

Parameters
id

Generic CLI call

kosmo integrations:call immigrant.immigrant_get_application '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:immigrant immigrant_get_application '{"id":"example_id"}' --json

immigrant.immigrant_create_application

Write write

Create a new immigration application. Requires a type and applicant name. Optionally provide additional details.

Parameters
type, applicant_name, details

Generic CLI call

kosmo integrations:call immigrant.immigrant_create_application '{"type":"example_type","applicant_name":"example_applicant_name","details":"example_details"}' --json

Provider shortcut

kosmo integrations:immigrant immigrant_create_application '{"type":"example_type","applicant_name":"example_applicant_name","details":"example_details"}' --json

immigrant.immigrant_list_documents

Read read

List documents for a specific immigration application. Returns a paginated list of documents.

Parameters
application_id, limit, page

Generic CLI call

kosmo integrations:call immigrant.immigrant_list_documents '{"application_id":"example_application_id","limit":1,"page":1}' --json

Provider shortcut

kosmo integrations:immigrant immigrant_list_documents '{"application_id":"example_application_id","limit":1,"page":1}' --json

immigrant.immigrant_get_document

Read read

Get details of a specific document by its ID.

Parameters
id

Generic CLI call

kosmo integrations:call immigrant.immigrant_get_document '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:immigrant immigrant_get_document '{"id":"example_id"}' --json

immigrant.immigrant_list_statuses

Read read

List all available immigration application statuses. Use this to understand valid status values for filtering.

Parameters
none

Generic CLI call

kosmo integrations:call immigrant.immigrant_list_statuses '{}' --json

Provider shortcut

kosmo integrations:immigrant immigrant_list_statuses '{}' --json

immigrant.immigrant_get_current_user

Read read

Get the profile of the currently authenticated Immigrant user. Use this to verify credentials and see user details.

Parameters
none

Generic CLI call

kosmo integrations:call immigrant.immigrant_get_current_user '{}' --json

Provider shortcut

kosmo integrations:immigrant immigrant_get_current_user '{}' --json

Function Schemas

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

immigrant.immigrant_list_applications

List immigration applications. Returns a paginated list of applications, optionally filtered by status.

Operation
Read read
Schema command
kosmo integrations:schema immigrant.immigrant_list_applications --json
ParameterTypeRequiredDescription
limit integer no Number of applications to return per page (default: 25, max: 100).
page integer no Page number for pagination (1-based).
status string no Filter applications by status (e.g. "pending", "approved", "rejected").

immigrant.immigrant_get_application

Get details of a specific immigration application by its ID.

Operation
Read read
Schema command
kosmo integrations:schema immigrant.immigrant_get_application --json
ParameterTypeRequiredDescription
id string yes The Immigrant application ID.

immigrant.immigrant_create_application

Create a new immigration application. Requires a type and applicant name. Optionally provide additional details.

Operation
Write write
Schema command
kosmo integrations:schema immigrant.immigrant_create_application --json
ParameterTypeRequiredDescription
type string yes Application type (e.g. "visa", "green_card", "citizenship").
applicant_name string yes Full name of the applicant.
details object no Optional additional application details (key-value pairs).

immigrant.immigrant_list_documents

List documents for a specific immigration application. Returns a paginated list of documents.

Operation
Read read
Schema command
kosmo integrations:schema immigrant.immigrant_list_documents --json
ParameterTypeRequiredDescription
application_id string yes The Immigrant application ID to list documents for.
limit integer no Number of documents to return per page (default: 25, max: 100).
page integer no Page number for pagination (1-based).

immigrant.immigrant_get_document

Get details of a specific document by its ID.

Operation
Read read
Schema command
kosmo integrations:schema immigrant.immigrant_get_document --json
ParameterTypeRequiredDescription
id string yes The Immigrant document ID.

immigrant.immigrant_list_statuses

List all available immigration application statuses. Use this to understand valid status values for filtering.

Operation
Read read
Schema command
kosmo integrations:schema immigrant.immigrant_list_statuses --json
ParameterTypeRequiredDescription
No parameters.

immigrant.immigrant_get_current_user

Get the profile of the currently authenticated Immigrant user. Use this to verify credentials and see user details.

Operation
Read read
Schema command
kosmo integrations:schema immigrant.immigrant_get_current_user --json
ParameterTypeRequiredDescription
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.