PageRenderTime 58ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/README.md

https://bitbucket.org/mgemmill/bitbucket-cli
Markdown | 83 lines | 47 code | 36 blank | 0 comment | 0 complexity | 78aafc808d682abc5f96d11130cf0451 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. # BitBucket CLI
  2. A command-line helper for BitBucket. This program is inspired Chris Wanstrath's
  3. wonderful [github command-line program](https://github.com/defunkt/github-gem),
  4. and aims to expose a similar interface for BitBucket users.
  5. ## Installation
  6. pip install bitbucket-cli
  7. ## Usage
  8. The BitBucket CLI can be involked with either `bitbucket` or the shortened `bb` command:
  9. bitbucket <command> [options]
  10. or
  11. bb <command> [options]
  12. Most `bitbucket` commands take some or all of the following options:
  13. -h, --help show this help message and exit
  14. -u USERNAME, --username=USERNAME your bitbucket username
  15. -p PASSWORD, --password=PASSWORD your bitbucket password
  16. -o, --public make this repo public
  17. -c, --private make this repo private
  18. -P PROTOCOL, --protocol=PROTOCOL which network protocol to use (https|ssh)
  19. For `help` with any command:
  20. bb <command> --help
  21. ## Available Commands & Examples
  22. `clone` an existing BitBucket repository:
  23. ... bb clone --username <your-user-name> --protocol ssh zhemao bitbucket-cli
  24. `pull` a BitBucket repository:
  25. ... bb pull <owner-name> <repo-name>
  26. `create` a new BitBucket repository:
  27. ... bb create --username <your-user-name> --public --protocol ssh <new-repo-name>
  28. Creating a new BitBucket repository from an existing local repository is easy with `create_from_local`:
  29. ... bb create_from_local --username <your-user-name> --public --protocol ssh <repo-owner> <repo-name>
  30. `update` a BitBucket repository. Currently the only option is to change whether a repository is
  31. *public* or *private*. This example will make the repository private:
  32. ... bb update --username <user-name> --private <repo-name>
  33. `delete` one of your BitBucket repository:
  34. ... bb delete --username <your-user-name> <repo-name>
  35. For the `clone`, `pull`, and `create_from_local` commands, the *scm* (either *git* or *hg*) will be
  36. detected from bitbucket or your local filesystem. Explicitly declaring the
  37. *scm* on the command line or from the user configuration will not override it.
  38. ## Configuration
  39. You can create a configuration file in ~/.bitbucket that follows the following
  40. format
  41. [auth]
  42. username = <Your Username>
  43. password = <Your Password>
  44. [options]
  45. scm = <'git' or 'hg'>
  46. protocol = <'https' or 'ssh'>
  47. It will provide default options which can be overridden on the command line.