# Overview

## Install&#x20;

Dubnium is available on npm or GitHub (requires Node.js) and is available for CommonJS and ECMAScript modules.

### Download it from npm <a href="#npm" id="npm"></a>

{% hint style="info" %}
We strongly recommend using npm.
{% endhint %}

```bash
npm i dubnium
```

Check out our [npm page](https://npmjs.com/dubnium).

### Or download it from GitHub <a href="#github" id="github"></a>

<https://github.com/coolstone-tech/dubnium>

## Initialize

{% tabs %}
{% tab title="Commonjs" %}
{% code lineNumbers="true" %}

```javascript
const Dubnium = require('dubnium') 
const db = new Dubnium('dirPath','ext')
```

{% endcode %}
{% endtab %}

{% tab title="ECMAScript" %}
{% code lineNumbers="true" %}

```javascript
import Dubnium from 'dubnium'
const db = new Dubnium('dirPath','ext')
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Make your first Record

{% code lineNumbers="true" %}

```javascript
db.create('tag', content)
```

{% endcode %}

## Get a Record

{% tabs %}
{% tab title="One" %}
{% code lineNumbers="true" %}

```javascript
db.get('tag')
```

{% endcode %}
{% endtab %}

{% tab title="All" %}
{% code lineNumbers="true" %}

```javascript
db.getAll()
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Delete a Record

{% code lineNumbers="true" %}

```javascript
db.get('tag').delete()
```

{% endcode %}

## Modify a Record

{% tabs %}
{% tab title="Content" %}
{% hint style="danger" %}
This will overwrite your record with the content provided.
{% endhint %}

{% code lineNumbers="true" %}

```javascript
db.get('tag').edit("new_content")
```

{% endcode %}
{% endtab %}

{% tab title="Tag" %}
{% code lineNumbers="true" %}

```javascript
db.get("old_tag").setTag("new_tag")
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Check out our full docs for more API methods and in-depth explanations.


---

# 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/3/overview.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.
