Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jimmycuadra/bang
Text snippets on the command line.
https://github.com/jimmycuadra/bang
application cli coffeescript javascript library utility
Last synced: about 1 month ago
JSON representation
Text snippets on the command line.
- Host: GitHub
- URL: https://github.com/jimmycuadra/bang
- Owner: jimmycuadra
- License: mit
- Created: 2011-11-09T07:29:35.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2018-06-30T06:43:33.000Z (over 6 years ago)
- Last Synced: 2024-11-07T18:54:17.009Z (2 months ago)
- Topics: application, cli, coffeescript, javascript, library, utility
- Language: CoffeeScript
- Homepage: http://jimmycuadra.github.io/bang/docs/bang.html
- Size: 448 KB
- Stars: 31
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![build status](https://secure.travis-ci.org/jimmycuadra/bang.png)](http://travis-ci.org/jimmycuadra/bang)
# Bang**Bang** is a command line tool for quick storage and retriveal of text snippets. It is inspired by and very similar to [holman](https://github.com/holman)'s [Boom](https://github.com/holman/boom). The main difference is that Bang has no concept of lists: it is only one level deep. It also has a simpler interface to avoid accidentally creating stuff.
## Installation
Requirements:
* [Node](http://nodejs.org)
* [npm](http://npmjs.org/)Then:
$ npm install -g bang
## Get help
$ bang -h
Or, if you have not yet stored any data, simply run `bang`.
## Add a snippet
$ bang jimmy http://jimmycuadra.com/
## Retrieve a snippet
$ bang jimmy
http://jimmycuadra.com/The value is copied to your clipboard.
## Delete a snippet
$ bang -d jimmy
## List all snippets
$ bang
jimmy: http://jimmycuadra.com/
mtnt: http://morethingsneed.to/
address: 237 Overlook Street## Storage
Bang's data is serialized to JSON and peristed to a file at `~/.bang`. If you want to share your Bang data across multiple machines, you can move the file to [Dropbox](https://www.dropbox.com/) or some other type of network disk, and then symlink it to `~/.bang` on your local machine.
## Using Bang programmatically
Bang can also be used from a Node program directly. Simply `require("bang")` to import the core Bang class with access to all the CRUD methods.
## Tests
Bang includes a comprehensive test suite using [Jasmine](https://jasmine.github.io/). To run it:
$ npm install -g coffee-script
$ git clone http://github.com/jimmycuadra/bang.git
$ cd bang
$ npm install
$ cake specFor continuous testing, use `cake watch`. This also rebuilds CoffeeScript files whenever the tests are run.