devicesdk init

devicesdk init

Create a new DeviceSDK project

Usage

devicesdk init [project-name] [flags]

Arguments

  • project-name - Name of the project directory to create

Flags

  • --yes, -y - Skip interactive prompts and use defaults
  • --template <name> - Use a specific template (basic, multi-device, empty)
  • --name <name> - Project name (if directory name differs)

Description

Creates a new project directory with:

  • devicesdk.ts - Project configuration
  • src/devices/ - Device entrypoint directory
  • Example device code
  • TypeScript configuration
  • .gitignore file

Interactive Mode

By default, init runs interactively:

devicesdk init my-project

You’ll be prompted for:

  • Project name
  • Template selection
  • Initial device name

Templates

Basic (Default)

Single device with LED blink example:

devicesdk init my-project --template basic

Multi-Device

Multiple device entrypoints:

devicesdk init my-project --template multi-device

Empty

Minimal setup with no example code:

devicesdk init my-project --template empty

Examples

Create with defaults:

devicesdk init my-iot-app --yes

Create with specific template:

devicesdk init sensor-network --template multi-device

Create in current directory:

mkdir my-project && cd my-project
devicesdk init . --yes

Project Structure

After running init, your project will look like:

my-project/
├── devicesdk.ts          # Configuration
├── src/
│   └── devices/
│       └── my-device.ts  # Device entrypoint
├── .devicesdk/           # Build output (generated)
├── tsconfig.json         # TypeScript config
├── package.json          # Dependencies
└── .gitignore

Next Steps

After creating a project:

  1. Navigate into the directory:

    cd my-project
    
  2. Make changes and deploy:

    devicesdk deploy