Publishing Functions
Share your work with the global Aerostack community by publishing to the registry. For a full lifecycle overview, see Function Flow Overview.
Preparation
To be publishable, your function should live in its own directory with at least an entry file and optional aerostack.json for metadata (name, description, category, etc.). Two common structures:
Minimal (CLI push):
my-cool-feature/
├── aerostack.json <-- optional but recommended
├── index.ts <-- your function logic
└── README.md <-- recommended for HubFull module (core + schema + adapter): See Universal Adapter Pattern for the three-layer layout with core.ts, schema.ts, and adapter.ts. You can still use aerostack.json (same format as below) in the function directory.
The config: aerostack.json
Create an aerostack.json in your function folder so the CLI and Hub know name, category, and version:
{
"name": "Stripe Payments",
"category": "payments",
"description": "Stripe checkout and webhooks.",
"version": "1.0.0",
"routePath": "/payments",
"routeExport": "paymentsRoute",
"drizzleSchema": true
}See the CLI guide for the full field reference.
Publishing Workflow
1. Stage locally (optional)
Verify your module works locally (e.g. with aerostack dev if it’s part of a project).
2. Push to registry
Use the CLI to create a draft on the community API. Each push creates a new draft.
aerostack functions push ./my-cool-feature/index.tsSave the function ID from the output. Then publish that draft:
aerostack functions publish <id>Or open the Admin URL from the output and click Publish after adding a README and tags. For more detail, see Publishing via CLI.
3. Finalize in the Admin (optional)
After pushing, your function appears as a Draft in the Admin under My Functions. You can edit description, README, and tags there, then click Publish to make it searchable on the Hub.
Reputation and recognition
Every time your function is cloned (via aerostack functions install or Clone on the Hub), you earn Community Reputation. Higher reputation unlocks badges and better visibility in the community.