Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cradle-cli

cradle-cli is the operator client for a remote cradle-agent

For local-only testing, run cradle-agent --local instead.

Build

From the workspace root:

cargo build (--release) -p cradle-cli

The development binary is written to:

target\<debug/release>\cradle-cli.exe

Basic Usage

Start the agent in one terminal:

.\cradle-agent.exe .\path\to\target.exe

Then connect from another terminal:

.\cradle-cli.exe localhost:9001

The CLI exits successfully when the run completes, unless --format ci is used and one or more failing checks are reported.

Authentication

If the agent was started with --token, pass the same token to the CLI:

.\cradle-agent.exe --token "dev-secret" .\path\to\target.exe
.\cradle-cli.exe --token "dev-secret" localhost:9001

If the token is missing or incorrect, the agent rejects the request and the CLI exits.

TLS

Use --tls when connecting to an agent that was started with --cert/--key, or --auto-cert.

.\cradle-cli.exe --tls localhost:9001

For locally generated self-signed certificates (or other unsafe certificates you own. I don't judge), add --insecure:

.\cradle-agent.exe --auto-cert .\path\to\target.exe
.\cradle-cli.exe --tls --insecure localhost:9001

Use --pin to accept only a certificate with the expected SHA-256 fingerprint. The fingerprint may be written as 64 hex characters or colon-separated hex bytes:

.\cradle-cli.exe --tls --pin <FINGERPRINT> localhost:9001

Output Formats

The CLI supports three output formats:

  • pretty: human-readable check lines plus a colored summary.
  • json: a JSON array of CheckResult values. Plugin logs are written to stderr so stdout stays parseable.
  • ci: GitHub Actions-compatible error and warning annotations. The process exits with code 1 if any fail or critical result is returned.

Examples:

.\cradle-cli.exe --format pretty localhost:9001
.\cradle-cli.exe --format json localhost:9001
.\cradle-cli.exe --format ci localhost:9001

Options

Usage: cradle-cli.exe [OPTIONS] <HOST>

Arguments:
  <HOST>  Remote cradle-agent address (host:port)

Options:
  -t, --token <TOKEN>    Auth token (must match cradle-agent)
  -f, --format <FORMAT>  Output format [default: pretty]
      --tls              Use TLS
      --insecure         Allow insecure TLS connections
      --pin <PIN>        Certificate fingerprint pin
  -h, --help             Print help

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages