rivetkit-swift/examples/hello-world-cli/README.md
A minimal CLI Swift example that connects to the same counter actor used by the SwiftUI example. It demonstrates async actions and event subscriptions without any UI.
cd rivetkit-swift/examples/hello-world-cli/server
pnpm install
pnpm dev
The server listens on http://127.0.0.1:8787 and exposes RivetKit at http://127.0.0.1:8787/api/rivet.
cd rivetkit-swift/examples/hello-world-cli/client
swift run
Override the endpoint if needed:
RIVET_ENDPOINT=http://<host-ip>:8787/api/rivet swift run
Set a custom actor key:
RIVET_ACTOR_KEY=my-key swift run
# or
swift run -- --key my-key
Stream RivetKit client logs in a separate terminal:
log stream --level debug --predicate 'subsystem == "dev.rivet.client"'
newCount and prints each update.