A simple command-line interface tool for listing blobs in an Azure Storage container. It uses the AzureStorageSwift library for blob interaction.
- List blobs in an Azure Storage container using a SAS URL
- macOS 11.0 or later
- Swift 5.7 or later
- Xcode (for development)
- Clone the repository:
git clone <repository-url>
cd AzureBlobCLI- Update the placeholder in main.swift with your Azure storage SAS url
let sasUrl = "https://sample.blob.core.windows.net/shared?sp=racwdl&st=2025-02-17T20:21:43Z&se=2026-01-02T04:21:43Z&spr=https&sv=2022-11-02&sr=c&sig=xxx"- Build the project:
swift buildRun the CLI tool:
swift runThe tool will list all blobs in the specified container.
Attempting to connect to Azure Blob Storage...
Storage Account: sample.blob.core.windows.net
Container: myfiles
Initializing az storage container...
Blobs in container:
- document1.pdf
- image.jpg
- data.json
- AzureStorageSwift - Swift library for Azure Storage operations
The project is structured as follows:
Package.swift- Swift package manifestSources/AzureBlobCLI/main.swift- CLI entry pointSources/AzureBlobLister/AzureBlobLister.swift- Core functionality