Quick Start
This guide gets you from zero to a working st8 setup in about five minutes.
Install
Section titled “Install”go install github.com/geeper-io/st8/cmd/st8d@latestgo install github.com/geeper-io/st8/cmd/st8ctl@latestgit clone https://github.com/geeper-io/st8cd st8go build -o st8d ./cmd/st8dgo build -o st8ctl ./cmd/st8ctlOption A: Local demo (no server needed)
Section titled “Option A: Local demo (no server needed)”Use --local to spin up an embedded st8d instance backed by a local directory. Perfect for development and testing.
# Write some configcat > feature_flags.json <<'EOF'{"dark_mode": true, "new_checkout": false}EOFst8ctl --local apply -f feature_flags.json \ --message "initial config"
# Read it backst8ctl --local get
# Change a valuecat > feature_flags.json <<'EOF'{"dark_mode": true, "new_checkout": true}EOFst8ctl --local apply -f feature_flags.json \ --message "enable new checkout"
# See the historyst8ctl --local logOption B: Remote st8d server
Section titled “Option B: Remote st8d server”-
Start st8d
Terminal window st8d --listen :8748 --state-dir /var/lib/st8With token auth:
Terminal window st8d --listen :8748 --state-dir /var/lib/st8 --token mysecrettoken -
Configure st8ctl
Create
~/.config/st8ctl/config.yaml:server:url: http://localhost:8748token: mysecrettoken # omit if no authdefaults:namespace: defaultbranch: main -
Push config
Terminal window cat > rate_limits.json <<'EOF'{"api": 1000, "search": 100}EOFst8ctl apply -f rate_limits.json \--message "initial config" -
Read config in your app
package mainimport ("context""fmt""log"st8 "github.com/geeper-io/st8/client")func main() {client := st8.NewHTTP("http://localhost:8748",st8.WithToken("mysecrettoken"),)result, err := client.Get(context.Background(), st8.Scope{Namespace: "default",Branch: "main",}, 0, "")if err != nil {log.Fatal(err)}for key, value := range result.Objects {fmt.Printf("%s = %s\n", key, value)}}
Checkpoint and rollback
Section titled “Checkpoint and rollback”# Tag the current statest8ctl checkpoint stable --description "Verified good state"
# Later, if something goes wrongst8ctl rollback --checkpoint stable --message "Revert to stable"Next steps
Section titled “Next steps”- Concepts — understand namespaces, branches, and revisions
- Dynamic Configuration — patterns for runtime config
- A/B Testing — run experiments at the config layer