@viji-dev/sdk
v1.0.0
Published
Professional toolkit for creating interactive Viji scenes
Maintainers
Readme
Viji SDK
Professional toolkit for creating interactive Viji scenes. Includes a CLI, workspace management, local development UI (Vite-based), and a production build pipeline that outputs a single deployable scene.js. Uses @viji-dev/core under the hood.
Installation
npm install -g @viji-dev/sdkQuick Start
# Create a new workspace
mkdir my-viji-workspace
cd my-viji-workspace
viji init .
# Create your first scene
viji create my-scene --lang=ts
# Start development server
viji devCLI Commands
viji init [workspace-name]
Initialize a new Viji workspace with complete development environment.
- Use
viji init .to initialize in current directory - Use
viji init my-workspaceto create new directory
viji create <scene-name> [--lang=js|ts]
Create a new scene in the current workspace.
- Must be run inside a Viji workspace
- Creates scene in
scenes/<scene-name>/folder
viji dev [--port=5173] [--host=localhost] [--open]
Start development server with hot reload.
- Must be run inside a Viji workspace
- Opens browser-based development UI
viji build <scene-name> [--output=dist/scene.js]
Build a scene for platform deployment.
- Compiles multi-file project to single JS file
- Ready for copy-paste to Viji platform
Workspace Structure
my-workspace/
├── src/ # Development UI (React + Vite)
├── scenes/ # Your scenes
│ ├── my-scene/
│ │ └── main.ts # Scene entry point
│ └── another-scene/
├── vite.config.ts # Vite configuration
├── package.json # Dependencies
└── ... # TypeScript configs, etc.Scene Development
Each scene is a folder in scenes/ with a main.js or main.ts entry point:
// scenes/my-scene/main.ts
export const parameters = [
// Parameter definitions
];
export function init(canvas: HTMLCanvasElement, audioContext: AudioContext) {
// Initialization code
}
export function render(state: any, inputs: any, params: any) {
// Main render loop
}Features
- 🎨 Complete Development Environment: Full React UI for scene development
- 🔥 Hot Reload: Instant updates when you save scene files
- 📁 Workspace Management: Organize multiple scenes in one project
- 🛠️ TypeScript Support: Full type safety and IDE integration
- 📦 Single-File Build: Compile to platform-ready scene.js
- 🎯 Platform Compatible: Uses same Core runtime as Viji platform
Documentation
- SDK package:
docs/02-sdk-package.md - Implementation guide:
docs/06-cursor-implementation-guide.md
📄 License
Copyright (c) 2025 Artem Verkhovskiy and Dmitry Manoilenko.
All rights reserved - see the LICENSE file for details.
Contributor License Agreement
By contributing, you agree to the CLA.
Please also confirm your agreement by filling out this short form.
