# CLI

## 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

![](/files/GPi9ilO2XHRwf6BMak1k)

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://db.coolstone.dev/2/cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
