MCPcopy Index your code
hub / github.com/barnybug/s3

github.com/barnybug/s3 @1.1.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.1.8 ↗ · + Follow
196 symbols 331 edges 8 files 1 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

s3

Build Status

Swiss army pen-knife for Amazon S3.

  • ls: List buckets or keys
  • get: Download keys
  • cat: Cat keys
  • grep: Search for key containing text
  • sync: Synchronise local to s3, s3 to local or s3 to s3
  • rm: Delete keys
  • mb: Create buckets
  • rb: Delete buckets

Installation

Installation is super-easy, there's no need to install anything, just download the self-contained binary from the github releases page (builds are available for Linux, Mac or Windows and 32-bit or 64-bit): https://github.com/barnybug/s3/releases/

Rename and make the download executable:

$ mv s3-my-platform s3; chmod +x s3

And you're ready to go:

$ ./s3 -h

Alternatively you can instead build from source, you'll need go 1.2 installed, then:

go get github.com/barnybug/s3

Setup

Set the environment variables:

export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...

Usage

List buckets:

s3 ls

List keys in a bucket under a prefix:

s3 ls s3://bucket/prefix

Download all the contents (recursively) under the path to local:

s3 get s3://bucket/path

Cat (stream to stdout) all the contents under the path:

s3 cat s3://bucket/path | grep needle

Synchronise localpath to an s3 bucket:

s3 sync localpath s3://bucket/path

Synchronise an s3 bucket to localpath:

s3 sync s3://bucket/path localpath

Synchronise an s3 bucket to another s3 bucket:

s3 sync s3://bucket1/path s3://bucket2/otherpath

Recursively remove all keys under a path:

s3 rm s3://bucket/path

Create a bucket:

s3 mb bucket

Delete a bucket:

s3 rb bucket

Extension points exported contracts — how you extend this code

File (Interface)
(no doc) [2 implementers]
iface.go
Filesystem (Interface)
(no doc) [2 implementers]
iface.go

Core symbols most depended-on inside this repo

String
called by 37
iface.go
Relative
called by 13
iface.go
Reader
called by 6
iface.go
Create
called by 6
iface.go
GetObject
called by 5
mocks.go
Size
called by 5
iface.go
Error
called by 5
iface.go
iterateKeysParallel
called by 4
commands.go

Shape

Method 157
Function 29
Struct 7
Interface 2
TypeAlias 1

Languages

Go100%

Modules by API surface

mocks.go126 symbols
commands.go20 symbols
s3.go14 symbols
local.go14 symbols
iface.go13 symbols
internal/features/step_definitions.go6 symbols
main.go2 symbols
cmd/s3/main.go1 symbols

For agents

$ claude mcp add s3 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact