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)--no-git- Skip initializing a git repository in the new project
Description
Creates a new project directory with:
devicesdk.ts- project configurationsrc/devices/- device entrypoint directory- Example device code that uses
DeviceResponse-typedonMessage tsconfig.json(strict) andpackage.json.gitignoreAGENTS.md- version-matched guidance for AI coding agents working in the project.cursor/rules/devicesdk.mdc- Cursor rules pointing atAGENTS.md.mcp.json- points MCP-aware agents at this server’s bundled/mcpendpointREADME.md- quick reference for humans
Interactive Mode
By default, init runs interactively:
devicesdk init my-projectYou’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 basicMulti-Device
Multiple device entrypoints:
devicesdk init my-project --template multi-deviceEmpty
Minimal setup with no example code:
devicesdk init my-project --template emptyExamples
Create with defaults:
devicesdk init my-iot-app --yesCreate with specific template:
devicesdk init sensor-network --template multi-deviceCreate in current directory:
mkdir my-project && cd my-project
devicesdk init . --yesProject Structure
After running init, your project will look like:
my-project/
├── devicesdk.ts # Configuration
├── src/
│ └── devices/
│ └── my-device.ts # Device entrypoint
├── AGENTS.md # AI-agent guidance
├── .cursor/
│ └── rules/
│ └── devicesdk.mdc # Cursor rules
├── .mcp.json # MCP config (points at this server's /mcp endpoint)
├── README.md # Human-facing readme
├── .devicesdk/ # Build output (generated)
├── tsconfig.json
├── package.json
└── .gitignoreNext Steps
After creating a project:
-
Navigate into the directory:
cd my-project -
Make changes and deploy:
devicesdk deploy
Related Commands
- devicesdk deploy - Deploy your project