KosmoKrator

productivity

Dub CLI for AI Agents

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

Dub CLI Setup

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

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 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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
access_token DUB_ACCESS_TOKEN Secret secret yes Access Token
base_url DUB_BASE_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 dub.dub_analytics_retrieve '{}' --json
Provider shortcut
kosmo integrations:dub dub_analytics_retrieve '{}' --json

Discovery

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

Discovery commands
kosmo integrations:docs dub --json
kosmo integrations:docs dub.dub_analytics_retrieve --json
kosmo integrations:schema dub.dub_analytics_retrieve --json
kosmo integrations:search "Dub" --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.

dub.dub_analytics_retrieve

Retrieve analytics for a link, a domain, or the authenticated workspace.

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

dub.dub_bounties_approve_submission

Approve a bounty submission

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_bounties_approve_submission '{}' --json
Shortcut
kosmo integrations:dub dub_bounties_approve_submission '{}' --json

dub.dub_bounties_list_submissions

List bounty submissions

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

dub.dub_bounties_reject_submission

Reject a bounty submission

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_bounties_reject_submission '{}' --json
Shortcut
kosmo integrations:dub dub_bounties_reject_submission '{}' --json

dub.dub_commissions_list

List all commissions

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

dub.dub_commissions_update

Update a commission

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_commissions_update '{}' --json
Shortcut
kosmo integrations:dub dub_commissions_update '{}' --json

dub.dub_commissions_update_many

Bulk update commissions

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_commissions_update_many '{}' --json
Shortcut
kosmo integrations:dub dub_commissions_update_many '{}' --json

dub.dub_customers_delete

Delete a customer

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_customers_delete '{}' --json
Shortcut
kosmo integrations:dub dub_customers_delete '{}' --json

dub.dub_customers_get

Retrieve a customer

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

dub.dub_customers_list

List all customers

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

dub.dub_customers_update

Update a customer

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_customers_update '{}' --json
Shortcut
kosmo integrations:dub dub_customers_update '{}' --json

dub.dub_domains_check_status

Check the availability of one or more domains

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

dub.dub_domains_create

Create a domain

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_domains_create '{}' --json
Shortcut
kosmo integrations:dub dub_domains_create '{}' --json

dub.dub_domains_delete

Delete a domain

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_domains_delete '{}' --json
Shortcut
kosmo integrations:dub dub_domains_delete '{}' --json

dub.dub_domains_list

List all domains

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

dub.dub_domains_register

Register a domain

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_domains_register '{}' --json
Shortcut
kosmo integrations:dub dub_domains_register '{}' --json

dub.dub_domains_update

Update a domain

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_domains_update '{}' --json
Shortcut
kosmo integrations:dub dub_domains_update '{}' --json

dub.dub_embed_tokens_referrals

Create a referrals embed token

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_embed_tokens_referrals '{}' --json
Shortcut
kosmo integrations:dub dub_embed_tokens_referrals '{}' --json

dub.dub_events_list

List all events

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

dub.dub_folders_create

Create a folder

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_folders_create '{}' --json
Shortcut
kosmo integrations:dub dub_folders_create '{}' --json

dub.dub_folders_delete

Delete a folder

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_folders_delete '{}' --json
Shortcut
kosmo integrations:dub dub_folders_delete '{}' --json

dub.dub_folders_list

List all folders

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

dub.dub_folders_update

Update a folder

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_folders_update '{}' --json
Shortcut
kosmo integrations:dub dub_folders_update '{}' --json

dub.dub_links_count

Retrieve links count

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

dub.dub_links_create

Create a link

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_links_create '{}' --json
Shortcut
kosmo integrations:dub dub_links_create '{}' --json

dub.dub_links_create_many

Bulk create links

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_links_create_many '{}' --json
Shortcut
kosmo integrations:dub dub_links_create_many '{}' --json

dub.dub_links_delete

Delete a link

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_links_delete '{}' --json
Shortcut
kosmo integrations:dub dub_links_delete '{}' --json

dub.dub_links_delete_many

Bulk delete links

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_links_delete_many '{}' --json
Shortcut
kosmo integrations:dub dub_links_delete_many '{}' --json

dub.dub_links_get

Retrieve a link

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

dub.dub_links_list

List all links

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

dub.dub_links_update

Update a link

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_links_update '{}' --json
Shortcut
kosmo integrations:dub dub_links_update '{}' --json

dub.dub_links_update_many

Bulk update links

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_links_update_many '{}' --json
Shortcut
kosmo integrations:dub dub_links_update_many '{}' --json

dub.dub_links_upsert

Upsert a link

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_links_upsert '{}' --json
Shortcut
kosmo integrations:dub dub_links_upsert '{}' --json

dub.dub_partner_applications_approve

Approve a partner application

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_partner_applications_approve '{}' --json
Shortcut
kosmo integrations:dub dub_partner_applications_approve '{}' --json

dub.dub_partner_applications_list

List all pending partner applications

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

dub.dub_partner_applications_reject

Reject a partner application

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_partner_applications_reject '{}' --json
Shortcut
kosmo integrations:dub dub_partner_applications_reject '{}' --json

dub.dub_partners_analytics

Retrieve analytics for a partner

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

dub.dub_partners_ban

Ban a partner

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_partners_ban '{}' --json
Shortcut
kosmo integrations:dub dub_partners_ban '{}' --json

dub.dub_partners_create

Create or update a partner

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_partners_create '{}' --json
Shortcut
kosmo integrations:dub dub_partners_create '{}' --json

dub.dub_partners_create_link

Create a link for a partner

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_partners_create_link '{}' --json
Shortcut
kosmo integrations:dub dub_partners_create_link '{}' --json

dub.dub_partners_deactivate

Deactivate a partner

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_partners_deactivate '{}' --json
Shortcut
kosmo integrations:dub dub_partners_deactivate '{}' --json

dub.dub_partners_list

List all partners

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

dub.dub_partners_retrieve_links

Retrieve a partner's links.

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

dub.dub_partners_upsert_link

Upsert a link for a partner

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_partners_upsert_link '{}' --json
Shortcut
kosmo integrations:dub dub_partners_upsert_link '{}' --json

dub.dub_payouts_list

List all payouts

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

dub.dub_qr_codes_get

Retrieve a QR code

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

dub.dub_tags_create

Create a tag

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_tags_create '{}' --json
Shortcut
kosmo integrations:dub dub_tags_create '{}' --json

dub.dub_tags_delete

Delete a tag

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_tags_delete '{}' --json
Shortcut
kosmo integrations:dub dub_tags_delete '{}' --json

dub.dub_tags_list

List all tags

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

dub.dub_tags_update

Update a tag

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_tags_update '{}' --json
Shortcut
kosmo integrations:dub dub_tags_update '{}' --json

dub.dub_track_lead

Track a lead

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_track_lead '{}' --json
Shortcut
kosmo integrations:dub dub_track_lead '{}' --json

dub.dub_track_sale

Track a sale

Write write
Parameters
none
Generic call
kosmo integrations:call dub.dub_track_sale '{}' --json
Shortcut
kosmo integrations:dub dub_track_sale '{}' --json

Function Schemas

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

dub.dub_analytics_retrieve 0 parameters
Schema command
kosmo integrations:schema dub.dub_analytics_retrieve --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_bounties_approve_submission 0 parameters
Schema command
kosmo integrations:schema dub.dub_bounties_approve_submission --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_bounties_list_submissions 0 parameters
Schema command
kosmo integrations:schema dub.dub_bounties_list_submissions --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_bounties_reject_submission 0 parameters
Schema command
kosmo integrations:schema dub.dub_bounties_reject_submission --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_commissions_list 0 parameters
Schema command
kosmo integrations:schema dub.dub_commissions_list --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_commissions_update 0 parameters
Schema command
kosmo integrations:schema dub.dub_commissions_update --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_commissions_update_many 0 parameters
Schema command
kosmo integrations:schema dub.dub_commissions_update_many --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_customers_delete 0 parameters
Schema command
kosmo integrations:schema dub.dub_customers_delete --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_customers_get 0 parameters
Schema command
kosmo integrations:schema dub.dub_customers_get --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_customers_list 0 parameters
Schema command
kosmo integrations:schema dub.dub_customers_list --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_customers_update 0 parameters
Schema command
kosmo integrations:schema dub.dub_customers_update --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_domains_check_status 0 parameters
Schema command
kosmo integrations:schema dub.dub_domains_check_status --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_domains_create 0 parameters
Schema command
kosmo integrations:schema dub.dub_domains_create --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_domains_delete 0 parameters
Schema command
kosmo integrations:schema dub.dub_domains_delete --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_domains_list 0 parameters
Schema command
kosmo integrations:schema dub.dub_domains_list --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_domains_register 0 parameters
Schema command
kosmo integrations:schema dub.dub_domains_register --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_domains_update 0 parameters
Schema command
kosmo integrations:schema dub.dub_domains_update --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_embed_tokens_referrals 0 parameters
Schema command
kosmo integrations:schema dub.dub_embed_tokens_referrals --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_events_list 0 parameters
Schema command
kosmo integrations:schema dub.dub_events_list --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_folders_create 0 parameters
Schema command
kosmo integrations:schema dub.dub_folders_create --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_folders_delete 0 parameters
Schema command
kosmo integrations:schema dub.dub_folders_delete --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_folders_list 0 parameters
Schema command
kosmo integrations:schema dub.dub_folders_list --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_folders_update 0 parameters
Schema command
kosmo integrations:schema dub.dub_folders_update --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_partner_applications_approve 0 parameters
Schema command
kosmo integrations:schema dub.dub_partner_applications_approve --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_partner_applications_list 0 parameters
Schema command
kosmo integrations:schema dub.dub_partner_applications_list --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_partner_applications_reject 0 parameters
Schema command
kosmo integrations:schema dub.dub_partner_applications_reject --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_partners_analytics 0 parameters
Schema command
kosmo integrations:schema dub.dub_partners_analytics --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_partners_ban 0 parameters
Schema command
kosmo integrations:schema dub.dub_partners_ban --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_partners_create 0 parameters
Schema command
kosmo integrations:schema dub.dub_partners_create --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_partners_deactivate 0 parameters
Schema command
kosmo integrations:schema dub.dub_partners_deactivate --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_partners_list 0 parameters
Schema command
kosmo integrations:schema dub.dub_partners_list --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_payouts_list 0 parameters
Schema command
kosmo integrations:schema dub.dub_payouts_list --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_qr_codes_get 0 parameters
Schema command
kosmo integrations:schema dub.dub_qr_codes_get --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_tags_create 0 parameters
Schema command
kosmo integrations:schema dub.dub_tags_create --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_tags_delete 0 parameters
Schema command
kosmo integrations:schema dub.dub_tags_delete --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_tags_list 0 parameters
Schema command
kosmo integrations:schema dub.dub_tags_list --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_tags_update 0 parameters
Schema command
kosmo integrations:schema dub.dub_tags_update --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_track_lead 0 parameters
Schema command
kosmo integrations:schema dub.dub_track_lead --json
ParameterTypeRequiredDescription
No parameters.
dub.dub_track_sale 0 parameters
Schema command
kosmo integrations:schema dub.dub_track_sale --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.