> For the complete documentation index, see [llms.txt](https://db.coolstone.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://db.coolstone.dev/2/cli.md).

# CLI

Run Dubnium functions from your command-line!

## Install

Dubnium CLI comes with all v2 versions

### 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://113601660-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu7oRoN9oGoMk6xetuV0e%2Fuploads%2FUW4t5njJ4bKzFlEUzMNi%2Fcli_example.png?alt=media\&token=98afb0bc-bbf7-4b87-8e79-cc4710226524)

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 %}
