Skip to content

Instantly share code, notes, and snippets.

@HomerJSimpson
Last active December 20, 2015 05:08
Show Gist options
  • Save HomerJSimpson/6075583 to your computer and use it in GitHub Desktop.
Save HomerJSimpson/6075583 to your computer and use it in GitHub Desktop.
List my bitbucket repositories from the command line
#!/bin/bash
# Usage:
# listBBRepos.sh [bitbucket username]
curl -su "$1" https://api.bitbucket.org/1.0/users/"$1" | perl -MJSON -MData::Dumper -ne'
my $data = from_json($_);
foreach my $repo (@{$data->{repositories}}) {
print $repo->{slug}, "\n";
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment