Scripts and CI
Every curio command prints plain text and returns an exit code, so curio works in shell scripts and CI pipelines. --server and --session work on every command.
Credentials without a keyring
In CI, set the workspace and a session token in the environment. curio uses them and stores nothing.
export CURIOSITY_SERVER=https://my-workspace.curiosity.ai
export CURIOSITY_TOKEN=… # a session token
export CURIO_SESSION=nightly-checks # optional: which session to use
Running commands in the sandbox
curio run -- build # one command; its exit code is curio's
curio run -- ls -la /workspace
curio run -f checks.sh # a script, run in the session
cat checks.sh | curio run -f - # the script from standard input
curio run runs in the session's sandbox and passes the command's output and exit code through, so a failing build fails the pipeline step.
Moving files
curio ls /workspace/code/endpoints # M, A, D mark what this session changed
curio cat /workspace/code/endpoints/x.cs
curio get /workspace/code/endpoints/x.cs . # prints the file's hash
curio put x.cs /workspace/code/endpoints/ # an uncommitted edit
curio put x.cs /workspace/code/endpoints/x.cs --expected-hash <hash>
curio rm /workspace/code/endpoints/old.cs
curio upload report.csv # attach; appears under /home/uploads
--expected-hash "" means the file must not exist yet.
Example: check a definitions change
#!/usr/bin/env bash
set -euo pipefail
curio sessions new "ci-$GITHUB_RUN_ID"
for f in definitions/code/endpoints/*.cs; do
curio put "$f" /workspace/code/endpoints/
done
curio run -- build # fails the job on a build error
curio diff
curio sessions rm --yes
curio sessions rm, reset, commit approve and commit discard ask for confirmation. With standard input redirected they cannot ask, and they stop with exit code 1, so pass --yes in a script.