Build your first Gizmo
Use Node.js 22 or newer, npm, the public Scape CLI, and an account on scape.wtf.
Obtain a project
Create a project with the public CLI:
sh
npx @scape-wtf/cli@latest gizmo init my-gizmo
cd my-gizmo
npm install1
2
3
2
3
The destination must not exist. The generated project uses the published SDK and CLI packages; it does not copy the Scape game or any account credentials.
Install and build
Inside the generated directory:
sh
npm run build1
The starter contains src/definition.ts and src/project.ts. A project default-exports its public name, description and definitions:
ts
import { defineProject } from '@scape-wtf/sdk';
import object from './definition.js';
export default defineProject({
name: 'My gizmo',
description: 'A custom gizmo for visitors to use in my world.',
objects: [object],
});1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
The name and description describe the whole project, including its shop listing. Each definition keeps its own label and hint for world controls. See project metadata for limits and validation.
The generated project's scape.entry points to src/project.ts. You can add more definitions later; Scape accepts up to 16 per project.
Upgrade an existing project
SDK 0.3.0 requires both project metadata fields. When updating an older project, add name and description as shown above, update its SDK and CLI dependencies, then rebuild:
sh
npm install @scape-wtf/sdk@0.3.6
npm install --save-dev @scape-wtf/cli@0.1.13
npm run build1
2
3
2
3
Create a new release to update installed worlds; changing local dependencies does not replace their saved releases.
Connect to your world
sh
npm exec -- scape gizmo dev1
The CLI connects your local project to scape.wtf.
Open the printed link, sign in, compare the displayed code with your terminal, and choose Connect project in the developer sidebar. A code expires in five minutes. Approval grants a two-hour, world-scoped development session.
This uses the project's installed CLI. After a global CLI installation, scape gizmo dev also works from this directory. npm run dev is a shortcut for the generated project's scape gizmo dev script. Gizmo approval is separate from agent approval.
The sidebar shows the accepted local revision and available Gizmos. Choose your Gizmo and place it. Save a source file to send an updated build.
Make a change
Change the label or view description in the blank definition and save. The CLI compiles and uploads the project. Scape validates the full update before activating it. If it fails, the previous accepted build stays active and the sidebar shows the error.
Try the Counter to add a first action. Use your own namespace and a unique emoji for a new definition. The scape. namespace and built-in interactive emojis are reserved; bundled examples may retain their existing identities in your developer world.
Finish a session
Stop the command or disconnect in the sidebar. The last accepted code and world state remain. Reconnect to continue editing. This is a development session, not a publication flow.
Use it in your worlds
When your build is ready, choose New release under Use in your worlds in the developer sidebar. Select the release and a world you own, then choose Add to world. Open that world and place your Gizmo from Installed gizmos in the scene palette beside chat.
The release stays fixed while you keep developing. Follow Use Gizmos in your worlds for updates, rollback, disabling, and removal.
To offer a release to other players for stones, follow Sell a Gizmo.
Next, learn projects, state and actions, or test an example.
