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
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).
Best for: solo developers, quick experiments
Run aerostack functions push [file] to create a new draft; then aerostack functions publish <id> to go live. No CI setup required.
Best for: teams on GitHub
Push to main or create a release tag — your function publishes automatically. One workflow file, one GitHub secret.
Best for: teams on GitLab
Works via a plain .gitlab-ci.yml using curl + jq. No plugins required. Supports branch-level draft publishing and tag-based releases.
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.
Drafts are safe — Publishing always starts as a draft unless you explicitly pass publish: true (CI) or click Publish in the Admin. You can add a README and tags before making it public.
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
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"
}