PluginsRelease a plugin

Release a plugin

Once your plugin works on your machine, the next step is getting it to other people and keeping their copy up to date. Syntic Code has no central plugin store: you share a plugin through a marketplace you control, or hand people the plugin directly.

Choose how to share

WayUsers runUpdatesBest for
Your own marketplacesyntic plugin install name@marketsyntic plugin updateTeams and anything you will keep improving
A .zip at an HTTPS URLsyntic --plugin-url https://…/plugin.zipFetched again every runTrying a plugin, or shipping it with another tool
A folder or .zip on disksyntic --plugin-dir ./pluginWhatever is in the folderDevelopment and internal demos
Pre-seeded foldersNothing; set SYNTIC_PLUGIN_SEED_DIRReplace the folderImages and managed machines

A marketplace is the only way that gives people install, update, dependencies and the /plugin manager, so it is the right choice for almost everything you intend to keep.

Prepare the plugin

Before each release:

  1. Set the version. Raise version in plugin.json. Semantic versioning (1.4.0 → 1.4.1 for fixes, 1.5.0 for new features, 2.0.0 for changes that break existing use) helps people judge an update.
  2. Fill in the metadata. description, author, homepage, repository and license help people decide whether to trust the plugin.
  3. Validate it. syntic plugin validate <folder> should report no errors. Fix the warnings too; they usually point at a typo.
  4. Run your evals. syntic plugin eval <folder> should pass. See Test a plugin.
  5. Check the cost. syntic plugin details (after a local install) or /usage → Plugins shows how many tokens your skills add to every request. See Measure a plugin.
  6. Keep secrets out. Never commit tokens. Declare an option with "sensitive": true instead, and let each user set it.

Publish through your own marketplace

Put the plugin in a repository

Either one repository per plugin, or many plugins in one repository (each in its own folder).

Add a catalog entry

In your marketplace’s marketplace.json, add an entry that says where the plugin lives:

{
  "name": "acme",
  "plugins": [
    {
      "name": "release-helper",
      "description": "Release chores: version bumps, changelog, tags",
      "source": "acme/tools//plugins/release-helper",
      "category": "release"
    }
  ]
}

acme/tools//plugins/release-helper means “the plugins/release-helper folder of the GitHub repository acme/tools”. Only that folder is fetched. Every source form and field is listed in the marketplace reference, and Create a marketplace walks through building one.

Tell people how to install

syntic plugin marketplace add acme/tools
syntic plugin install release-helper@acme

Or as one line: syntic plugin install release-helper@acme --marketplace acme/tools. A repository can also suggest the marketplace to everyone who works in it through extraKnownMarketplaces; see Plugins for your organization.

Control who can install

Access follows the marketplace’s source. A private git repository is reachable only by people whose git credentials can clone it. Host a marketplace covers private hosting, SSH cloning and catalogs behind a login.

Tag a release

syntic plugin tag creates an annotated git tag named after the plugin and its version:

cd plugins/release-helper
syntic plugin tag --dry-run
# Would create tag `release-helper--v1.5.0`.
syntic plugin tag
# Created tag `release-helper--v1.5.0`. Push it with `git push origin release-helper--v1.5.0`.
git push origin release-helper--v1.5.0
DetailBehaviour
Tag name<name>--v<version>. A leading v in the manifest’s version is not doubled.
FolderThe plugin folder given as an argument, or the current folder.
Existing tagRefused: tag … already exists; raise "version" in the manifest first.
Missing versionRefused: set "version" first.
SigningOff, so a repository’s own git config cannot run a program. Make a signed tag yourself with git tag -s if you need one.
PushingNot done for you.

The <name>--v<version> form keeps tags for different plugins in one repository apart.

Ship updates

How an update reaches people depends on what the catalog entry points at:

Entry sourceWhat syntic plugin update fetches
A branch or the default branch (acme/tools//plugins/release-helper)The latest commit. Every push is a release.
A tag (acme/tools@release-helper--v1.5.0//plugins/release-helper)That tag. You release by moving the entry to the new tag.
A .zip URL with #sha256=That exact archive. You release by publishing a new archive and updating the entry.

Pinning to tags is the safer habit: nothing reaches users until you change the catalog.

Users see new versions after their marketplace listing refreshes. That happens once a day in the background, or right away with syntic plugin marketplace refresh. Installing always refreshes the listing first. Installed copies change only when the user runs syntic plugin update (or presses r in /plugin), and the plugin’s on/off state is kept.

Rename or retire a plugin

  • Renaming a plugin is, for users, a new plugin. Publish it under the new name, keep the old entry for a while with a description that points to the new one, then remove it.
  • Removing an entry from the catalog does not uninstall anything. When a user’s listing refreshes, the output flags it: flagged: `old-plugin@acme` is installed but no longer published by `acme` (delisted). They decide whether to uninstall.
  • Renaming the marketplace (changing name in marketplace.json) is followed automatically: on refresh, the saved marketplace takes the new name and installed plugins move with it.

Share without a marketplace

For a quick share, zip the plugin folder (with the manifest at the top of the archive or inside a single folder) and host it over HTTPS:

syntic --plugin-url https://downloads.example.com/release-helper-1.5.0.zip

The download is cached per URL. If a later download fails, the last good copy is used with a warning. Plain http:// is accepted only for the local machine. Nothing is installed: the plugin is active only for that run.

Declare dependencies

When your plugin builds on another one, list it in dependencies and keep both in the same marketplace, so they install together. See Dependencies.

Changing a plugin’s name changes its id, its command prefix and its data folder. Treat it as a new plugin.