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

# Development Setup

> Get your dev environment connected to MARS in under 10 minutes.

Everything runs on the robot. You SSH in, edit code, restart. That's it.

## Connect to MARS

<Steps>
  <Step title="Find your robot's IP">
    Open the Innate app. Go to **Configuration** → **WiFi**. Note the IP address.
  </Step>

  <Step title="SSH in">
    ```bash theme={null}
    ssh jetson1@<YOUR-ROBOT-IP>
    ```

    Default password: `goodbot`. See [Connecting via SSH](/robots/mars/connecting-via-ssh) for hostname, Ethernet, and USB-C options.
  </Step>

  <Step title="Open your IDE over SSH (don't skip this)">
    <Warning>
      This step is the foundation of the whole MARS development workflow. All your code lives and runs **on the robot** — there is no local build to sync. Working in your IDE over Remote SSH means you edit the files directly where they execute, with hot reload picking up your changes. Skipping this and editing over plain `ssh` + terminal editors works, but is far slower in practice.
    </Warning>

    Use **Cursor**, **Windsurf**, **VSCode**, or any editor with Remote SSH support. In plain VSCode, install the **Remote - SSH** extension first (Cursor and Windsurf ship with it built in).

    1. Open Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`).
    2. Run **Remote-SSH: Connect to Host...**.
    3. Enter `jetson1@<YOUR-ROBOT-IP>`.
    4. Open the folder `/home/jetson1/innate-os/`.

    Once connected, your editor behaves exactly as if the robot's filesystem were local: file tree, search, extensions, and the integrated terminal all run on MARS.
  </Step>
</Steps>

<Tip>
  Set up SSH keys to skip the password prompt every time:

  ```bash theme={null}
  ssh-copy-id jetson1@<YOUR-ROBOT-IP>
  ```
</Tip>

***

## Optional: Fork the open-source repo

<Info>
  You don't need to fork to start developing. Agents and skills in `~/innate-os/workspace/custom_agents/` and `~/innate-os/workspace/custom_skills/` work out of the box (both directories are gitignored, so your work survives OS updates). Fork when you want to save, version-control, and share your work — or modify the OS itself (ROS2 nodes, drivers, launch files).
</Info>

MARS runs [innate-os](https://github.com/innate-inc/innate-os), fully open source. Forking gives you your own remote repo to push changes to:

<Steps>
  <Step title="Fork on GitHub">
    Go to [github.com/innate-inc/innate-os](https://github.com/innate-inc/innate-os) and click **Fork**.
  </Step>

  <Step title="Clone your fork onto the robot">
    SSH into MARS and replace the default repo:

    ```bash theme={null}
    cd ~
    mv innate-os innate-os-backup
    git clone https://github.com/<YOUR-USERNAME>/innate-os.git
    ```
  </Step>

  <Step title="Copy your .env file">
    The `.env` file contains your `INNATE_SERVICE_KEY` and is not checked into git. Copy it from the backup into your fresh clone:

    ```bash theme={null}
    cp ~/innate-os-backup/.env ~/innate-os/.env
    ```
  </Step>

  <Step title="Make your fork launch on startup">
    The systemd service points to `~/innate-os/`. Since you cloned into the same path, it just works. Verify:

    ```bash theme={null}
    innate service restart
    ```
  </Step>
</Steps>

***

## Launch and restart

MARS auto-launches all ROS2 nodes on boot via systemd. Agent and skill files in `workspace/` hot-reload while the robot is running — both new files and edits are picked up automatically within seconds. **You only need to restart when you change anything outside `workspace/`** (ROS2 nodes, drivers, launch files), or as a fallback if a change doesn't get picked up:

```bash theme={null}
innate service restart
```

Or use the shorthand:

```bash theme={null}
in8 restart
```

### Watch the nodes boot

```bash theme={null}
innate service view
```

This attaches you to the tmux session where every ROS node runs. After a restart, give the nodes \~30 seconds to come up: each pane should settle into steady log output with no red error text or repeating restart loops. If a pane keeps crashing, that's where to look first.

| Keys                    | Action                                             |
| ----------------------- | -------------------------------------------------- |
| `Ctrl+B` then `0`–`6`   | Switch to a window                                 |
| `Ctrl+B` then `←` / `→` | Switch between left/right panes                    |
| `Ctrl+B` then `O`       | Cycle to the next pane                             |
| `Ctrl+B` then `Z`       | Zoom a pane to full screen (press again to unzoom) |
| `Ctrl+B` then `D`       | Detach from tmux (nodes keep running)              |

See the [Innate CLI Reference](/software/innate-cli) for all available commands.

***

## Shutting down gracefully

Always shut down properly before unplugging power. A hard power cut can corrupt the filesystem.

```bash theme={null}
sudo shutdown now
```

Wait for the LED to turn off, then disconnect power.

***

## Project structure

When you SSH in, the key directories are:

| Path                                   | What's there                                                                                                  |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `~/innate-os/`                         | The full OS repo                                                                                              |
| `~/innate-os/workspace/custom_agents/` | Your agent definitions (gitignored, hot-reloaded)                                                             |
| `~/innate-os/workspace/custom_skills/` | Your custom skills (gitignored, hot-reloaded)                                                                 |
| `~/innate-os/workspace/inputs/`        | Input devices                                                                                                 |
| `~/innate-os/config/settings.yaml`     | Tunable parameters — driving speed, camera, voice, extra scan dirs ([Configuration](/software/configuration)) |
| `~/innate-os/.env`                     | Secrets and cloud endpoint URLs                                                                               |
| `~/innate-os/ros2_ws/`                 | ROS2 workspace (all packages)                                                                                 |
| `~/innate-os/scripts/`                 | Launch scripts, diagnostics, update system                                                                    |

***

## Next steps

<CardGroup cols={2}>
  <Card title="Quick Development" icon="rocket" href="/software/mars-quick-development">
    Build your first agent in 5 minutes.
  </Card>

  <Card title="Advanced Development" icon="wrench" href="/software/advanced-development">
    Modify ROS2 nodes, recompile, visualize topics.
  </Card>

  <Card title="Innate CLI" icon="terminal" href="/software/innate-cli">
    Every command at your fingertips.
  </Card>

  <Card title="Foxglove Setup" icon="eye" href="/software/foxglove-setup">
    Visualize what your robot sees in real time.
  </Card>
</CardGroup>
