Publishing to the Aerostack Hub
You can create and publish community functions in four ways: the Admin dashboard (web editor), the CLI (direct push), GitHub Actions, or GitLab CI. See the Function Flow Overview for the full lifecycle.
Choose a publishing method
Section titled “Choose a publishing method”Admin — Create and edit functions in the browser, then publish. No local setup. Go to Admin → My Functions. You can also finalize drafts created via CLI here (add README, tags, then click Publish).
What happens when you publish
Section titled “What happens when you publish”- Admin / CLI push: Creating a function always starts as a draft. Each
aerostack functions pushcreates a new draft (it does not update an existing function by slug). To update an existing function from the CLI workflow, use the Admin to edit, or use CI. - CI (
POST /api/community/functions/ci/publish): Upserts by slug — if a function with the same name/slug already exists under your account, its code and metadata are updated; otherwise a new function is created. Setpublish: truein the body to make it live immediately.
Common pipeline steps:
- Validate —
aerostack.json(or request body) is checked for name, category, code, etc. - Create or upsert — Admin/CLI: create only. CI: upsert by (developer, slug).
- Snapshot — When a function is published, the current code is stored as a version snapshot.
- Go live — Status changes to
publishedwhen you click Publish in Admin, runaerostack functions publish <id>, or passpublish: truein CI.
Version History
Section titled “Version History”Every time you publish a new version, a snapshot is stored — all past versions are preserved. Consumers who installed an earlier version can still reference its code.
You cannot overwrite a past version’s snapshot. To update a function, always bump the version field in aerostack.json first.
The aerostack.json config
Section titled “The aerostack.json config”All three workflows read from the same aerostack.json file in your function directory. See the CLI guide for the complete field reference.
{ "name": "my-function", "version": "1.0.0", "description": "One clear sentence about what this does.", "category": "utility", "language": "typescript", "runtime": "cloudflare-worker", "license": "MIT", "entrypoint": "index.ts"}