Skills

A Skill is a descrete piece of functionality that includes the full stack of an application. It’s a way to encapsulate a feature or set of features in a way that can be easily installed, updated, removed, etc.

Skill Lifecycle

To start, your Skill is only a BootLoader that looks for Features. Features map closely to the Concepts. Your Skill starts with no Features installed and the SpruceCLI installs them for you as you need them.

Folder Structure

FolderPurpose
.vscodeComing soon…
buildComing soon…
node_modulesComing soon…
srcComing soon…
src/__tests__Coming soon…
src/.spruceComing soon…
src/errorsComing soon…
src/listenersComing soon…
src/permissionsComing soon…
src/schemasComing soon…
src/skillViewControllersComing soon…
src/storesComing soon…
src/viewControllersComing soon…
src/viewPluginsComing soon…
.editorconfigComing soon…
.eslintcacheComing soon…
.npmignoreComing soon…
.nvmrcComing soon…
.eslint.config.mjsComing soon…
package.jsonComing soon…
README.mdComing soon…
tsconfig.jsonComing soon…

Creating your Skill

When you’re ready to start building a new Skill, you can use the SpruceCLI to generate the Skill scaffolding.

spruce create.skill [directory]

Note: If you don’t provide a directory, the Skill will be created in the current directory.

Booting your Skill

If you want to boot your Skill in a local environment, you can use the boot command.

spruce boot

Registering your skill

If your skill uses an Events, Listeners or Views, you’ll need to register it with Mercury.

spruce register

Note: You will need to log into your personal account to register your skill. You can login using spruce login.

Listening to Skill Boot Events

The Event Feature allows you to listen to 2 events that are emitted during the boot process:

  1. will-boot - Fired ASAP when the skill is booted.
  2. did-boot - Fired after all features have booted.

You can add your listener by running:

spruce create.listener
It looks like you are using Internet Explorer. While the basic content is available, this is no longer a supported browser by the manufacturer, and no attention is being given to having IE work well here.