go install github.com/TV4/gcp-tools/cmd/gcp-gcs@latest
Usage
gcp-gcs [-credentials=<...>] -bucket=<...> <command>
-bucket string
bucket name
-credentials string
path to a GCP credentials file
Commands:
ls [<prefix>] Lists bucket objects, optionally filtered by the given prefix
download <object> [<object>...] Downloads given object(s) from the bucket
upload <file> [<file>...] Uploads given file(s) to the bucket
read <object> Reads a bucket object to stdout
write <object> Writes a bucket object from stdin
rm <object> [<object>...] Deletes the given object(s) from the bucket
version Shows version info
GCP credentials file:
https://developers.google.com/identity/protocols/application-default-credentials