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 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 projectCLAUDE.md— one-line@AGENTS.mdreference for Claude Code.cursor/rules/devicesdk.mdc— Cursor rules pointing atAGENTS.md.mcp.json— preconfigures the@devicesdk/mcpserver for MCP-aware agentsREADME.md— quick reference for humans
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
├── AGENTS.md # AI-agent guidance
├── CLAUDE.md # @AGENTS.md (Claude Code reference)
├── .cursor/
│ └── rules/
│ └── devicesdk.mdc # Cursor rules
├── .mcp.json # MCP config (preconfigures @devicesdk/mcp)
├── README.md # Human-facing readme
├── .devicesdk/ # Build output (generated)
├── tsconfig.json
├── package.json
└── .gitignore
Next 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