CLI and REPL for andbang

npm install andbang-cli
8 downloads in the last week
21 downloads in the last month


CLI and REPL for andbang

Getting Started


Install the module with: npm install andbang-cli. Use -g to install it globally so you can run it as just andbang.

Get an auth token

  • Register an app
  • Use any name and set the url to http://localhost:3003/auth/andbang/callback
  • Run andbang --id ID --secret SECRET with you app's id and secret
  • Navigate to http://localhost:3003 and click auth
  • Once your app is authorized, generate a token
  • Run andbang --token TOKEN to save your token for the future


CLI options:

  • -r --repl will open a repl to interact with the API
  • -m --method method to run on the API
  • -p --params params to pass to the method


Auth and open a repl:

$ andbang -r
Waiting for the API...
andbang> getMyActiveTask
Couldn't lookup the team:
andbang> getMyActiveTask(1)
{ ... JSON for active task on team 1 ... }

Auth and run the method getMyActiveTask on the API with the parameter 1:

$ andbang -m getMyActiveTask -p 1


  • Named argument parsing (team, etc)
  • Display available teams
  • Unify repl and cli parsing code
  • Make repl more robust. Only hijack commands when necessary.

Release History

API is still changing

  • 0.2.1 - Use REST API when not using the repl
  • 0.2.0 - Instructions for app and auth token generation.
  • 0.1.x - Proof of concept.


Copyright (c) 2013 Luke Karrys
Licensed under the MIT license.

npm loves you