productivity
Immigrant CLI for Coding Agents
Use the Immigrant CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Bearer token auth
Immigrant CLI for Coding Agents
Let coding agents discover schemas and execute integration functions through CLI commands or MCP.
Use this pattern when another coding agent needs exact commands and schema discovery. The Immigrant CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Immigrant CLI for Coding Agents
kosmokrator integrations:configure immigrant --set access_token="$IMMIGRANT_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call immigrant.immigrant_list_applications '{"limit":1,"page":1,"status":"example_status"}' --json Discovery Before Execution
Agents and scripts can inspect Immigrant docs and schemas 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 Useful Immigrant CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
immigrant.immigrant_list_applications | Read | limit, page, status | List immigration applications. Returns a paginated list of applications, optionally filtered by status. |
immigrant.immigrant_get_application | Read | id | Get details of a specific immigration application by its ID. |
immigrant.immigrant_create_application | Write | type, applicant_name, details | Create a new immigration application. Requires a type and applicant name. Optionally provide additional details. |
immigrant.immigrant_list_documents | Read | application_id, limit, page | List documents for a specific immigration application. Returns a paginated list of documents. |
immigrant.immigrant_get_document | Read | id | Get details of a specific document by its ID. |
immigrant.immigrant_list_statuses | Read | none | List all available immigration application statuses. Use this to understand valid status values for filtering. |
immigrant.immigrant_get_current_user | Read | none | Get the profile of the currently authenticated Immigrant user. Use this to verify credentials and see user details. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.