*) refuse "no Proofline release is built for $os; set PROOFLINE_TOKEN and call the API, or build https://github.com/prooflinedev/cli from source" ;;
esac
case"$arch"in
x86_64 | amd64) arch=x86_64 ;;
aarch64 | arm64) arch=aarch64 ;;
*) refuse "no Proofline release is built for $arch on $(uname -s)" ;;
esac
printf'%s-%s\n'"$arch""$os"
}
sha256() {
ifcommand -v sha256sum >/dev/null 2>&1;then
sha256sum "$1"| cut -d '' -f 1
elifcommand -v shasum >/dev/null 2>&1;then
shasum -a 256 "$1"| cut -d '' -f 1
else
refuse "this installer needs sha256sum or shasum to check the download"
fi
}
main() {
setup=false
case"$#:$*"in
0:) ;;
1:--setup) setup=true ;;
1:--help)
say "usage: curl -fsSL https://proofline.sh/cli | sh -s -- [--setup]"
say "--setup registers MCP in Claude Code, Cursor and Codex, then opens GitHub setup and CLI sign-in; it needs git"
return
;;
*) refuse "unknown arguments; use --setup for coding-agent installation or --help for usage" ;;
esac
# Agent registration runs git to keep agent configuration out of Git working
# trees. Check before downloading, so a machine without it gets nothing.
if [ "$setup"=true ] &&!command -v git >/dev/null 2>&1;then
refuse "coding-agent setup needs git, which is not on PATH; nothing was installed; install Git and rerun this command, or omit --setup to install only the CLI"
refuse "CLI sign-in did not finish; the CLI and MCP entries remain installed; sign in as proofline's message above says, then run '$directory/proofline setup guide' to continue setup"
say "signed in; to continue setup in this session, run this and follow what it prints:"
say "$directory/proofline setup guide"
say "a coding agent can follow it from its shell now; restart the agent or reload MCP only to use Proofline's MCP tools"