Publishing
Once your extension is ready, you can package it and distribute it to other Stina users. This guide covers the full process from building to publishing.
Building for Release
Section titled “Building for Release”Before publishing, ensure your extension builds cleanly:
pnpm buildpnpm typecheck # If you have type checking set upThe built output goes to the root of your extension directory (e.g., index.js).
Packaging
Section titled “Packaging”Stina extensions are distributed as .zip files. A typical pack script (scripts/pack.js) creates a zip containing only the necessary files:
manifest.jsonindex.js(built output)README.md(optional)LICENSE(optional)
Add to your package.json:
{ "scripts": { "pack-extension": "node scripts/pack.js" }}Example scripts/pack.js:
import { createWriteStream, readFileSync } from 'fs'import { join } from 'path'import archiver from 'archiver'
const manifest = JSON.parse(readFileSync('manifest.json', 'utf-8'))const filename = `${manifest.id}-${manifest.version}.zip`
const output = createWriteStream(filename)const archive = archiver('zip', { zlib: { level: 9 } })
archive.pipe(output)archive.file('manifest.json', { name: 'manifest.json' })archive.file('index.js', { name: 'index.js' })archive.finalize()
output.on('close', () => { console.log(`Packaged: ${filename} (${archive.pointer()} bytes)`)})Don’t forget to add archiver as a dev dependency: pnpm add -D archiver
GitHub Releases
Section titled “GitHub Releases”The recommended distribution method is via GitHub Releases:
- Create a GitHub repository for your extension
- Tag a release with the version number (e.g.,
v1.0.0) - Attach the .zip file to the release
- Users can install by providing the GitHub repo URL in Stina’s extension manager
# Tag and create a releasegit tag v1.0.0git push origin v1.0.0Then create a release on GitHub and attach your .zip file.
Extension Registry
Section titled “Extension Registry”To make your extension discoverable in Stina’s built-in extension browser, you can submit it to the Stina Extensions Registry.
The registry is a simple registry.json file containing:
{ "extensions": [ { "id": "my-extension", "repository": "https://github.com/yourname/stina-ext-my-extension", "category": "tools", "verified": { "1.0.0": "sha256-hash-of-zip-file" } } ]}To submit:
- Fork the registry repository
- Add your extension to
registry.json - Include the SHA256 hash of your release
.zip - Submit a pull request
Stina fetches full extension details (name, description, releases) directly from GitHub at install time — the registry only stores the minimum needed for discovery.
Versioning
Section titled “Versioning”Follow Semantic Versioning:
- Patch (1.0.x): Bug fixes, no new features
- Minor (1.x.0): New features, backward compatible
- Major (x.0.0): Breaking changes
Update the version in both manifest.json and package.json when releasing.
Pre-Release Checklist
Section titled “Pre-Release Checklist”-
manifest.jsonhas correct version, permissions, and contributions - Extension builds without errors (
pnpm build) - Type checking passes (
pnpm typecheck) - Tested locally in Stina (Settings > Extensions > Install from folder)
- README describes what the extension does and how to configure it
-
.zippackage contains only necessary files - Release tagged in git with matching version