Developer docs/Get started

Create your first Curio

Start from a working template, make your first Host call, and build an installable package.

Verified September 11, 2026

On this page

Before you start#

Install the Trove development preview on your Mac. In Trove’s Settings → Command Line section, install or check the shell command, open a new terminal, and confirm the executable:

sh
trove --version
trove --help

The Web template requires Node.js 20.19+ or 22.12+ and your selected package manager. The following walkthrough uses npm. The static template does not require Node, Rust, or package installation.

Create the project#

Run trove new in the parent directory. Enter a name (My Curio here), choose Web, a package manager, and whether to install dependencies. Enter accepts defaults, arrows select, and Escape or Ctrl-C cancels. The destination must not exist.

sh
trove new
cd my-curio
trove dev

Enter the directory printed by the wizard. If you skipped installation, run your package manager’s install command first. The CLI connects to or starts the Host, starts the dev server, and opens the Curio window. Two buttons demonstrate communication and storage with real results; the terminal shows this run’s output.

Find the files you will edit#

PathPurpose
curio.jsonIdentity, UI entry, dev and build commands
src/main.tsPage, connection state, results and errors
src/demo.tsTwo independent Host call examples
src/style.cssStyles and theme
vendor/trove-plugin-sdk-0.0.1-alpha.1.tgzSDK bundled with the CLI; commit it
dist/ui/Production build output

The Web template uses TypeScript and Vite with no UI framework dependency. Keep it or integrate your own framework.

Make your first call#

Place this in a frontend module or async event handler. The SDK supplies method, parameter and result types:

ts
import { host } from "@trove/plugin-sdk";

await host.ready();
const info = await host.runtime.getHostInfo();
console.log(info.name, info.version);
console.log(host.context.curioId);

Expect Trove, the running Host version, and the Curio ID you chose. No service strings, method strings or empty argument object are needed. Handle failures as shown in SDK errors. The Web template supports Vite HMR.

A regular browser has no Host Bridge. Run native calls in a Trove window and use an explicit mock for browser tests.

Build and verify the package#

Stop the development session with Ctrl-C before checking the installed version, then run:

sh
trove pack
trove install

The archive is written to dist/packages/<id>-<version>-<target>.curio. install selects it automatically when there is exactly one candidate. Open the installed Curio in Trove and repeat the communication example with the development server stopped. This verifies the production entry and packaged assets.

Start without a build tool#

Run the wizard again, name the project My Static Curio, and choose Static HTML:

sh
trove new
cd my-static-curio
trove check
trove dev

The static template includes its precompiled UI and SDK in ui/index.html; no dependency installation is needed. Reload the window after editing HTML. It has no Vite HMR. Choose Rust in the wizard when you need a native Backend; see the Backend guide.