tynd add
tynd add fs clipboardtynd add sqlitetynd add @acme/plugin-indexer --apis fs:readText,fs:readDirtynd add notifications --no-installEach argument is handled in order:
- An API name or catalog alias (case-insensitive). The names and aliases come from the plugin catalog, for example
fs/filesystem/files,notification/notifications,autolaunch/auto-launch,system-stats/stats,websocket/ws,sql/sqlite. Seetynd explain capabilities.- A plugin-first API (every API except
aclandlog, for examplefs,clipboard,dialog,menu,multiwindowortray) is added toapis, then its@tynd/plugin-<api>package is installed and declared as described below.tynd add fsis enough before importing@tynd/plugin-fs/client. - A catalog plugin without a host API of its own (for example
sql→@tynd/plugin-sql) is only installed and declared. - The core APIs
aclandlogonly editapisand install nothing.
- A plugin-first API (every API except
- Anything else is treated as a plugin package name: install, then add an entry to
plugins.
If the project has no config yet, tynd add first runs tynd init. Unless --no-install is passed, it then installs @tynd/host-src as a devDependency when the project does not declare it yet.
| Flag | Default | Effect |
|---|---|---|
--cwd <dir> |
. |
Project directory |
--no-install |
false | Edit the config without running bun add / bun install (for every plugin of the call and for @tynd/host-src) |
--apis <csv> |
none | Store the comma-separated api:method selectors as the entry’s permissions |
--apis applies only to explicit plugin package arguments; a plugin added through an API name or alias gets no permissions.
Plugin entries
Section titled “Plugin entries”If a plugin dependency is already declared but missing locally, the command runs bun install; if undeclared, it runs bun add <package>. A catalog plugin published only under an npm dist-tag (the distTag of plugins/catalog.json) is installed as bun add <package>@<tag>.
Without --apis, the entry is a package string. With selectors, it is an object:
plugins: [{ pkg: "@acme/plugin-indexer", permissions: ["fs:readText", "fs:readDir"],}]All supported config formats are editable: TypeScript, JavaScript, JSON/JSONC, TOML, and YAML. Script configs must expose a literal default-exported object, defineConfig({ ... }), or their CommonJS equivalent. Edits keep key order, indentation and line endings, and existing entries are left unchanged. Comments survive in script, JSONC and TOML configs; YAML configs lose their comments when edited.
Native package metadata is resolved later by the host plan; the next tynd dev or tynd build links a native plugin’s Rust crate into the app host.
What can go wrong
Section titled “What can go wrong”- The command is all or nothing: if any step fails (the
tynd initscaffold, abun add, the host sources install), the project files it touched (config,package.json, the lock file, scaffolded files) are restored and the command fails withtynd add failed; project files restored. Packages already written tonode_modules/are not removed. - An API already listed is reported as
already configured; a plugin already listed asalready declared. - An unknown name that is not a valid package name (
@scope/plugin-nameorplugin-name; versions, paths and flags are refused) fails. - A selector passed to
--apisthat is notapi:methodfails. - A dynamic script config (factory, dynamic array entries) cannot be edited safely and fails; edit it by hand.