Workflows

API commands

Look up API generation commands for projects using the legacy API.

On this page

The hulla api commands generate code for the legacy API. They are incompatible with @hulla/api 2.0. For a new API, follow Build a task API.

The commands below document CLI beta 0.0.0-beta.1 for projects that still use that interface.

The CLI still exposes hulla api init, hulla api generate, and hulla api dev. The initializer detects older framework and database setups and writes missing files such as api.config.ts, router modules, a handler, and a framework mount. It leaves existing files alone, but generated imports still target the legacy API surface.

The generate and dev commands load an api.config.ts that carries the hulla.api.client-config marker, compile it with Bun, and call runGenerateConfig exported from the installed @hulla/api. Dev mode then watches the config and source inputs reported by the generator. These mechanics only describe that legacy integration boundary; they do not make it compatible with 2.0.

If you maintain a project built against the older generator, confirm its exact @hulla/api version and generated output contract before invoking the CLI. The current docs do not prescribe a compatible version pin, and no automatic migration from createApi or generated clients is provided here.

For a 2.0 migration, use the current API documentation for contracts, servers, and clients. Keep generated legacy files separate from new hand-authored 2.0 modules until the migration is complete.