{"id":21888621,"url":"https://github.com/swisscom/bitbucket-cli","last_synced_at":"2025-04-15T10:19:33.722Z","repository":{"id":42523565,"uuid":"372738684","full_name":"swisscom/bitbucket-cli","owner":"swisscom","description":"A Bitbucket Enterprise CLI","archived":false,"fork":false,"pushed_at":"2023-04-07T11:39:01.000Z","size":69,"stargazers_count":24,"open_issues_count":1,"forks_count":7,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-15T10:19:02.576Z","etag":null,"topics":["bitbucket","cli","enterprise","git"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swisscom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-01T07:24:08.000Z","updated_at":"2025-04-15T00:05:06.000Z","dependencies_parsed_at":"2024-06-19T16:23:03.812Z","dependency_job_id":"fec9b762-3ed5-4f19-a839-af440ed6980b","html_url":"https://github.com/swisscom/bitbucket-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fbitbucket-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fbitbucket-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fbitbucket-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fbitbucket-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swisscom","download_url":"https://codeload.github.com/swisscom/bitbucket-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249048747,"owners_count":21204306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbucket","cli","enterprise","git"],"created_at":"2024-11-28T11:16:14.043Z","updated_at":"2025-04-15T10:19:33.705Z","avatar_url":"https://github.com/swisscom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitbucket-cli\n\nA [Bitbucket Enterprise](https://bitbucket.org/product/enterprise) CLI.\n\n```\nUsage: bitbucket-cli [--username USERNAME] [--password PASSWORD] --url URL \u003ccommand\u003e [\u003cargs\u003e]\n\nOptions:\n  --username USERNAME, -u USERNAME\n  --password PASSWORD, -p PASSWORD\n  --url URL, -u URL\n  --help, -h             display this help and exit\n\nCommands:\n  project\n```\n\n# Docker container\n\nA docker container for this project can be obtained [here](https://github.com/swisscom/bitbucket-cli/pkgs/container/bitbucket-cli).\n\n## Project\n\n### List\n\nLists the repositories in a project\n\n```\n$ export BITBUCKET_USERNAME=\"my-bitbucket-username\"\n$ read -s BITBUCKET_PASSWORD # Type your password and then press ENTER\n$ export BITBUCKET_PASSWORD\n$ bitbucket-cli --url https://your-bitbucket-hostname/rest project list -k PRJKEY\n\nproject-1       https://your-bitbucket-hostname/scm/prjkey/project-1.git\nproject-2       https://your-bitbucket-hostname/scm/prjkey/project-2.git\nproject-3       https://your-bitbucket-hostname/scm/prjkey/project-3.git\n\n```\n\n### Clone\n\nClones all the repositories in a project:\n\n```\n$ export BITBUCKET_USERNAME=\"my-bitbucket-username\"\n$ read -r -s BITBUCKET_PASSWORD # Type your password and then press ENTER\n$ export BITBUCKET_PASSWORD\n$ bitbucket-cli --url https://your-bitbucket-hostname/rest project clone -k PRJKEY -o /tmp/test/\n    \n    head: 987a5d8c25d8adb5ba013cf1cb88cd56a189241e5048b9702f319fb6e641cf81 refs/heads/master\n    head: df2b794192904e6a9265975f33510eebe680177013e86fd7002850f45389ad34 refs/heads/master\n    head: 2cf20bee2c59c3b8cae6ec0820a1353ff0ca2adeecdb84ba773845cff91ab121 refs/heads/master\n\n$ ls -la /tmp/test \ntotal 0\ndrwxr-xr-x 13 dvitali dvitali  260 Jul 21 18:09 .\ndrwxrwxrwt 29 root    root    1400 Jul 21 18:11 ..\ndrwxr-xr-x  3 dvitali dvitali  120 Jul 21 18:09 project-1\ndrwxr-xr-x  4 dvitali dvitali  140 Jul 21 18:09 project-2\ndrwxr-xr-x  3 dvitali dvitali  100 Jul 21 18:09 project-3\n```\n\n\n## Repo\n\nThis main subcommand requires two arguments:\n\n- `-k KEY`\n- `-n NAME`\n\nThese are basically the identifiers for your repository, not including one of the twos in all of the\nsubcommands will result in an error.\n\n### PR\n\nThis subcommand deals with PRs, please check its subcommands.\n\n#### Create\n\nThis command, subcommand of (`repo pr`) allows you to create a Pull Request.\n\nUse it as follows:\n\n```\nbitbucket-cli repo -k \"KEY\" \\\n  -n \"bitbucket-playground\" \\\n  pr create \\\n  -t \"Some Title\" \\\n  -d \"Some Description :thumbsup:\" \\\n  -F \"refs/heads/feature/2\" -T \"refs/heads/master\"\n```\n\n\n##### Usage \n\n```\nUsage: bitbucket-cli repo pr create --title TITLE [--description DESCRIPTION] --from-ref FROM-REF --to-ref TO-REF [--from-key FROM-KEY] [--from-slug FROM-SLUG]\n\nOptions:\n  --title TITLE, -t TITLE\n                         Title of this PR\n  --description DESCRIPTION, -d DESCRIPTION\n                         Description of the PR\n  --from-ref FROM-REF, -F FROM-REF\n                         Reference of the incoming PR, e.g: refs/heads/feature-ABC-123\n  --to-ref TO-REF, -T TO-REF\n                         Target reference, e.g: refs/heads/master\n  --from-key FROM-KEY, -K FROM-KEY\n                         Project Key of the \"from\" repository\n  --from-slug FROM-SLUG, -S FROM-SLUG\n                         Repository slug of the \"from\" repository\n  --help, -h             display this help and exit\n```\n\n#### List\n\nLists all the PRs for the chosen repository\n\n```\n$ bitbucket-cli repo -k KEY -n bitbucket-playground pr list\nSome Title (ID: 2)\nfeature 1 (ID: 1)\n```\n\n```\n$ bitbucket-cli repo -k KEY -n bitbucket-playground pr list -s DECLINED\nfeature 1 (ID: 1)\n```\n\n##### Usage\n\n```plain\nUsage: bitbucket-cli repo pr list [--state STATE]\n\nOptions:\n  --state STATE, -s STATE\n                         PR State, any of: ALL, OPEN, DECLINED, MERGED\n  --help, -h             display this help and exit\n```\n\n### Security\n\n#### Scan\n\n##### Usage\n\n```plain\nUsage: bitbucket-cli repo security scan\n\nOptions:\n  --help, -h             display this help and exit\n```\n\n##### Example\n\n```plain\nbitbucket-cli repo -k ABC -n some-repo security scan\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisscom%2Fbitbucket-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswisscom%2Fbitbucket-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisscom%2Fbitbucket-cli/lists"}