> ## Documentation Index
> Fetch the complete documentation index at: https://atopile-fix-mcp-install-instructions.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Take-off

See the [installation guide](./guides/install) for advanced setups.
For the simple way to get started, read on.

## Install via VSCode/Cursor (Recommended)

atopile officially supports VSCode and Cursor.

We recommend using Cursor. AI is already getting very good at writing `ato` code.

Download it here: [https://www.cursor.com/](https://www.cursor.com/)

Once you have VSCode/Cursor just install the [atopile VSCode/Cursor extension](vscode:extension/atopile.atopile).

<img src="https://mintcdn.com/atopile-fix-mcp-install-instructions/bPEjrOZGIAHd4X3v/atopile/images/vscode-plugin.png?fit=max&auto=format&n=bPEjrOZGIAHd4X3v&q=85&s=ac34eba011dcc8468edf181f3dd42131" alt="atopile extension" width="279" height="178" data-path="atopile/images/vscode-plugin.png" />

After installation it will prompt you to install the `ato` CLI. Click the `Install Automatically` button.

<img src="https://mintcdn.com/atopile-fix-mcp-install-instructions/bPEjrOZGIAHd4X3v/atopile/images/vscode-plugin-install-popup.png?fit=max&auto=format&n=bPEjrOZGIAHd4X3v&q=85&s=256c3b3d6dee2326b255655510125a1d" alt="atopile extension install" width="384" height="126" data-path="atopile/images/vscode-plugin-install-popup.png" />

<Accordion title="(Experimental) MCP server">
  Use the following to connect AI applications to this documentation

  <Tabs>
    <Tab title="URL">
      ```cURL
      https://docs.atopile.io/mcp
      ```
    </Tab>

    <Tab title="Cursor">
      [Install MCP Server](cursor://anysphere.cursor-deeplink/mcp/install?name=atopile-docs\&config=eyJ1cmwiOiJodHRwczogLy9kb2NzLmF0b3BpbGUuaW8vbWNwIn0%3D)
    </Tab>

    <Tab title="Claude Code">
      ```bash
      claude mcp add --transport http atopile-docs https://docs.atopile.io/mcp
      ```
    </Tab>
  </Tabs>
</Accordion>

## Installing KiCAD

If you want to layout or route PCBs you will need to install [KiCAD](https://www.kicad.org/download/).

<CodeGroup>
  ```sh macOS (brew)
  brew install kicad
  ```

  ```sh Arch Linux
  sudo pacman -S kicad
  ```

  ```sh Ubuntu
  sudo apt install kicad
  ```

  ```sh other
  https://www.kicad.org/download/
  # or click the KiCAD link above
  ```
</CodeGroup>

## Trying out an example

Press `Ctrl+Shift+P` and search for `atopile: Open Example`.

<img src="https://mintcdn.com/atopile-fix-mcp-install-instructions/bPEjrOZGIAHd4X3v/atopile/images/quick-select-example.png?fit=max&auto=format&n=bPEjrOZGIAHd4X3v&q=85&s=257c79408fd3f3db3850b4178ffcac0b" alt="open example" width="863" height="173" data-path="atopile/images/quick-select-example.png" />

Choose any example you like from the selection.
After confirming wait for the `ato menu bar` to appear:

<img src="https://mintcdn.com/atopile-fix-mcp-install-instructions/bPEjrOZGIAHd4X3v/atopile/images/ato-menu-bar.png?fit=max&auto=format&n=bPEjrOZGIAHd4X3v&q=85&s=590008c82de09ce3386332b11e2ca315" alt="ato menu bar" width="457" height="230" data-path="atopile/images/ato-menu-bar.png" />

Press on the play button to compile the example.
You will be greeted by the logs in the terminal:

<img src="https://mintcdn.com/atopile-fix-mcp-install-instructions/bPEjrOZGIAHd4X3v/atopile/images/ato-example-build.png?fit=max&auto=format&n=bPEjrOZGIAHd4X3v&q=85&s=b06d4631a04ee95d55b5e0be22d03f2a" alt="compile example" width="527" height="425" data-path="atopile/images/ato-example-build.png" />

If you have KiCAD installed, you can now press on the PCB icon in the ato menu bar to open the layout file.

## A typical workflow

1. Sketch your circuit on paper.
2. Search [https://packages.atopile.io](https://packages.atopile.io) and GitHub for pre-existing modules you need, and use `ato add` to install them.
3. Design a module and do its calculations using `ato` code.
4. Run `ato build` to compile your project, choose components to suit your design, and update your layout (PCB) file.
5. Use KiCAD to lay out any changes
6. Repeat steps 3-5 until you're happy with your design.
7. When you're done with your design, push your changes to your repo.
8. CI will automatically build and test your project, and generate the manufacturing files you need to order your PCBs.
9. Take these manufacturing files to your PCB manufacturer to get your PCBAs.

```mermaid
graph TB
  A[Sketch] --> AA['ato create project'];
  AA --> BB[Pick a module];
  BB --> B{Package exists?};
  B -->|Yes 🥳| C['ato add'];
  B -->|No| CC['ato create component' and Design it! 👨‍💻];
  C --> D[Hook it up];
  CC --> D;
  D --> E['ato build'];
  E --> F[Layout using KiCAD];
  F --> G{More modules to do?};
  G -->|Yes| BB;
  G -->|No 🎉| H[Download gerbers from CI ✅];
  H --> I[Order PCBs from manufacturer 🛠️];
```

## Creating a project

```sh
ato create project
```

And follow the prompts to create a new project from the template.

## Project Structure

Your new project will have a file structure like this:

```
.
├── LICENSE                    # 1. Default MIT license. You are free to change this
├── README.md                  # 2. A description of your project
├── ato.yaml                   # 3. atopile's configuration file
├── build                      # 4. Build artifacts and cache (not version controlled)
├── layouts                    # 5. KiCAD layout files
│   └── default                # 6. There's a directory / layout per "build target"
│       └── default.kicad_pcb  # 7. The layout file that will be updated every time you run `ato build -b default`
└── demo.ato                   # 8. Your atopile source file
```

The most important three files in there are:

* `demo.ato` - your atopile source file - this is where you write your atopile code
* `default.kicad_pcb` - the layout file - this is the "board" file that looks like a PCB, and you can order from
* `ato.yaml` - atopile's configuration file - this file is how atopile knows this is a project and what to do when you run `ato build`

## Hello, World!

Here's a simple example of atopile code:

<QuickstartExample />

Update `demo.ato` (of whatever you've named your source file) with this code.

To build it, run:

```sh
ato build --open
```

You should see a flurry of activity in the terminal with this message towards the end

```sh
INFO     Build successful! 🚀
```

Then KiCAD will open up (that's what the `--open` flag does).
Your shiny ✨ new component should be waiting for you in the top left corner (possibly off the current screen).

<img src="https://mintcdn.com/atopile-fix-mcp-install-instructions/bPEjrOZGIAHd4X3v/atopile/images/quickstart-layout.png?fit=max&auto=format&n=bPEjrOZGIAHd4X3v&q=85&s=47b3855d8cb04ee8f3b51429bf304498" alt="layout" width="1166" height="844" data-path="atopile/images/quickstart-layout.png" />

Oh yeah! We're in business. 😎

## What's next?

This isn't even a circuit yet, merely a single component however you now:

* Have the `ato` CLI and compiler set up and working
* Know how to add components to your design
* Have KiCAD installed and working

In the [tutorial](./essentials/1-the-ato-language) we continue with a real circuit, installing and using packages, maths and version control.
