# Install CLI tools

OnePub includes a couple of CLI tools to make it easy to publish directly from the CLI using the existing dart tooling.

The following guide explains how to install the OnePub CLI tools.

For the majority of our users, we naturally assume they have Dart or Flutter installed, in case you don't, please follow the instructions to install Dart from here:

{% embed url="<https://dart.dev/get-dart>" %}

{% hint style="danger" %}
If you are running a dart version prior to 2.12 then follow the [alternate install](/guides/installing/pre-dart-2.12.md) instructions.
{% endhint %}

{% hint style="warning" %}
If you are running a dart version prior to 2.15 then read the [pre 2.15 guide](/guides/installing/pre-dart-2.15.md).
{% endhint %}

Once you have dart installed and running, run the following commands:

```bash
dart pub global activate onepub
onepub login
```

Note that \`onepub login\` runs a webserver on your local machine to collect the token as returned from the auth provider. This only runs from the moment it opens your browser to the moment the login completes. This is on `http://127.0.0.1:42666/.`&#x20;

You may need you to unblock tcp port 42666 temporarily if you are running a firewall on your PC.

{% hint style="info" %}
If you have flutter installed replace `dart pub` with `flutter pub`
{% endhint %}

{% hint style="danger" %}
If you are running a dart version prior to 2.12 then follow the [alternate install](/guides/installing/pre-dart-2.12.md) instructions.
{% endhint %}

See the section on [CLI Tools](/guides/cli-integration.md) for details on the commands available.


---

# 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://docs.onepub.dev/guides/installing/install-cli-tools.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.
