AI-First Development with Stacks



Stacks: AI-First Development
Stacks is a decentralized template-sharing platform built on Nostr, designed specifically to jumpstart AI development.
- Publish AI-first project templates (called "stacks")
- Quickly bootstrap working apps from these templates
- Deploy functional applications in minutes
Stacks are shared via Nostr events, meaning they’re portable, censorship-resistant, and social. A stack can be anything from a simple website template to a AI chat app, or even a GameBoy ROM!

How to Use Stacks
Install stacks CLI:
npm install -g @getstacks/stacks
Once installed, you can add stacks and start building.

For example, if you want to build a Nostr Relay, you can add the pg-relay
stack:
stacks add naddr1qvzqqqrhl5pzqprpljlvcnpnw3pejvkkhrc3y6wvmd7vjuad0fg2ud3dky66gaxaqqy8qeedwfjkcctehjfz9x
This will add the stack to your local collection. You can view all the stacks you have added and their aliases with:
stacks list
Stack Aliases (2):
---------------------
mkstack => nostr:naddr1qvzqqqrhl5pzqprpljlvcnpnw3pejvkkhrc3y6wvmd7vjuad0fg2ud3dky66gaxaqqrk66mnw3skx6c4g6ltw
pg-relay => nostr:naddr1qvzqqqrhl5pzqprpljlvcnpnw3pejvkkhrc3y6wvmd7vjuad0fg2ud3dky66gaxaqqy8qeedwfjkcctehjfz9x
Running the stack will create a project in your current directory:
stacks pg-relay
From there, you can prompt our built-in AI Agent "Dork" to help you build your app! Dork similar to Goose, but fine-tuned to specialize in building with stacks. Dork helps generate boilerplate code, answer questions about your dependencies, and guide you through deployments.
Open Router API: Open Router API Key is currently required to get the most out of building stacks. You can sign up and get one here: https://openrouter.ai. In the future we hope to offer a service to accept zaps to run the AI for users who don't wish to directly pay for Open Router.
Try Building a Nostr App with MKStack
Want to see Stacks in action? Check out MKstack, a Nostr template built using:
- Nostrbook MCP for queryable documentation
- Built-in Nostr login
- Context files to supercharge AI workflows
Add MKStack and run it:
stacks add naddr1qvzqqqrhl5pzqprpljlvcnpnw3pejvkkhrc3y6wvmd7vjuad0fg2ud3dky66gaxaqqrk66mnw3skx6c4g6ltw
stacks mkstack
Then give Dork a prompt to get started. For example:
➜ stacks mkstack
│
◇ Enter project name
│ nostr-chat-app
│
◇
│
◆ CONTEXT.md found
│
◇ <[o_o]> Dork here! I'm ready to help you with nostr-chat-app. What do you need?
│ Please build a NIP-28 group chat add with Nostr login
Dork will then use the Nostrbook MCP to find the best way to build your app, pulling in the template components as needed.
When it's finished, you can run the app with:
npm run dev
If you like what you see, deploy it with the built-in Surge integration:
npm run deploy
See example of a site built and deployed this way here: http://nip28.surge.sh/

Note: Surge is a free static hosting service that allows you to deploy your app with a single command. You will need to set up a free account on Surge if you want to deply this way: https://surge.sh
You have now deployed a fully functioning Nostr Chat app in only a few commands - and NO code written!
Publish Your Own with the Stacks Protocol
The Stacks Protocol defines how project templates and AI agents are structured, shared, and consumed. It consists of several key components:
- stack.json - Metadata for project templates
- agent.json - Configuration for AI agents
- CONTEXT.md - Project context for AI agents
- Nostr Integration - Decentralized publishing and discovery
Stack templates are published as Nostr events with kind 30717
. The stacks publish command converts the stack.json file into this Nostr event format and then publishes it. Each published stack has a unique identifier starting with naddr1, which encodes the event information in a compact format. This naddr1 is then used with the Stacks CLI to clone the stack or create an alias.
Try Our Other Tools for the Best Nostr Development Experience
Stacks is just one part of a growing toolkit designed to make building on Nostr easier and more powerful. Check out our other tools:
- Nostrify – Bring your projects to life on Nostr with simple tools for relays, storage, signers, moderation policies, and more. Try Nostrify →
- Nostrbook MCP – A Comprehensive Registry of Nostr Documentation. Structured, detailed knowledge about Nostr for both humans and AI. Try Nostrbook →