Quickstart

Edge developer tools

Install the Edge CLI

Installing the edge CLI on your machine requires Homebrew. Refer to the Homebrew website for how to install it.

To get started, install the edge CLI on your machine with

macOS

brew tap edgeengineer/tap && brew install edge

Swift

To manage toolchains and make sure the proper version of Swift is used to build Edge applications, use swiftly. The Edge cli tool and VSCode extension will know how to use swiftly, so you don't need to do anything special.

macOS

brew install swiftly && swiftly init

Edge requires a custom Swift SDK and the open source Swift 6.1 toolchain. Use the following command to install the SDK and toolchain.

macOS

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/edgeengineer/edge-swift-tools/refs/heads/main/scripts/install.sh)"

VSCode Extension

For the best experience, install the VSCode extension.

The extension will create a new EdgeOS tab in your VSCode sidebar. If you don't see it, use the dropdown menu to pin it to your sidebar.

VSCode Extension

EdgeOS

EdgeOS is a lightweight operating system for Edge Computing. It is a Linux-based system that is optimized for the Edge. It is designed to be used in conjunction with the Edge SDK to build Edge Computing applications.

Currently, EdgeOS is only supported on Raspberry Pi devices. We are working on support for other devices.

Install EdgeOS

To get started, install EdgeOS on a Raspberry Pi or other supported device. You'll need an SD card and reader or some other disk (NVME, USB, etc.) to install EdgeOS.

There are two ways to install EdgeOS:

  1. Using the EdgeOS CLI
  2. Using the EdgeOS VSCode Extension

VSCode Extension

Once plugged in, you can use the EdgeOS tab in your VSCode sidebar to manage your device. If not, try refreshing the sidebar.

Disks as shown in the VSCode EdgeOS extension

You can start flashing EdgeOS by selecting the "Flash Disk" button next to the disk you want to flash. It'll appear as you hover over the disk.

A bar will appear on the top of your window, showing the supported devices. Select your device.

Select your device type

You can track your process on the bottom left of your window where it says "Flashing EdgeOS". Our tools will download the latest imag automatically before flashing, so this will take a while.

Edge CLI

You can use the Edge CLI to install EdgeOS.

  1. List the available disks to install on - this would be your SD card or other disk you want to install EdgeOS on.
edge imager list --all
  1. Check what devices are supported by EdgeOS
edge imager list-devices
  1. Install EdgeOS to your disk
edge imager write-device

Hello World

Plug the sd card or drive into your device and plug it into your development machine over USB. Once EdgeOS is booted up, you should see the device in the EdgeOS tab in your VSCode's sidebar. If it takes a while, try refreshing the sidebar.

Select Device

You can select the device you want to upload to by clicking on it, making it Active.

Create a new project

Create a project directory and initialize a new project:

edge init --path

This will create a swift project in your current directory with a basic hello world program.

Open VSCode and open the project directory. Hit SHIFT+CMD+D to open the Run and Debug view. Select the EdgeOS Debugger... option and choose Debug <app name> on EdgeOS. Then hit run.

Running and debugging the app

If you have breakpoints set, you should see the debugger connect and break on the breakpoints you've set.

Was this page helpful?