AntigravityCliSdk is the Elixir SDK for the Google Antigravity CLI (agy).
It gives Elixir applications a typed streaming API, a simple synchronous
run/2, governed launch checks, and the runtime module consumed by
agent_session_manager for the :antigravity SDK lane.
The SDK does not reimplement subprocess handling. It uses
cli_subprocess_core, the same core runtime that powers ASM's common
Antigravity lane.
Sibling checkout during local development:
def deps do
[
{:antigravity_cli_sdk, path: "../antigravity_cli_sdk"}
]
endHex dependency after publish:
def deps do
[
{:antigravity_cli_sdk, "~> 0.1.0", organization: "nshkrdotcom"}
]
end{:ok, text} =
AntigravityCliSdk.run("Reply with exactly: OK", %AntigravityCliSdk.Options{
dangerously_skip_permissions: true
})For streaming:
"Explain OTP in one sentence."
|> AntigravityCliSdk.execute(%AntigravityCliSdk.Options{})
|> Enum.each(fn
%AntigravityCliSdk.Types.MessageEvent{content: text} -> IO.write(text)
%AntigravityCliSdk.Types.ResultEvent{} -> :ok
%AntigravityCliSdk.Types.ErrorEvent{} = error -> IO.inspect(error)
end)Runtime configuration is explicit:
ANTIGRAVITY_CLI_PATHis translated byconfig/runtime.exsinto the app config key:cli_path.ANTIGRAVITY_MODELbecomes the app config key:model.ANTIGRAVITY_LOG_FILEbecomes the app config key:log_file.%AntigravityCliSdk.Options{api_key: value}becomesANTIGRAVITY_API_KEYin the child process environment.
Library modules read application config, not the parent OS environment.
mix run examples/simple_stream.exsThe example uses the real agy binary through cli_subprocess_core.
Run the full SDK-owned suite with:
~/scripts/with_bash_secrets bash examples/run_all.shSee Examples for the full inventory. ASM provider
examples live in agent_session_manager/examples.