# Install DCli

To get started with DCli you first need to install Dart and optionally the DCli tools.

{% hint style="info" %}
If you just want to use the DCli library then you don't need to install the [DCli tools](/dcli-tools-1/dcli-tools.md).
{% endhint %}

There are three methods for installing Dart and the DCli tools.

## Option 1) Use DCli library from your project

If you only want to use the DCli library then you can add DCli to your pubspec.yaml as you would any other package.

```yaml
cd /my/dart/project
dart pub add dcli
```

## Option 2) Install Dart/DCli

Start by installing Dart as per:

{% hint style="info" %}
Install Dart from: <https://dart.dev/get-dart>
{% endhint %}

If you want to use the [DCli tools](/dcli-tools-1/dcli-tools.md), including Shebang (#!) support you need to globally activate DCli.

Now activate the DCli tools:

```
dart pub global activate dcli
dcli install
```

## Option 3) Install Dart/DCli

This is still a work in progress but is intended to provide a three-line script to install Dart and the DCli tools.

{% tabs %}
{% tab title="Linux" %}

```
wget https://github.com/onepub-dev/dcli/releases/download/latest.linux/dcli_install
chmod +x dcli_install
sudo ./dcli_install
```

{% endtab %}

{% tab title="Windows" %}

```
curl https://github.com/onepub-dev/dcli/releases/download/latest.windows/dcli_install.exe
dcli_install.exe
```

{% endtab %}

{% tab title="OSX" %}

```
Coming soon:

curl https://github.com/onepub-dev/dcli/releases/download/latest.osx/dcli_install
dcli_install.exe
```

{% endtab %}
{% endtabs %}

## Install VSCode

You can use virtually any editor to create DCli scripts but we use and recommend Visual Studio Code (vscode) with the Dart-Code plugin.

{% hint style="info" %}
Install Visual Studio Code from: <https://code.visualstudio.com/download>
{% endhint %}

Now install the vs code extension for Dart - Dart Code:

{% hint style="info" %}
Install Dart-Code from: [dartcode.org](https://dartcode.org/#:~:text=You%20must%20have%20the%20VS,and%20debugger%20for%20VS%20Code.)
{% endhint %}

We use and recommend the following additional vscode extensions:

* Dart-Code.flutter
* dart-import
* pubspec-assist
* vscode-browser-preview
* bracket-pair-colorizer
* LogFileHighlighter


---

# 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://dcli.onepub.dev/getting-started.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.
