Bitbucket CLI Setup Bitbucket can be configured headlessly with `kosmokrator integrations:configure bitbucket`.
# 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 bitbucket --set api_key=" $BITBUCKET_API_KEY " --enable --read allow --write ask --json
kosmokrator integrations:doctor bitbucket --json
kosmokrator integrations:status --json Credentials
Authentication type: API key api_key. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Call Bitbucket Headlessly Use the generic call form when another coding CLI or script needs a stable universal interface.
kosmo integrations:call bitbucket.bitbucket_list_repos '{
"workspace": "example_workspace",
"sort": "example_sort",
"pagelen": 1,
"page": "example_page"
}' --json Use the provider shortcut form for shorter human-facing commands.
kosmo integrations:bitbucket bitbucket_list_repos '{
"workspace": "example_workspace",
"sort": "example_sort",
"pagelen": 1,
"page": "example_page"
}' --json Agent Discovery Commands
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs bitbucket --json
kosmo integrations:docs bitbucket.bitbucket_list_repos --json
kosmo integrations:schema bitbucket.bitbucket_list_repos --json
kosmo integrations:search "Bitbucket" --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 Bitbucket.
bitbucket.bitbucket_list_repos Read read List repositories in a Bitbucket workspace. Supports sorting and pagination.
workspace, sort, pagelen, page kosmo integrations:call bitbucket.bitbucket_list_repos '{"workspace":"example_workspace","sort":"example_sort","pagelen":1,"page":"example_page"}' --json copy kosmo integrations:bitbucket bitbucket_list_repos '{"workspace":"example_workspace","sort":"example_sort","pagelen":1,"page":"example_page"}' --json copy
bitbucket.bitbucket_get_repo Read read Get details for a specific Bitbucket repository by workspace and repo slug.
workspace, repo_slug kosmo integrations:call bitbucket.bitbucket_get_repo '{"workspace":"example_workspace","repo_slug":"example_repo_slug"}' --json copy kosmo integrations:bitbucket bitbucket_get_repo '{"workspace":"example_workspace","repo_slug":"example_repo_slug"}' --json copy
bitbucket.bitbucket_create_repo Write write Create a new repository in a Bitbucket workspace. Optionally set description, visibility, and language.
workspace, repo_slug, description, is_private, language kosmo integrations:call bitbucket.bitbucket_create_repo '{"workspace":"example_workspace","repo_slug":"example_repo_slug","description":"example_description","is_private":true,"language":"example_language"}' --json copy kosmo integrations:bitbucket bitbucket_create_repo '{"workspace":"example_workspace","repo_slug":"example_repo_slug","description":"example_description","is_private":true,"language":"example_language"}' --json copy
bitbucket.bitbucket_list_issues Read read List issues in a Bitbucket repository. Supports filtering by state, kind, and priority.
workspace, repo_slug, state, kind, priority, pagelen kosmo integrations:call bitbucket.bitbucket_list_issues '{"workspace":"example_workspace","repo_slug":"example_repo_slug","state":"example_state","kind":"example_kind","priority":"example_priority","pagelen":1}' --json copy kosmo integrations:bitbucket bitbucket_list_issues '{"workspace":"example_workspace","repo_slug":"example_repo_slug","state":"example_state","kind":"example_kind","priority":"example_priority","pagelen":1}' --json copy
bitbucket.bitbucket_get_issue Read read Get details for a specific issue in a Bitbucket repository.
workspace, repo_slug, issue_id kosmo integrations:call bitbucket.bitbucket_get_issue '{"workspace":"example_workspace","repo_slug":"example_repo_slug","issue_id":1}' --json copy kosmo integrations:bitbucket bitbucket_get_issue '{"workspace":"example_workspace","repo_slug":"example_repo_slug","issue_id":1}' --json copy
bitbucket.bitbucket_create_issue Write write Create a new issue in a Bitbucket repository. Requires a title; optionally set content, kind, priority, and assignee.
workspace, repo_slug, title, content, kind, priority, assignee kosmo integrations:call bitbucket.bitbucket_create_issue '{"workspace":"example_workspace","repo_slug":"example_repo_slug","title":"example_title","content":"example_content","kind":"example_kind","priority":"example_priority","assignee":"example_assignee"}' --json copy kosmo integrations:bitbucket bitbucket_create_issue '{"workspace":"example_workspace","repo_slug":"example_repo_slug","title":"example_title","content":"example_content","kind":"example_kind","priority":"example_priority","assignee":"example_assignee"}' --json copy
bitbucket.bitbucket_update_issue Write write Update an existing issue in a Bitbucket repository. Can change title, content, state, priority, and assignee.
workspace, repo_slug, issue_id, title, content, state, priority, assignee kosmo integrations:call bitbucket.bitbucket_update_issue '{"workspace":"example_workspace","repo_slug":"example_repo_slug","issue_id":1,"title":"example_title","content":"example_content","state":"example_state","priority":"example_priority","assignee":"example_assignee"}' --json copy kosmo integrations:bitbucket bitbucket_update_issue '{"workspace":"example_workspace","repo_slug":"example_repo_slug","issue_id":1,"title":"example_title","content":"example_content","state":"example_state","priority":"example_priority","assignee":"example_assignee"}' --json copy
bitbucket.bitbucket_list_pull_requests Read read List pull requests in a Bitbucket repository. Supports filtering by state and pagination.
workspace, repo_slug, state, pagelen kosmo integrations:call bitbucket.bitbucket_list_pull_requests '{"workspace":"example_workspace","repo_slug":"example_repo_slug","state":"example_state","pagelen":1}' --json copy kosmo integrations:bitbucket bitbucket_list_pull_requests '{"workspace":"example_workspace","repo_slug":"example_repo_slug","state":"example_state","pagelen":1}' --json copy
bitbucket.bitbucket_get_pull_request Read read Get details for a specific pull request in a Bitbucket repository.
workspace, repo_slug, pr_id kosmo integrations:call bitbucket.bitbucket_get_pull_request '{"workspace":"example_workspace","repo_slug":"example_repo_slug","pr_id":1}' --json copy kosmo integrations:bitbucket bitbucket_get_pull_request '{"workspace":"example_workspace","repo_slug":"example_repo_slug","pr_id":1}' --json copy
bitbucket.bitbucket_create_pull_request Write write Create a new pull request in a Bitbucket repository. Requires a title, source branch, and destination branch.
workspace, repo_slug, title, description, source_branch, destination_branch, close_source_branch kosmo integrations:call bitbucket.bitbucket_create_pull_request '{"workspace":"example_workspace","repo_slug":"example_repo_slug","title":"example_title","description":"example_description","source_branch":"example_source_branch","destination_branch":"example_destination_branch","close_source_branch":true}' --json copy kosmo integrations:bitbucket bitbucket_create_pull_request '{"workspace":"example_workspace","repo_slug":"example_repo_slug","title":"example_title","description":"example_description","source_branch":"example_source_branch","destination_branch":"example_destination_branch","close_source_branch":true}' --json copy
bitbucket.bitbucket_merge_pull_request Write write Merge a Bitbucket pull request. Optionally provide a merge commit message.
workspace, repo_slug, pr_id, merge_commit_message kosmo integrations:call bitbucket.bitbucket_merge_pull_request '{"workspace":"example_workspace","repo_slug":"example_repo_slug","pr_id":1,"merge_commit_message":"example_merge_commit_message"}' --json copy kosmo integrations:bitbucket bitbucket_merge_pull_request '{"workspace":"example_workspace","repo_slug":"example_repo_slug","pr_id":1,"merge_commit_message":"example_merge_commit_message"}' --json copy
bitbucket.bitbucket_list_branches Read read List branches in a Bitbucket repository. Supports pagination.
workspace, repo_slug, pagelen kosmo integrations:call bitbucket.bitbucket_list_branches '{"workspace":"example_workspace","repo_slug":"example_repo_slug","pagelen":1}' --json copy kosmo integrations:bitbucket bitbucket_list_branches '{"workspace":"example_workspace","repo_slug":"example_repo_slug","pagelen":1}' --json copy
bitbucket.bitbucket_create_branch Write write Create a new branch in a Bitbucket repository. Requires a branch name and the target commit hash.
workspace, repo_slug, name, target_hash kosmo integrations:call bitbucket.bitbucket_create_branch '{"workspace":"example_workspace","repo_slug":"example_repo_slug","name":"example_name","target_hash":"example_target_hash"}' --json copy kosmo integrations:bitbucket bitbucket_create_branch '{"workspace":"example_workspace","repo_slug":"example_repo_slug","name":"example_name","target_hash":"example_target_hash"}' --json copy
bitbucket.bitbucket_list_commits Read read List commits in a Bitbucket repository. Supports filtering by revision and path.
workspace, repo_slug, revision, path, pagelen kosmo integrations:call bitbucket.bitbucket_list_commits '{"workspace":"example_workspace","repo_slug":"example_repo_slug","revision":"example_revision","path":"example_path","pagelen":1}' --json copy kosmo integrations:bitbucket bitbucket_list_commits '{"workspace":"example_workspace","repo_slug":"example_repo_slug","revision":"example_revision","path":"example_path","pagelen":1}' --json copy
bitbucket.bitbucket_get_file Read read Get the raw content of a file from a Bitbucket repository at a specific revision.
workspace, repo_slug, revision, file_path kosmo integrations:call bitbucket.bitbucket_get_file '{"workspace":"example_workspace","repo_slug":"example_repo_slug","revision":"example_revision","file_path":"example_file_path"}' --json copy kosmo integrations:bitbucket bitbucket_get_file '{"workspace":"example_workspace","repo_slug":"example_repo_slug","revision":"example_revision","file_path":"example_file_path"}' --json copy Function Schemas Use these parameter tables when building CLI payloads without calling integrations:schema first.
Operation Read read
Schema command kosmo integrations:schema bitbucket.bitbucket_list_repos --json
Operation Read read
Schema command kosmo integrations:schema bitbucket.bitbucket_get_repo --json
Operation Write write
Schema command kosmo integrations:schema bitbucket.bitbucket_create_repo --json
Operation Read read
Schema command kosmo integrations:schema bitbucket.bitbucket_list_issues --json
Operation Read read
Schema command kosmo integrations:schema bitbucket.bitbucket_get_issue --json
Operation Write write
Schema command kosmo integrations:schema bitbucket.bitbucket_create_issue --json
Operation Write write
Schema command kosmo integrations:schema bitbucket.bitbucket_update_issue --json
Operation Read read
Schema command kosmo integrations:schema bitbucket.bitbucket_list_pull_requests --json
Operation Read read
Schema command kosmo integrations:schema bitbucket.bitbucket_get_pull_request --json
Operation Write write
Schema command kosmo integrations:schema bitbucket.bitbucket_create_pull_request --json
Operation Write write
Schema command kosmo integrations:schema bitbucket.bitbucket_merge_pull_request --json
Operation Read read
Schema command kosmo integrations:schema bitbucket.bitbucket_list_branches --json
Operation Write write
Schema command kosmo integrations:schema bitbucket.bitbucket_create_branch --json
Operation Read read
Schema command kosmo integrations:schema bitbucket.bitbucket_list_commits --json
Operation Read read
Schema command kosmo integrations:schema bitbucket.bitbucket_get_file --json 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.