Service: AT Protocol CLI - EyevinnOSC/community GitHub Wiki

AT Protocol CLI

AT Protocol CLI (GOAT CLI, serviceId birme-goatcli) packages the goat command-line tool for the AT Protocol, the open protocol behind Bluesky, in a container. In Eyevinn Open Source Cloud (OSC) it is a job: it runs the command you give it once and exits. Service page: https://app.osaas.io/dashboard/service/birme-goatcli. License: MIT.

What it can do

  • Resolve an AT Protocol identity (handle or DID) with the resolve subcommand.
  • Back up a Bluesky repository to an S3 bucket with the backup subcommand.
  • Run any other goat subcommand by passing its arguments in cmdLineArgs, without a local AT Protocol toolchain.

Creating an instance

Find the id with list-available-services, read the options with get-service-schema, then call create-service-instance with serviceId: "birme-goatcli". The service has no dependencies on other OSC services. The instance name must be alphanumeric (underscore allowed) and at most 20 characters.

{ "name": "resolveidentity", "cmdLineArgs": "resolve birme.social.eyevinn.technology" }

The job runs the command and ends. Read the output with get-logs-for-instance, and check state with get-instance-status or describe-service-instance.

Options

Option Required Type Meaning
name Yes string Name of the instance. Letters, digits and underscore only (^\w+$).
cmdLineArgs Yes string Arguments passed to the goat binary, for example resolve birme.social.eyevinn.technology or backup birme.social.eyevinn.technology s3://backup/bluesky/.
awsAccessKeyId No string, sensitive AWS access key id (AWS_ACCESS_KEY_ID). Needed only when a command such as backup writes to S3.
awsSecretAccessKey No string, sensitive AWS secret access key (AWS_SECRET_ACCESS_KEY) paired with the access key id. Needed only for S3 operations.
awsSessionToken No string, sensitive Session token for temporary AWS credentials (for example from STS or an IAM role), used together with the two keys above.
awsRegion No string AWS region of the S3 bucket.

Store the three sensitive options as service secrets with create-service-secret (serviceId birme-goatcli) and reference them as {{secrets.NAME}}; the reference must be the whole field value.

Using the instance

Resolve an identity with the OSC CLI:

osc create birme-goatcli resolve-identity \
  -o cmdLineArgs="resolve did:plc:ewvi7nxzyoun6zhhandbv9sik"

Back up a Bluesky repo to S3:

osc create birme-goatcli backup-repo \
  -o cmdLineArgs="backup birme.social.eyevinn.technology s3://mybucket/backup/" \
  -o awsAccessKeyId="<aws-access-key-id>" \
  -o awsSecretAccessKey="<aws-secret-access-key>" \
  -o awsRegion="eu-west-1"

Resources