Expand description
gadk-cli: the gadk deploy CLI (gadk deploy cloudrun, gadk deploy agentengine) and its
helper text and console utilities. Its flags, checks, generated Dockerfile CMD, gcloud
invocations and console output follow ADK’s deploy CLI.
The binary gadk deploys a gadk agent (a Cargo binary target) to Cloud Run or Vertex AI
Agent Engine. Everything a command touches outside the process (child processes, stdout and
stderr, the working directory, the environment, the clock) goes through Env, so tests
never spawn gcloud or cargo, never read the process environment and never change the
current directory.
Modules§
- deploy
- The
deploycommand, with thecloudrunandagentenginesubcommands each module’sinitadds. - flags
- Command-line flag helpers for clap: the flag kinds the
gadk deploycommands register (string, int, duration and bool flags) as clap builderArgs that parse like ADK’s CLI flags, the value readers,passed(the flag was on the command line) and the mapping of clap’s parse errors to ADK’s error texts (pflag_error). - root
- The root command and its dispatch: the command tree
gadk→deploy→ {agentengine,cloudrun}, and the error reporting (Error: <msg>and the failing command’s usage on stderr, exit 1). - runner
- The process seam:
Cmdis a command with its program looked up inPATHand a text form; aCommandRunnerstarts it. Production usesTokioRunner; tests inject a recording runner, so no test spawnsgcloudorcargo. - stage
- The build context a deploy ships: the two-stage Dockerfile’s text, the staged source
tree (copy and archive) and the temp-dir helper (a
<prefix>YYYYMMDD_HHMMSS__*directory). - target
- The Cargo target a deploy builds and the builder image’s Rust version.
- util
- The text checks and the console helpers the
gadkcommands print with. The flag-usage helper lives ingadk-launcherasflag_usage(the launcher’s user).
Structs§
- Env
- Everything a command reads or writes outside the process (stdout, stderr, the working directory, the environment, the clock and child processes).
- Shared
Writer - A cloneable, shared output stream (the commands’ stdout and stderr):
every clone writes to the same underlying writer, one
writecall at a time.
Functions§
- run
- Runs the
gadkcommand line (argsincludes the program name, asstd::env::args_os) and returns the process exit code: 0, or 1 when a command failed.