Quickstart

Quickstart

Get from zero to your first deployment in under 15 minutes

Prerequisites

Step 1: Create Your First Project

Initialize a new project:

npx @devicesdk/cli init hello-world

This creates a new directory with:

  • devicesdk.ts - Project configuration
  • src/devices/ - Your device entrypoints
  • Example device code to get started

Navigate into your project:

cd hello-world

Step 2: Deploy

Deploy your code to the edge:

npx @devicesdk/cli deploy

Your code is now running on DeviceSDK network, ready to handle real device connections.

Step 3: Stream Logs

Tail device output directly from the terminal — the recommended debugging workflow after deploying:

npx @devicesdk/cli logs <project-id> <device-id> --tail

New log entries stream in as they arrive. Press Ctrl-C to stop. See devicesdk logs for filtering by level and other options.

Step 4: View in Dashboard

Visit your dashboard to:

  • See your deployed projects
  • Monitor device connections
  • View message logs
  • Manage device credentials
  • Track version history

Step 4: Store Secrets with Environment Variables

Keep API keys and credentials out of your source code using project-scoped environment variables:

npx @devicesdk/cli env set DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...

Access them in your device script:

const webhookUrl = await this.env.VARS.get("DISCORD_WEBHOOK_URL");

See Environment Variables for the full reference.

Next Steps

Now that you have a working project:

Need Help?