KosmoKrator

marketing

Dub.co CLI for AI Agents

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

7 functions 6 read 1 write Bearer token auth

Dub.co CLI Setup

Dub.co can be configured headlessly with `kosmokrator integrations:configure dub`.

# 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 dub --set access_token="$DUB_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor dub --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 DUB_ACCESS_TOKEN Secret secret yes Access Token
base_url DUB_BASE_URL URL url no Base URL

Call Dub.co Headlessly

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

kosmo integrations:call dub.dub_list_links '{
  "page": 1,
  "pageSize": 1,
  "search": "example_search",
  "domain": "example_domain",
  "tagId": "example_tagId"
}' --json

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

kosmo integrations:dub dub_list_links '{
  "page": 1,
  "pageSize": 1,
  "search": "example_search",
  "domain": "example_domain",
  "tagId": "example_tagId"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs dub --json
kosmo integrations:docs dub.dub_list_links --json
kosmo integrations:schema dub.dub_list_links --json
kosmo integrations:search "Dub.co" --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 Dub.co.

dub.dub_list_domains

Read read

List all domains configured in your Dub.co workspace.

Parameters
page, pageSize

Generic CLI call

kosmo integrations:call dub.dub_list_domains '{"page":1,"pageSize":1}' --json

Provider shortcut

kosmo integrations:dub dub_list_domains '{"page":1,"pageSize":1}' --json

dub.dub_get_domain

Read read

Get details of a specific domain by its ID or slug.

Parameters
id

Generic CLI call

kosmo integrations:call dub.dub_get_domain '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:dub dub_get_domain '{"id":"example_id"}' --json

dub.dub_list_tags

Read read

List link tags in your Dub.co workspace. Supports pagination and search.

Parameters
page, pageSize, search

Generic CLI call

kosmo integrations:call dub.dub_list_tags '{"page":1,"pageSize":1,"search":"example_search"}' --json

Provider shortcut

kosmo integrations:dub dub_list_tags '{"page":1,"pageSize":1,"search":"example_search"}' --json

dub.dub_get_current_user

Read read

Get the profile of the currently authenticated Dub.co user. Useful for verifying the connection and checking workspace membership.

Parameters
none

Generic CLI call

kosmo integrations:call dub.dub_get_current_user '{}' --json

Provider shortcut

kosmo integrations:dub dub_get_current_user '{}' --json

Function Schemas

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

dub.dub_list_domains

List all domains configured in your Dub.co workspace.

Operation
Read read
Schema command
kosmo integrations:schema dub.dub_list_domains --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
pageSize integer no Number of results per page (default: 50).

dub.dub_get_domain

Get details of a specific domain by its ID or slug.

Operation
Read read
Schema command
kosmo integrations:schema dub.dub_get_domain --json
ParameterTypeRequiredDescription
id string yes The domain ID or slug (e.g., "dub.sh", "clx...").

dub.dub_list_tags

List link tags in your Dub.co workspace. Supports pagination and search.

Operation
Read read
Schema command
kosmo integrations:schema dub.dub_list_tags --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
pageSize integer no Number of results per page (default: 50).
search string no Search query to filter tags by name.

dub.dub_get_current_user

Get the profile of the currently authenticated Dub.co user. Useful for verifying the connection and checking workspace membership.

Operation
Read read
Schema command
kosmo integrations:schema dub.dub_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.