> For the complete documentation index, see [llms.txt](https://xavier-9.gitbook.io/kerbi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xavier-9.gitbook.io/kerbi/guides/revisions.md).

# Revisions

At this point in our discussion of the [storage and retrieval of states](/kerbi/guides/the-state-system.md), we have implicitly assumed that the templating logic (i.e your source code) stayed the same across states. This is obviously unrealistic, so we need to introduce the concept of a revision.

{% hint style="warning" %}
**Work in progress.**

The revision system is in its infancy. The following is meant to prepare you for what is to come if you are considering using Kerbi for your applications.
{% endhint %}

## What is a Revision?

Conceptually, a revision is an instantiation of your templating logic at one point in time.

**How does it work?** You use the CLI to "publish" a revision to a special registry, very similar to how you would a Ruby gem (a Rust crate, a Python lib, etc...), and that special registry serves your revision over HTTP as a JSON API.

```
$ kerbi revision push 1.0.1
```

After a few seconds, anyone can access your Kerbi project's logic over the air:

```json
$ curl -X api.kerbi.dev/hooli/nucleus/1.0.1/template | jq
{"data": [{"apiVersion": "v1", "kind": "Pod", "etc": "..."}]}

$ curl api.kerbi.dev/hooli/nucleus/1.0.1/values | jq
{"data": {"backend": {"image": "foo:latest"} } }
```

You can then use the revision in Kerbi:

```
$ kerbi template nucleus . --revision 1.0.1
```

Or generally:

```
$ kerbi template nucleus hooli/nucleus --revision 1.0.1
```

Or from your mixers:

```ruby
class DemoMixer < Kerbi::Mixer
  def mix
    push remote_mixer(project_uri, "1.0.1")
  end
end

Kerbi::Globals.org = "hooli"
Kerbi::Globals.project = "nucleus"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xavier-9.gitbook.io/kerbi/guides/revisions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
