> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atopile.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 4. Packages

One of the key benefits of designing circuit boards with code is that it unlocks modularity. As in software, this modularity means you can package up and reuse modules others have developed and tested.

## Finding packages

Check [first-party packages](https://packages.atopile.io/) for a list designed and used internally at atopile. Discussion planning to open this up publicly
These are built, known to work and come with a functioning layout too.

Also, Google is your friend. Packages are often publicly available on github or other repositories.

## Using packages

First, add the package dependency to your project with `ato add`

```bash theme={null}
ato add atopile/ti-ads1115
```

```ato theme={null}
from "ti-ads1115.ato" import TI_ADS1115

module ExampleADCProject
    adc = new TI_ADS1115
```

After building your project, use the [KiCad plugins](./6-layout#start-with-existing-packages) to pull the layout from the package.

## Managing dependencies

Dependencies of your project can be found in the project/ato.yaml file.

```ato theme={null}
dependencies:
  - type: registry
    identifier: atopile/buttons
    release: 0.2.2
  - type: registry
    identifier: atopile/ti-ads1115
    release: 0.1.6
```

You can manage dependencies using three commands: `ato add`, `ato sync` and `ato remove`.

All dependency commands keep your installed packages in sync automatically, so you don't need to think too much about managing environments.

Here are the key commands:

### `ato sync`

Installs all dependencies listed in `ato.yaml`. Run this when you pull a new project. Dependencies are cached in project/.ato directory

### `ato add {package}`

Adds a new package dependency to your project:

* Adds the package to `ato.yaml`
* Installs the package locally
* Syncs all dependencies

### `ato remove {package}`

Removes a package dependency from your project:

* Removes the package from `ato.yaml`
* Removes the package locally
* Syncs remaining dependencies

<Tip>
  atopile manages dependencies in a similar way to [uv](https://docs.astral.sh/uv/). If you know how that works, think about it in the same way!
</Tip>

## Development dependencies

You can install dependencies from git:

`ato add git://{git-url}`

or from a local directory:

`ato add file://./path/to/package`

Importantly, you cannot publish a package that depends on unpublished packages.
