Quick start
From nothing to a running admin panel and API in about a minute.
1. Create a project
hydro new mysite --preset blog --admin-email [email protected]
cd mysitehydro new creates the folder and writes a config.yaml and the preset's content-types/. It then creates the SQLite database and the first admin user. If you do not pass --admin-password-stdin (or set HYDRO_ADMIN_PASSWORD), a strong password is generated and printed once, so copy it.
--admin-email, hydro new only writes files and prints the next commands. Use that when you want to create the admin later with hydro create-admin.Provide the password from a pipe instead of generating one:
printf '%s' "$ADMIN_PASSWORD" | hydro new mysite --preset blog \
--admin-email [email protected] --admin-password-stdin2. Start the server
hydro serve --config config.yaml| URL | What |
|---|---|
http://127.0.0.1:8080/admin | Admin panel. Sign in with the e-mail and password from step 1. |
http://127.0.0.1:8080/api/v1 | REST API. |
http://127.0.0.1:8080/healthz | Liveness probe. |
3. Create content and read it back
In the admin, create and publish a news article (or a page), then read it through the API:
curl 'http://127.0.0.1:8080/api/v1/news?locale=en&limit=5'{
"data": [
{
"id": "…",
"locale": "en",
"slug": "hello-world",
"title": "Hello world",
"status": "published"
}
],
"metadata": { "limit": 5, "has_more": false }
}4. Add your own content type
hydro content-type new recipes
# edit content-types/recipes.yaml, then:
hydro content-type validate
hydro serve --config config.yamlThe admin now has screens at /admin/content/recipes and, with public: true, the API serves /api/v1/content/recipes. See Content types.
5. Build your site
Use the API from any frontend. Every scaffolded project includes an AGENTS.md guide for AI coding assistants, and you can pair it with `@hydrohq/client` or the SSR frontend guide.
Use it in the current directory
hydro init does the same as hydro new but scaffolds into the current directory and accepts the same options.
mkdir mysite && cd mysite
hydro init --preset corporate --admin-email [email protected]hydro new and hydro init on a fresh folder. They write config.yaml and content-types/ and are meant for a new project, not for overwriting one that is already in use.