diff --git a/examples/README.md b/examples/README.md index 2a13e6a..f8aa8a8 100644 --- a/examples/README.md +++ b/examples/README.md @@ -6,17 +6,26 @@ The examples show the smallest installer primitive integration: pass `appId`, `s The temporary `HOME` wrapper keeps the demos from writing to your real user skill directory and provides a Codex detection path for the SDK's default auto agent selection. +Run these commands from the repository root. Each directory change runs in a +subshell so the next example also starts from the root. + ```bash tmp="$(mktemp -d)" && mkdir -p "$tmp/.codex" && HOME="$tmp" pnpm --dir examples/ts install-skill -cd examples/go -tmp="$(mktemp -d)" && mkdir -p "$tmp/.codex" && HOME="$tmp" go run . +( + cd examples/go && + tmp="$(mktemp -d)" && mkdir -p "$tmp/.codex" && HOME="$tmp" go run . +) -cd examples/rust -tmp="$(mktemp -d)" && mkdir -p "$tmp/.codex" && CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}" RUSTUP_HOME="${RUSTUP_HOME:-$HOME/.rustup}" HOME="$tmp" cargo run --quiet +( + cd examples/rust && + tmp="$(mktemp -d)" && mkdir -p "$tmp/.codex" && CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}" RUSTUP_HOME="${RUSTUP_HOME:-$HOME/.rustup}" HOME="$tmp" cargo run --quiet +) -cd examples/python -tmp="$(mktemp -d)" && mkdir -p "$tmp/.codex" && HOME="$tmp" uv run python main.py +( + cd examples/python && + tmp="$(mktemp -d)" && mkdir -p "$tmp/.codex" && HOME="$tmp" uv run python main.py +) ``` Production CLIs should call the workflow API before installing so explicit agents, `*`, `--yes`, TTY, non-TTY, summary confirmation, scope prompting, and cancellation behavior stay aligned across languages.