abc

command module
v0.2.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 2 Imported by: 0

README

abc - Azure Blob Commands

A simple CLI to mess with Azure blobs.

Usage

abc is structured using commands and sub-commands. The command hierarchy is as follows.

  • containers - do stuff with containers
    • ls - list containers on a storage account
    • mk - create containers on a storage account
    • rm - remove containers from a storage account
  • blobs - do stuff with blobs in containers
    • ls - list blobs in a container
    • rm - remove blobs from a container

You can use the -h on any command to get more information:

abc blobs ls -h

Authentication

Authentication is attempted automatically according to the options listed in Azure authentication with the Azure Identity module for Go

Running abc is most easy on Azure workloads that have a managed identity assigned to them (see options 2 and 3 on the page linked above). Using a service principal with a secret is almost as easy, using the AZURE_CLIENT_ID, AZURE_TENANT_ID and AZURE_CLIENT_SECRET environment variables (option 1 on the page linked above).

Examples

The following examples assume authentication is taken care of.

List blobs in a container
abc blobs ls -n mystorageaccount -c mycontainer

This will list each blob on a separate line in the output.

Remove all but the last three blobs in a container
abc blobs rm -n mystorageaccount -c mycontainer $(abc blobs ls -n mystorageaccount -c mycontainer | head -n-3)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL