# CLI

## Install

### Install in your project

```bash
npm i dubnium@latest
```

### Install globally

```bash
sudo npm i dubnium@latest -g
```

## Use

If you installed it [globally](#install-globally)

```bash
dubnium <command>
```

If you installed it [in your project](#install-in-your-project)

```bash
npx dubnium <command>
```

### Commands

Commands are **similar** to the API. If you want to call a function on a Record, do **not** put `get().func()`. Instead, make the command just `func` and put the Record's tag as the first arg when prompted.

### Example

![](https://content.gitbook.com/content/feSpBBIwpWeqLZM360eK/blobs/mnZvT6MOglW5nGTnodNj/cli_example.png)

The CLI will ask for a few values, and then the method will be run and the return value is logged to the console.

## Invoke Programmatically

{% hint style="warning" %}
Make sure the command is present when you run the file.

```bash
node index.js <command>
```

{% endhint %}

{% code lineNumbers="true" %}

```javascript
require("dubnium/cli")
```

{% endcode %}
