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.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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | IMMIGRANT_ACCESS_TOKEN | Secret secret | yes | Access Token |
url | IMMIGRANT_URL | URL url | no | Custom Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call immigrant.immigrant_list_applications '{"limit":1,"page":1,"status":"example_status"}' --json kosmo integrations:immigrant immigrant_list_applications '{"limit":1,"page":1,"status":"example_status"}' --json Discovery
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 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.
immigrant.immigrant_list_applications
List immigration applications. Returns a paginated list of applications, optionally filtered by status.
read - Parameters
- limit, page, status
kosmo integrations:call immigrant.immigrant_list_applications '{"limit":1,"page":1,"status":"example_status"}' --json kosmo integrations:immigrant immigrant_list_applications '{"limit":1,"page":1,"status":"example_status"}' --json immigrant.immigrant_get_application
Get details of a specific immigration application by its ID.
read - Parameters
- id
kosmo integrations:call immigrant.immigrant_get_application '{"id":"example_id"}' --json kosmo integrations:immigrant immigrant_get_application '{"id":"example_id"}' --json immigrant.immigrant_create_application
Create a new immigration application. Requires a type and applicant name. Optionally provide additional details.
write - Parameters
- type, applicant_name, details
kosmo integrations:call immigrant.immigrant_create_application '{"type":"example_type","applicant_name":"example_applicant_name","details":"example_details"}' --json kosmo integrations:immigrant immigrant_create_application '{"type":"example_type","applicant_name":"example_applicant_name","details":"example_details"}' --json immigrant.immigrant_list_documents
List documents for a specific immigration application. Returns a paginated list of documents.
read - Parameters
- application_id, limit, page
kosmo integrations:call immigrant.immigrant_list_documents '{"application_id":"example_application_id","limit":1,"page":1}' --json kosmo integrations:immigrant immigrant_list_documents '{"application_id":"example_application_id","limit":1,"page":1}' --json immigrant.immigrant_get_document
Get details of a specific document by its ID.
read - Parameters
- id
kosmo integrations:call immigrant.immigrant_get_document '{"id":"example_id"}' --json kosmo integrations:immigrant immigrant_get_document '{"id":"example_id"}' --json immigrant.immigrant_list_statuses
List all available immigration application statuses. Use this to understand valid status values for filtering.
read - Parameters
- none
kosmo integrations:call immigrant.immigrant_list_statuses '{}' --json kosmo integrations:immigrant immigrant_list_statuses '{}' --json immigrant.immigrant_get_current_user
Get the profile of the currently authenticated Immigrant user. Use this to verify credentials and see user details.
read - Parameters
- none
kosmo integrations:call immigrant.immigrant_get_current_user '{}' --json 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 3 parameters
kosmo integrations:schema immigrant.immigrant_list_applications --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 1 parameters
kosmo integrations:schema immigrant.immigrant_get_application --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The Immigrant application ID. |
immigrant.immigrant_create_application 3 parameters
kosmo integrations:schema immigrant.immigrant_create_application --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 3 parameters
kosmo integrations:schema immigrant.immigrant_list_documents --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 1 parameters
kosmo integrations:schema immigrant.immigrant_get_document --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The Immigrant document ID. |
immigrant.immigrant_list_statuses 0 parameters
kosmo integrations:schema immigrant.immigrant_list_statuses --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
immigrant.immigrant_get_current_user 0 parameters
kosmo integrations:schema immigrant.immigrant_get_current_user --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.