Onboarding
Walk people through setting your plugin up.
Right after someone installs your plugin, Studio walks them through setting it up. Describe the
steps with onboarding. A step can ask for some of the plugin's settings, run one of its
commands, link to a page, and say when it is done:
onboarding: {
intro: "Two minutes, once.",
steps: [
{
id: "key",
title: "Get an API key",
body: "Open **Settings → API** on the site and copy the key here.",
link: { label: "Open the site", url: "https://example.com/api" },
settings: ["apiKey"], // done once it has a value
},
{
id: "sign-in",
title: "Sign in",
command: "sign-in",
done: (context) => context.secrets.get("token") !== undefined,
},
],
// A page of keys offered at the end (default: the first eight actions; false: none).
starterPage: { keys: { 0: { action: "play" }, 1: { action: "next" } } },
},