# Installing packages

Derw's packages are Git based, with the ability to use private packages and specific revisions and branches. When fetching a package, Derw checks to see if there is a Node package.json contained within that repo, and if so, it will also pull the npm packages needed.

If you've just cloned a repo for the first time and want to install packages from the derw-package.json, you can simply do:

```bash
derw install
```

If you want to install a new package, you must provide a name and a version. This will be cloned and added to your derw-package.json.

```bash
derw install --name derw-lang/stdlib --version main
```

If you've installed a package at a particular branch and it has updated, simply run `derw install` again and it will fetch the latest version.

```bash
To install a new package run `derw install --name {package name} --version {version}`
Or run me without args inside a package directory to install all packages in derw-package.json
  --name string:		name of the package e.g derw-lang/stdlib
  --version string:		name of the package e.g main or master
  --quiet :		Keep it short and sweet
  -h, --help :		This help text
```


---

# 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.derw-lang.com/guides/installing-packages.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.
