English
Run a charts repository
A charts repository is a git repository with a known layout. From it, alta repo index builds index.json and the archive of every chart; you serve both over https, and anyone can add your repository with alta repo add. Here you build the index of the example repository that ships with Alta OS.
Before you begin 10 minutes
- The
altacommand: install the CLI. - A copy of
examples/charts-repo, or your own repository with the same folders. - Somewhere to serve static files over https.
Know the layout
Path Holds repo.jsonthe repository: its id, its title, the address of its index.json, its tier, where to report a chartcharts/<id>/a chart kept in the repository itself sources/<id>.jsona pointer to a chart kept in its author's repository: address, full commit, digest publishers/<id>.jsonwho publishes: name, address, tier, handle on the host moderation.jsonthe review status of each version, and withdrawals index.json,index.json.sigbuilt from the above by your repository's own job, never edited by hand repo.jsonjson{ "id": "example", "title": { "en": "Example charts", "fr": "Charts d'exemple" }, "url": "https://charts.example.org/index.json", "tier": "community", "report": "https://charts.example.org/report", "git": "https://git.example.org/alta/charts" }Set the review statuses
Every version is
pendinguntilmoderation.jsongives it a status: nothing is installable before a review. Here two charts passed andtea-timeris still pending.moderation.jsonjson{ "night-reading@1.0.0": { "audit": { "status": "pass", "at": "2026-12-05T00:00:00Z", "by": "example review" } }, "sky-notes@0.1.0": { "audit": { "status": "pass", "at": "2026-12-05T00:00:00Z", "by": "example review" } } }examples/charts-repo/moderation.json
The statuses and what they allow: How charts are reviewed.
Build the index
A pointer's chart is read from
--checkouts <folder>/<id>/: its content at the pointed commit, which your job clones first (the example keeps them incheckouts/so it builds offline). Its digest must equal the pointer's.--commitis the commit of your repository, for the charts kept in it.--archiveswrites each chart's archive next to the index, with the address machines will download it from.Terminalshalta repo index . --checkouts checkouts --commit 3333333333333333333333333333333333333333 --archives https://charts.example.org/archives --out public/index.jsonOutputtextwrote ./public/index.json: 3 charts, 3 archives nothing is installable until a review sets its audit (moderation.json); sign index.json before serving itOne chart of the index, as machines read it: every version with its digest, its archive, its source, what it needs online and its review status.
public/index.json: charts.sky-notesjson{ "publisher": "quiet-lab", "kind": "agent", "title": { "en": "Sky notes", "fr": "Notes du ciel" }, "summary": { "en": "An agent that keeps short notes of what you ask it to remember.", "fr": "Un agent qui garde de courtes notes de ce que tu lui demandes de retenir." }, "versions": [ { "version": "0.1.0", "created": "2026-12-05T00:00:00Z", "digest": "f74392a9d849e5f89ed992850d4bca37b112fb23105050e01263d0b4350fca0c", "archive": { "url": "https://charts.example.org/archives/sky-notes-0.1.0.alta.tar", "sha256": "a63c952c063e9bd69a8f9fd7b4f6ba5ae10d7cec5640c877a295637dd76c71c3", "size": 7168 }, "source": { "git": "https://git.example.org/quiet-lab/sky-notes", "commit": "1111111111111111111111111111111111111111", "ref": "v0.1.0" }, "license": "MIT", "price": "free", "locality": "cloud", "localityCheck": "linted", "services": [], "needs": [ { "id": "mind", "kind": "mind", "providers": [ "claude", "codex", "local" ], "local": true } ], "capabilities": [ "install" ], "support": { "platforms": [ { "os": "macos" }, { "os": "linux" } ], "hosted": "ok" }, "requires": { "charts": [ { "id": "alta-os", "version": ">=0.1.0 <1.0.0" } ] }, "audit": { "status": "pass", "at": "2026-12-05T00:00:00Z", "by": "example review" }, "localityRange": { "best": "local-first", "worst": "cloud" }, "risk": "medium" } ] }localityand the services are copied from each chart, andlocalityCheck: "declared"says so. Keep older versions with--previous <old index.json>.Sign and serve
Sign the index with the repository's Ed25519 private key. The key stays in a file only you can read (
chmod 600), outside the repository;altareads it from that file and never prints it. Make one once with OpenSSL 3 or later (the LibreSSL that comes with macOS has no Ed25519: use Homebrew'sopenssl):mkdir -p -m 700 ~/keys, thenopenssl genpkey -algorithm ed25519 -out ~/keys/charts.key, and its public half withopenssl pkey -in ~/keys/charts.key -pubout -out repo-key.pub.Terminalshalta repo sign public/index.json --key ~/keys/charts.keyOutputtextsigned public/index.json (sha256 ffff72d56b518036d6e594329773cfaab5e27aa1de9a1ea5e6b486ef33ba8fc2) into ./public/index.json.sig key: ed25519:9de0f295e97450ce; machines check it with the public key given to alta repo add --keyServe
public/over https:index.json,index.json.signext to it, andarchives/. Publishrepo-key.pubnext to the index and on your repository's page: people give it toalta repo add --key, and their machines refuse any index it did not sign. Build and sign only from your default branch, in a job no pull request can trigger, so a pull request can never change what machines download. The format: the index specification.
Rules your index must follow
- Every address is
https://, with no user name or password;repo.reporttoo. - A version after the first of a chart says what changed (
changes). - A community repository lists free charts only.
- A publisher's tier is
officialonly in an official repository.
The whole format: the index specification.