# CLI

## Prerequisites

Before you can use our S3 Cloud Storage with the AWS CLI, you must install the AWS CLI and configure it.

1. [Install the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) - ref docs.aws.amazon.com
2. [Configure the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) - ref docs.aws.amazon.com

After you have installed and configured the AWS CLI locally, the following sections will show you how to use the CLI. For complete examples, [see the AWS CLI S3 examples](https://docs.aws.amazon.com/cli/latest/userguide/cli-services-s3-commands.html).

## List buckets

```
aws s3 --endpoint-url https://s3proxy.decentrally.cloud
```

## List objects

```
aws s3 --endpoint-url https://s3proxy.decentrally.cloud ls s3://bucket
```

## Upload object

```
aws s3 --endpoint-url https://s3proxy.decentrally.cloud cp /path/to/file s3://bucket
```

## Get object

```
aws s3 --endpoint-url https://s3proxy.decentrally.cloud cp s3://bucket/file /path/to/file
```

## Delete object

```
aws s3 --endpoint-url https://s3proxy.decentrally.cloud rm s3://bucket/file
```

## Delete multiple objects

```
aws s3 --endpoint-url https://s3proxy.decentrally.cloud rm s3://bucket/ --recursive
```

## Copy object

```
aws s3 --endpoint-url https://s3proxy.decentrally.cloud cp s3://bucket/file s3://bucket/file
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.decentrally.cloud/s3-cloud-storage-intro/sdks-and-clis/cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
