This is a cross-post from the Bitbucket Blog

Teams that use Bitbucket often want to share important information that isn’t part of their project repository – favorite regexes, config files, code snippets, homebrew recipes (beers, and the package manager). And yes – image, audio, video, and a host of other MIME types. Currently, there’s no way to share such information via Bitbucket.

Snippets for teams

We’re thrilled to announce Snippets, available now in Bitbucket, where you can create and manage multi-file snippets of all kinds. We took a different approach than standard pastebin or gist and we built Snippets around teams. Snippets can be shared with your team, made private to you, or fully public; you control read and write privileges. If you create a snippet owned by your team, the snippet will stay with the team forever, even after you leave that team.


Additional features

In Bitbucket, you’ll find a clean, easy interface to create, edit, version, and share Snippets. It’s media-friendly, supports drag-and-drop, and features syntax highlighting for over 90 programming languages.

Because Snippets are backed by Git or Mercurial repositories, power users can clone and edit them like any other distributed code repositories.

Rich set of APIs

You can use Snippets’ rich set of APIs to further extend functionality, and access the core set of features from desktop, mobile, and web apps. For example, this command line interface for creating, inspecting, and editing Bitbucket Snippets uses this python wrapper built on top of the Snippets API. For more info, please visit the Snippets API documentation: Snippets REST API

Snippets via command line

Most importantly, we’ve made it easy to create Snippets via the command line. Creating a snippet from your local file is just a single curl command:

$ curl -X POST{username} \
 -u {username} -F file=@myawesomefile.txt

Bitbucket snippets for teams are here with a rich set of APIs