Capsium

Learn

Your first Capsium package

A hands-on walkthrough of the Capsium CLI — from a plain directory to a packed, served .cap file.

Step 1

Prepare a package directory

A Capsium package starts as an ordinary directory. Put your static files in content/, your datasets in data/, and describe the package in a hand-written metadata.json:

my-site/
├── content/
│   └── index.html
├── data/
│   └── animals.yaml
└── metadata.json
{
  "name": "my-site",
  "version": "0.1.0",
  "description": "My first Capsium package"
}

You don't write the other configuration files by hand:manifest.json, routes.json,storage.json, and security.json are generated automatically when you pack.

Step 2

Pack the directory

Turn the directory into a portable .cap file:

$ capsium package pack -f path/to/package-dir

The packager generates the manifest, routes, storage, and security configurations — including SHA-256 checksums for every file — and writes the compressed package next to your directory.

Step 3

Inspect the package

The CLI reads packages in both directory and packed .cap form:

$ capsium package info my-site.cap

Overview: path, routes, and manifest

$ capsium package manifest my-site.cap

Full file inventory

$ capsium package routes my-site.cap

URL routing table

$ capsium package metadata my-site.cap

Package metadata

$ capsium package storage my-site.cap

Dataset definitions

Step 4

Serve it with a reactor

Start the built-in Ruby reactor on your package:

$ capsium reactor serve my-site.cap

The reactor verifies the package checksums, mounts its routes, and serves your content and data over HTTP. Pass --port to listen on a different port.

Deploying packages

Deploying Capsium packages is straightforward: the same .cap file you tested locally drops onto any reactor — nginx/OpenResty in production, or the browser extension for server-free delivery. Integrate the pack step into your existing CI/CD pipeline for automated deployment.