# I made a Beeminder NodeJS API client & shell script!

**URL:** <https://forum.beeminder.com/t/i-made-a-beeminder-nodejs-api-client-shell-script/1612>\
**Category:** Tech\
**Created:** [November 11, 2015, 4:53am UTC](https://forum.beeminder.com/t/i-made-a-beeminder-nodejs-api-client-shell-script/1612 "2015-11-11T04:53:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![malcolm](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/malcolm/32/67_2.png) [@malcolm](https://forum.beeminder.com/u/malcolm)\
**Post date:** [November 11, 2015, 4:53am UTC](https://forum.beeminder.com/t/i-made-a-beeminder-nodejs-api-client-shell-script/1612/1 "2015-11-11T04:53:41Z")

</div>

I made this in March but just realized I never really announced it—I made a javascript client for beeminder. It can be used both as an API (this was its original purpose, for [Complice](https://complice.co/)) and as a shell client. For the former, use **`npm install --save beeminder`** inside your node project; for the latter, run **`npm install -g beeminder`** and then run it using the command **`bm`**. ([What’s npm?](http://npmjs.com/))

If you type **`bm logo`** it’ll produce output as shown below. I have a custom terminal profile set up so that if I press `super-alt-b` then I get this window:

 ![](https://us1.discourse-cdn.com/flex019/uploads/beeminder/original/1X/c1181953c60a8ca60f71bf8ddc2b5b9384ade959.png)

The logo is just shown while my data is still loading. Once it does, you get…

![](https://us1.discourse-cdn.com/flex019/uploads/beeminder/original/1X/bdcb39f118a8c730c87663615cb882659b0b2dd9.png)

Then I can create a datapoint with the command shown there ( **`bm cd`** = BeeMinder CreateDatapoint). Although I actually have **`alias b='bm cd'`** to make it even quicker 🕶

Anyway, I welcome feedback on it as a command line tool and as an API client. Feel free to submit pull requests to [the github repo](https://github.com/malcolmocean/beeminderjs) as well!

---

<div class="post-metadata">

**Author:** ![malcolm](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/malcolm/32/67_2.png) [@malcolm](https://forum.beeminder.com/u/malcolm)\
**Post date:** [November 11, 2015, 4:57am UTC](https://forum.beeminder.com/t/i-made-a-beeminder-nodejs-api-client-shell-script/1612/2 "2015-11-11T04:57:37Z")

</div>

Oh, and the way I have the custom terminal set up (on Ubuntu) is that I created a new profile, with a yellowy color and square dimensions (70 cols & 32 rows). Then, in the Commands section of CompizConfig Settings Manager, I set up a shortcut to run the command

```
gnome-terminal --window-with-profile=Beeminder -x bash -c "echo ""; bm logo; bm status; bash"

```

Tada!

---

<div class="post-metadata">

**Author:** ![mattepp](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/mattepp/32/1546_2.png) [@mattepp](https://forum.beeminder.com/u/mattepp)\
**Post date:** [July 31, 2018, 9:55pm UTC](https://forum.beeminder.com/t/i-made-a-beeminder-nodejs-api-client-shell-script/1612/3 "2018-07-31T21:55:18Z")

</div>

Malcolm! **This is amazing!** Thank you! I’ve wanted this for some time and it never occurred to me to see if it already existed! \<3

@dreev @bee IMHO the existence of this command could use way more attention. 🙂
