<p>Sure, you can do this with <a href="http://cryptocoinjs.com/" rel="nofollow">CryptoCoinJS</a>. </p>

<p>First <a href="http://nodejs.org/download/" rel="nofollow">download Node.js</a>. Then do the following:</p>

<p>Make a new directory:</p>

<pre><code>mkdir /tmp/myapp
cd /tmp/myapp
</code></pre>

<p>Initialize your app:</p>

<pre><code>npm init
</code></pre>

<p>Then run:</p>

<pre><code>npm install --save coinkey@1.1.0
</code></pre>

<p>Then run:</p>

<pre><code>npm install --save coininfo@0.2.0
</code></pre>

<p>Create your js file:</p>

<pre><code>touch app.js
</code></pre>

<p>Put the following:</p>

<pre><code>var CoinKey = require('coinkey')
var ci = require('coininfo')

var amount = 10
//generate a bunch of Litecoin addresses
for (var i = 0; i &lt; amount; ++i) {
  var ck = CoinKey.createRandom(ci('LTC').versions) //change LTC to BTC if you want Bitcoin
  console.log(ck.privateWif + ': ' + ck.publicAddress)
}
</code></pre>

<p>Run your script:</p>

<pre><code>node app.js
</code></pre>

<p>Documentation for <a href="http://cryptocoinjs.com/modules/currency/coinkey/" rel="nofollow">coinkey</a>
Documentation for <a href="http://cryptocoinjs.com/modules/currency/coininfo/" rel="nofollow">coininfo</a>.</p>

<p>Hope this helps. If something doesn't work, let me know.</p>

CC BY-SA 3.0
2014-07-05T11:38:45.803Z
ehi jp, I'll try and give a feed! thanks!
Damiano Barbati
CC BY-SA 3.0
2014-06-26T00:35:26.077Z
2014-06-26T00:35:26.077Z
JP Richardson
<p>Do you know any bash script or C simple program to generate btc and ltc addresses? I need to generate address while in recovery mode on osx or on a linux onthefly. But I cannot find such a thing on github: they're in python or never compiles or just do btc or ltc.</p>

<address><vanity-address><vanitygen>
Bash BTC and LTC address generator
Damiano Barbati
# Bash BTC and LTC address generator

(Asked by: username_0 on 2014-06-25)

Do you know any bash script or C simple program to generate btc and ltc addresses? I need to generate address while in recovery mode on osx or on a linux onthefly. But I cannot find such a thing on github: they're in python or never compiles or just do btc or ltc.

**Tags:** address, vanity-address, vanitygen


---

## 1 answers

### Answer by username_1 on 2014-06-26. Score: 1

Sure, you can do this with [CryptoCoinJS](http://cryptocoinjs.com/).

First [download Node.js](http://nodejs.org/download/). Then do the following:

Make a new directory:

```
mkdir /tmp/myapp
cd /tmp/myapp

```

Initialize your app:

```
npm init

```

Then run:

```
npm install --save coinkey@1.1.0

```

Then run:

```
npm install --save coininfo@0.2.0

```

Create your js file:

```
touch app.js

```

Put the following:

```
var CoinKey = require('coinkey')
var ci = require('coininfo')

var amount = 10
//generate a bunch of Litecoin addresses
for (var i = 0; i < amount; ++i) {
  var ck = CoinKey.createRandom(ci('LTC').versions) //change LTC to BTC if you want Bitcoin
  console.log(ck.privateWif + ': ' + ck.publicAddress)
}

```

Run your script:

```
node app.js

```

Documentation for [coinkey](http://cryptocoinjs.com/modules/currency/coinkey/)
Documentation for [coininfo](http://cryptocoinjs.com/modules/currency/coininfo/).

Hope this helps. If something doesn't work, let me know.

> **Comments:**
> **username_0**: ehi jp, I'll try and give a feed! thanks!  

---

