Swift state, outside SwiftUI

State you can see.Contracts you can trust.

aps is a tiny Swift CLI that brings AppState to the terminal. Declare typed state, read it, change it, watch it, and hand the same stable contract to humans, agents, and CI.

brew install 0xLeif/tap/apsView releases
v1.0 availablev1.1 hardening in progressSwift 6
state tape

let profile = @FileState(

key: "profile",

value: Profile(

name: "leif",

version: 1

)

)

$aps set profileName corvidupdated in 12ms

One state root. Three native surfaces.

For your terminal

Human output stays concise and readable. Tables align, colors carry meaning, and errors tell you what to do next.

For your agents

JSON, JSONL, stable exit codes, and a self-describing schema give automation a contract it can cache and trust.

For your builds

Run the same state surface through fledge, isolate it with APS_HOME, and exercise it across macOS, Linux, and Windows.

A small command surface

Get in. Change state. Keep moving.

The same verbs work across built-in and user-defined keys. Output changes for the audience, never the underlying contract.

Read aps get note --json{"key":"note","value":"ship it"}
Write aps set flag trueset flag = true
Observe aps watch profileName --jsonl{"type":"change","value":"leif"}
Discover aps schema --json{"schemaVersion":4,"keys":[…]}

A Swift-first architecture

Typed at the edges. Honest in the middle.

Your state root carries a versioned schema.json. aps resolves each registered key through an AppState-backed adapter, then exposes predictable human and machine output.

Read the dynamic schema design
01schema.jsonversioned registry
StateProcess-local values
StoredStateUserDefaults persistence
FileStatePortable JSON files
EncryptedFileEncrypted state at rest
SliceTyped projections
TTYJSONJSONL

Built in Swift. Verified where you ship.

macOSLinuxWindowsSwift 6GitHub Actions

Built in public

The project tells you what is solid and what comes next.

aps ships with SpecSync contracts, cross-platform smoke tests, and the CorvidLabs trust toolchain. The next release is focused on filesystem safety, stronger secret handling, and end-to-end distribution tests.

Release readinessBrowse contracts

Your state is already there

Give it a command line.

brew install 0xLeif/tap/apsExplore aps on GitHub