productivity
Bitbucket CLI for Coding Agents
Use the Bitbucket CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
15 functions 9 read 6 write API key auth
Bitbucket 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 Bitbucket CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Bitbucket CLI for Coding Agents
kosmokrator integrations:configure bitbucket --set api_key="$BITBUCKET_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call bitbucket.bitbucket_list_repos '{"workspace":"example_workspace","sort":"example_sort","pagelen":1,"page":"example_page"}' --json Discovery Before Execution
Agents and scripts can inspect Bitbucket docs and schemas 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 Useful Bitbucket CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
bitbucket.bitbucket_list_repos | Read | workspace, sort, pagelen, page | List repositories in a Bitbucket workspace. Supports sorting and pagination. |
bitbucket.bitbucket_get_repo | Read | workspace, repo_slug | Get details for a specific Bitbucket repository by workspace and repo slug. |
bitbucket.bitbucket_create_repo | Write | workspace, repo_slug, description, is_private, language | Create a new repository in a Bitbucket workspace. Optionally set description, visibility, and language. |
bitbucket.bitbucket_list_issues | Read | workspace, repo_slug, state, kind, priority, pagelen | List issues in a Bitbucket repository. Supports filtering by state, kind, and priority. |
bitbucket.bitbucket_get_issue | Read | workspace, repo_slug, issue_id | Get details for a specific issue in a Bitbucket repository. |
bitbucket.bitbucket_create_issue | Write | workspace, repo_slug, title, content, kind, priority, assignee | Create a new issue in a Bitbucket repository. Requires a title; optionally set content, kind, priority, and assignee. |
bitbucket.bitbucket_update_issue | Write | workspace, repo_slug, issue_id, title, content, state, priority, assignee | Update an existing issue in a Bitbucket repository. Can change title, content, state, priority, and assignee. |
bitbucket.bitbucket_list_pull_requests | Read | workspace, repo_slug, state, pagelen | List pull requests in a Bitbucket repository. Supports filtering by state and pagination. |
bitbucket.bitbucket_get_pull_request | Read | workspace, repo_slug, pr_id | Get details for a specific pull request in a Bitbucket repository. |
bitbucket.bitbucket_create_pull_request | Write | workspace, repo_slug, title, description, source_branch, destination_branch, close_source_branch | Create a new pull request in a Bitbucket repository. Requires a title, source branch, and destination branch. |
bitbucket.bitbucket_merge_pull_request | Write | workspace, repo_slug, pr_id, merge_commit_message | Merge a Bitbucket pull request. Optionally provide a merge commit message. |
bitbucket.bitbucket_list_branches | Read | workspace, repo_slug, pagelen | List branches in a Bitbucket repository. Supports pagination. |
bitbucket.bitbucket_create_branch | Write | workspace, repo_slug, name, target_hash | Create a new branch in a Bitbucket repository. Requires a branch name and the target commit hash. |
bitbucket.bitbucket_list_commits | Read | workspace, repo_slug, revision, path, pagelen | List commits in a Bitbucket repository. Supports filtering by revision and path. |
bitbucket.bitbucket_get_file | Read | workspace, repo_slug, revision, file_path | Get the raw content of a file from a Bitbucket repository at a specific revision. |
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.