# ironfish

> CLI for running and interacting with an Iron Fish node

Latest version **2.12.0** (published 2025-08-12) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install ironfish
pnpm add ironfish
yarn add ironfish
bun add ironfish
```

Provides the command `ironfish`.

## Health

**Score 40/100 (D)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; declining downloads.

## Facts

| | |
|---|---|
| Version | 2.12.0 |
| Published | 2025-08-12 |
| First published | 2022-03-09 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 26 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 (+47 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 968 |
| Author | Iron Fish |
| Maintainers | engineering-if, derek-if |

## Links

- npm: https://www.npmjs.com/package/ironfish
- Repository: https://github.com/iron-fish/ironfish
- Homepage: https://ironfish.network
- Issues: https://github.com/iron-fish/ironfish/issues
- npm.io page: https://npm.io/package/ironfish

## Dependencies (26)

- [tar](https://npm.io/package/tar.md) 6.1.11
- [blru](https://npm.io/package/blru.md) 0.1.6
- [uuid](https://npm.io/package/uuid.md) 8.3.2
- [axios](https://npm.io/package/axios.md) 1.7.7
- [chalk](https://npm.io/package/chalk.md) 4.1.2
- [bech32](https://npm.io/package/bech32.md) 2.0.0
- [keccak](https://npm.io/package/keccak.md) 3.0.4
- [blessed](https://npm.io/package/blessed.md) 0.1.81
- [inquirer](https://npm.io/package/inquirer.md) 8.2.5
- [buffer-map](https://npm.io/package/buffer-map.md) 0.0.7
- [@oclif/core](https://npm.io/package/@oclif/core.md) 4.0.11
- [cli-progress](https://npm.io/package/cli-progress.md) 3.12.0
- [string-width](https://npm.io/package/string-width.md) 4.2.3
- [@ironfish/sdk](https://npm.io/package/@ironfish/sdk.md) 2.12.0
- [json-colorizer](https://npm.io/package/json-colorizer.md) 2.2.2
- [natural-orderby](https://npm.io/package/natural-orderby.md) 3.0.2
- [@ledgerhq/errors](https://npm.io/package/@ledgerhq/errors.md) 6.19.1
- [@zondax/ledger-js](https://npm.io/package/@zondax/ledger-js.md) 1.2.0
- [@oclif/plugin-help](https://npm.io/package/@oclif/plugin-help.md) 6.2.5
- [supports-hyperlinks](https://npm.io/package/supports-hyperlinks.md) 2.2.0
- [@ironfish/rust-nodejs](https://npm.io/package/@ironfish/rust-nodejs.md) 2.10.0
- [@oclif/plugin-not-found](https://npm.io/package/@oclif/plugin-not-found.md) 3.2.10
- [@zondax/ledger-ironfish](https://npm.io/package/@zondax/ledger-ironfish.md) 1.1.0
- [@ironfish/multisig-broker](https://npm.io/package/@ironfish/multisig-broker.md) 0.3.0
- [@ledgerhq/hw-transport-node-hid](https://npm.io/package/@ledgerhq/hw-transport-node-hid.md) 6.29.5
- [@oclif/plugin-warn-if-update-available](https://npm.io/package/@oclif/plugin-warn-if-update-available.md) 3.1.8

## Recent versions

- 2.12.0 (latest) — 2025-08-12
- 2.11.0 — 2025-03-04
- 2.10.0 — 2024-12-17
- 2.9.0 — 2024-11-07
- 2.8.1 — 2024-10-10
- 2.8.0 — 2024-10-09
- 2.7.0 — 2024-09-27
- 2.6.0 — 2024-09-20
- 2.5.0 — 2024-08-01
- 2.4.1 — 2024-07-08
- 2.4.0 — 2024-06-24
- 2.3.0 — 2024-04-25
- 2.2.0 — 2024-04-16
- 2.1.0 — 2024-03-14
- 2.0.0 — 2024-03-06
- … 76 more at https://npm.io/package/ironfish/versions

## README

[![codecov](https://codecov.io/gh/iron-fish/ironfish/branch/master/graph/badge.svg?token=PCSVEVEW5V&flag=ironfish-cli)](https://codecov.io/gh/iron-fish/ironfish)

The main entry point for an Iron Fish CLI that is capable of mining blocks and spending notes. It's created using the [oclif CLI framework](https://oclif.io)

## Starting the CLI

If you're still in the `ironfish` directory in your terminal window, run `cd ironfish-cli`.

- Otherwise, you'll get a "Command not found" error.

Next, start the CLI with this command:

- `yarn start`

## Usage Scenarios

### Starting a single node

Run this command in the terminal:

- `yarn start start`

Interact with the node in a new terminal window:

- `yarn start status`
  - Show your node's status
- `yarn start wallet:balance`
  - Show the balance of your account, including $IRON from blocks you've mined
  - Tentative balance includes all known transactions. Spending balance includes only transactions on blocks on the main chain
- `yarn start faucet`
  - Request a small amount of $IRON for testing payments
- `yarn start wallet:send`
  - Send $IRON to another account
- `yarn start wallet:transactions [account]`
  - Display transactions from and to your account

### Start a node and start mining

Run these commands in two different terminals:

- `yarn start start`

  - Defaults to port 9033
  - This is equivalent to `yarn start start -d default -p 9033`

- `yarn start miners:start`

  - The default thread count is 1.
  - You can increase the number of threads by adding `--threads <number>`. Use `-1` to autodetect threads based on your CPU cores.

  - Examples:
    - `yarn start miners:start --threads 4`
      - To use 4 physical CPU cores
    - `yarn start miners:start --threads -1`
      - To use all the cores on your CPU
      - This may make your machine unresponsive or perform worse than a lesser number.
      - You may want to start with a low thread count and increase it until your hashrate stops increasing.
  - Note: Hyperthreading (2 miner threads per CPU core) is not fully optimized yet

You should see messages in the second terminal indicating that the miner is running:

- `Starting to mine with 8 threads`
- `Mining block 6261 on request 1264... \ 1105974 H/s`
  - The H/s number corresponds to the hashrate power of your machine with the given number of mining threads.
  - Performance reference: 8-core 3.8+ GHz AMD Ryzen 7 4700G with 8 threads gave the above 1.1 M H/s.

When a block is mined, you will see a status line in the node's terminal (the first terminal):

- `Successfully mined block xxx (6543) has 1 transactions`
- Mining 1 block can take several hours or days, depending on your machine's hashrate.
- Your miner may display `Submitting hash for block`, but this does not necessarily mean you've mined a block. The block still needs to be created, validated, and checked to be heavier by the node before it can be added to the main chain.
  - In these cases, your node will display "Discarding block" or "Failed to add block".

### Multiple Nodes

Run these commands in two different terminals:

- `yarn start start -d default -p 9033`
- `yarn start start -d client -p 9034 -b ws://localhost:9033`

You should see connection messages indicating that the two nodes are talking to each other.

### Multiple Nodes with Miners

**Node 1**

```bash
# in tab 1
yarn start start

# in tab 2
yarn start miners:start
```

**Node 2**

```bash
# in tab 3
yarn start start --datadir ~/.ironfish2 --port 9034 --bootstrap ws://localhost:9033

# in tab 4
yarn start miners:start --datadir ~/.ironfish2
```

**Running a Development Node**

```bash
# in tab 1
yarn start start --networkId=2 --datadir ~/.ironfish-dev 

# in tab 2
yarn start miners:start --datadir ~/.ironfish-dev

# in tab 3, to check the status of the node
yarn start status --datadir ~/.ironfish-dev 

# in tab 3, to check the wallet balance
yarn start wallet:balance --datadir ~/.ironfish-dev 
```

[More information on local mining and testing](https://ironfish.network/developers/documentation/integration_local)


## Documentation

[CLI Commands](https://ironfish.network/use/get-started/cli-commands)

---
_Source: https://npm.io/package/ironfish · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
