Skip to main content

Your First Project

After seeding the demo project, the next step is to add your own content type and publish an entry.

Configure the CLI (optional)

krios config set endpoint http://localhost:3000
krios config set api-key krios_mk_… # create a management key in the admin UI first
krios config set default-project demo

The CLI is a thin shell over the REST management API. Everything you can do with it you can also do in the admin UI or directly via curl.

Define a content type

In the admin UI, Content types → New type. Or via CLI:

cat > article.json <<'JSON'
{
"apiName": "articlePage",
"name": "Article",
"isRoutable": true,
"isPublishable": true,
"parentApiName": "basePage",
"fields": [
{
"apiName": "body",
"name": "Body",
"fieldType": "richtext",
"isRequired": true,
"isLocalizable": true
},
{
"apiName": "excerpt",
"name": "Excerpt",
"fieldType": "text",
"isLocalizable": true
}
]
}
JSON

krios types create --file article.json

articlePage extends basePage, so it inherits title, slug, and the SEO fields automatically.

Create an entry

cat > home.json <<'JSON'
{
"contentTypeApiName": "articlePage",
"siteId": "site_main_id",
"locale": "en-US",
"treeParentId": "node_pages_id",
"slug": "hello-world",
"fields": {
"title": "Hello World",
"body": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [{ "type": "text", "text": "First post." }]
}
]
}
}
}
JSON

krios entries create --type articlePage --locale en-US --site main --file home.json
krios entries publish <id> --locale en-US

Note: the CLI --site flag takes a site slug (main), while the JSON payload's siteId field takes the site's id (site_main_id). Use whichever matches the surface you're calling.

Or — recommended — author it through the admin UI's split-pane editor and click Publish.

Verify via the delivery API

curl http://localhost:3000/api/delivery/projects/demo/sites/main/entries/<id>?locale=en-US

Or via GraphQL:

query {
entry(id: "ckl_…") {
_publishedAt
... on ArticlePage {
title
body { html }
}
}
}

POST to /api/graphql/demo with Authorization: Bearer <delivery-key>.

Next