···11+# gos3dir
22+33+A lightweight S3-compatible server that uses a local directory as storage.
44+Perfect for local development, testing, and offline S3 workflows.
55+_Do not use in production._
66+77+## Installation
88+99+```bash
1010+go install tangled.org/juanlu.space/gos3dir@latest
1111+```
1212+1313+Or build from source:
1414+1515+```bash
1616+git clone <repository-url>
1717+cd gos3dir
1818+go build
1919+```
2020+2121+## Usage
2222+2323+Start the server by pointing it to a directory:
2424+2525+```bash
2626+gos3dir /path/to/data/dir
2727+```
2828+2929+The server listens on `http://localhost:8041`.
3030+3131+## Configure AWS CLI v2
3232+3333+Add a profile to `~/.aws/config`:
3434+3535+```ini
3636+[profile gos3dir-dev]
3737+endpoint_url = http://localhost:8041
3838+s3 =
3939+ addressing_style = path
4040+```
4141+4242+Add dummy credentials to `~/.aws/credentials`:
4343+4444+```ini
4545+[gos3dir-dev]
4646+aws_access_key_id = test
4747+aws_secret_access_key = test
4848+```
4949+5050+## Examples
5151+5252+List buckets:
5353+```bash
5454+aws s3 ls --profile gos3dir-dev
5555+```
5656+5757+Create a bucket:
5858+```bash
5959+aws s3 mb s3://my-bucket --profile gos3dir-dev
6060+```
6161+6262+Upload a file:
6363+```bash
6464+aws s3 cp file.txt s3://my-bucket/ --profile gos3dir-dev
6565+```
6666+6767+List objects in a bucket:
6868+```bash
6969+aws s3 ls s3://my-bucket --profile gos3dir-dev
7070+```
7171+7272+Delete an object:
7373+```bash
7474+aws s3 rm s3://my-bucket/file.txt --profile gos3dir-dev
7575+```
7676+7777+Delete an empty bucket:
7878+```bash
7979+aws s3 rb s3://my-bucket --profile gos3dir-dev
8080+```
8181+8282+## Supported Operations
8383+8484+- List buckets (`GET /`)
8585+- List objects (`GET /{bucket}`)
8686+- Create bucket (`PUT /{bucket}`)
8787+- Upload object (`PUT /{bucket}/{key}`)
8888+- Delete empty bucket (`DELETE /{bucket}`)
8989+- Delete object (`DELETE /{bucket}/{key}`)
9090+9191+## Future work
9292+9393+We would like to fix these at some point:
9494+- Downloads
9595+- Proper deletion of dangling "directories"
9696+9797+## Limitations
9898+9999+These are by design and will not be fixed:
100100+- Path-style addressing only (virtual-hosted-style not supported)
101101+- No authentication or authorization
102102+- No multipart uploads
103103+- No versioning
104104+- No ETags for uploaded objects
105105+- No bit-by-bit compatibility with Amazon S3 server responses