# dbt-sugar doc

## dbt-sugar doc

### How to run dbt-sugar doc?

dbt-sugar guides you through the process of documenting a model by asking you a series of questions such as whether you want to add a model-level description, column-level description, tests and tags. To start documenting a model, make sure you navigate to where your `sugar_config.yml` resides as dbt-sugar needs to run from your dbt-sugar's project location. To see how to configure the `sugar_config.yml` head over to the [Sugar Config](/dbt-sugar/installation-and-configuration/configuration/sugar-config.md) page.&#x20;

* open a terminal window
* if you have installed dbt-sugar in a virtual environment, activate it
* navigate to your dbt-sugar folder (the folder in which you have created your \`sugar\_config.yml\`. For example:

```
cd ~/dbt_sugar
```

Call `dbt-sugar doc` and pass the following arguments:

* `--model` the name of the dbt model you want to document
* you can pass a `--syrup` which is the name of the config (See [Sugar Config](/dbt-sugar/installation-and-configuration/configuration/sugar-config.md) for more information) you want dbt-sugar to use. Syrups generally contain information such as which dbt\_projects are in scope and where these projects live on your machine.&#x20;

{% hint style="success" %}
**If you have configured a default syrup in your sugar\_config.yml you do not have to pass it to the CLI for every run**
{% endhint %}

```
dbt-sugar doc --model my_sweet_model --syrup maple_syrup
```


---

# 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://bitpicky.gitbook.io/dbt-sugar/commands/dbt-sugar-doc.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.
