Getting Started
Create your first Nimbalyst extension step by step, ending with a working custom editor for a new file type built on the extension SDK.
This guide walks you through creating your first Nimbalyst extension, aimed at developers who know some React and TypeScript. By the end, you'll have a working extension that registers a custom editor for .hello files.
Recommended: Create It From Inside Nimbalyst
The intended workflow is to scaffold and iterate on extensions from inside Nimbalyst:
Enable Extension Dev Tools in Settings > Application > Advanced
Use
File > New Extension ProjectorDeveloper > New Extension ProjectOr ask Claude to run
/new-extension ~/my-first-extension "Hello Editor" *.helloAsk Claude to build and install it with
extension_buildandextension_installUse
extension_reloadwhile iterating
The rest of this guide shows the manual scaffold path if you prefer to create the project yourself.
Prerequisites
Enable Extension Dev Tools: go to Settings > Application > Advanced and enable "Extension Dev Tools"
Node.js 18+: required for building extensions
Step 1: Create the Project
Create a new directory for your extension:
Step 2: Install Dependencies
Step 3: Create the Manifest
Create manifest.json. This tells Nimbalyst about your extension:
apiVersion is currently optional but recommended.
Step 4: Create the Vite Config
Create vite.config.ts:
Step 5: Create the TypeScript Config
Create tsconfig.json:
Step 6: Create the Extension Entry Point
Create src/index.ts:
Step 7: Create the Editor Component
Create src/HelloEditor.tsx:
Key points:
useEditorLifecyclehandles loading, saving, file watching, echo detection, and dirty stateapplyContentpushes content into the editor (on load, external changes)getCurrentContentpulls content from the editor (on save)Call
markDirty()when the user edits; the hook manageshost.setDirty()for youContent lives in a ref, not React state; the textarea uses
defaultValue
Step 8: Add Build Script
Update your package.json to add a build script:
Step 9: Build and Install
Now ask Claude to build and install your extension:
"Build and install my extension from ~/my-first-extension"
Claude will use the extension_build and extension_install tools to compile and load your extension.
Step 10: Test It
Create a new file with the
.helloextensionYour custom editor should appear instead of the default text editor
Make changes and save; they persist to the file
Next Steps
Add styling with a
styles.cssfileAdd AI tools so Claude can interact with your editor
Add a toolbar with actions
Handle more complex file formats
See the custom-editors.md guide for more advanced editor development.
Troubleshooting
Extension doesn't load
Check the console for errors (View > Toggle Developer Tools)
Verify your
manifest.jsonhas a valididfieldMake sure
dist/index.jsexists after building
Editor doesn't appear for file type
Check that
filePatternsin the manifest matches your file extensionVerify the
componentname matches what you export incomponents
Changes don't appear after editing
Ask Claude to reload the extension:
"Reload my hello-editor extension"
This will rebuild and hot-reload without restarting Nimbalyst.
Last updated
