# Dependency Management

## Dependency Management

Dart has a large collection of built in packages. You can read about the core packages at:

<https://dart.dev/guides/libraries/library-tour>

However, sometimes you need a specialised package.

There are thousands of third party packages that you can use in your DCli scripts which can be found at:

<https://pub.dev/packages>

{% hint style="warning" %}
NOTE: you can't use Flutter or web packages in your DCli scripts.
{% endhint %}

To use an external package you need to add it as a dependency to your script.

Dart's dependency management is done via a pubspec.yaml file.

Each package includes install instructions which is simply a matter of adding a dependency line to your pubspec and running:

`dcli prepare`.


---

# 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/dependency-management-1/dependency-management.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.
