awesome cli.

Databases & storage

MinIO Client for coding agents

S3-compatible object storage inspection, copy, mirror, and management. The mirror dry-run is the main reason to hand it to an agent.

Command: mc

Open the official project ↗

This article follows the official documentation. We haven’t tested this tool for a hands-on review.

When a coding agent needs to inspect or compare files in object storage, it can use MinIO Client (mc) to list, copy, and mirror objects from the command line. Objects are files stored in buckets, which work like top-level folders. MinIO now documents mc as the AIStor Client. Some of its functions only support licensed AIStor Server deployments. The listing and mirror commands below also accept other services that use the Amazon S3 API, but MinIO only tests mc with AIStor and AWS S3.

mc is a general storage tool; MinIO did not build it specifically for coding agents. For example, an agent can compare a local artifact directory with a path inside a remote bucket, called a prefix, and report what a mirror command would change. The --dry-run option previews those changes without applying them. The agent still needs a configured connection to the storage service. Even in preview mode, mc sends network requests to inspect the remote destination.

Install and configure mc

The AIStor Client quickstart has download commands for each operating system. On 64-bit Intel Linux, the documented commands are:

curl --progress-bar -L https://dl.min.io/aistor/mc/release/linux-amd64/mc \
  --create-dirs \
  -o $HOME/aistor-binaries/mc
chmod +x $HOME/aistor-binaries/mc
$HOME/aistor-binaries/mc --help

Add $HOME/aistor-binaries to your PATH so the shell finds mc, then check the version with mc --version. On some operating systems another program already uses the name mc. The docs say the AIStor Client then uses the command mcli.

Before the agent connects to a storage service, set up a named alias in mc. The alias is a short name for the service's address and credentials. Run this command in a trusted shell, replacing the uppercase placeholders with the address and credentials supplied by your storage administrator:

mc alias set research https://storage.example.com ACCESS_KEY_PLACEHOLDER SECRET_KEY_PLACEHOLDER

Do not put access keys in the agent prompt. Configure the alias outside the agent session, and give the agent access only to the configured environment it needs. The command accepts credentials as arguments, so avoid sharing the command with real values in logs, tickets, or chat. On Linux and macOS, mc saves aliases in ~/.mc/config.json. What the agent can do through the alias depends on the policies attached to those credentials, so read-only credentials are a good choice for this task.

Check that the alias can list the intended bucket before asking the agent to use it:

mc ls research/BUCKET_NAME

BUCKET_NAME is a placeholder for the bucket you are authorized to inspect. The mc ls command contacts the storage service and lists its contents; it does not change them. If the agent should parse the result, add the global flag --json, as in mc --json ls research/BUCKET_NAME. It prints one JSON object per line. The mc alias set reference and the mc ls reference document both commands.

Preview a mirror

Suppose a release pipeline created local artifacts in ./artifacts/, and you want to compare them with the agent-review/ path in a remote bucket. Run:

mc mirror --dry-run ./artifacts/ research/BUCKET_NAME/agent-review/

The command reads the local directory and contacts the remote service to compare the destination with those files. The mc mirror reference describes --dry-run as a mock mirror operation, which previews the mirror actions without copying or removing objects. The exact output depends on the files and remote contents, so have the agent summarize the changes mc reports rather than assume a fixed output format.

A dry run does not guarantee that the destination will remain unchanged between preview and a later mirror command. Another writer could update the bucket after the preview. If you decide to proceed, run mc mirror separately, without --dry-run, and confirm that the source and destination paths are correct first. Without --overwrite, mc mirror does not replace an object that already exists on the destination. It logs an error for that object and continues with the others. Avoid adding --remove unless you intend the mirror to delete destination objects that are absent from the source.

A realistic agent prompt is:

Compare ./artifacts/ with research/BUCKET_NAME/agent-review/ using mc mirror --dry-run. Do not run a write command. Summarize the planned changes and report any errors.

The prompt sets a clear boundary, while the command itself keeps the comparison read-only.

What the preview can tell you

The mc mirror command synchronizes a source with a destination, similar to rsync, which makes it useful for checking artifact uploads. It copies only the current version of each object and its tags, without other metadata. The preview reports only what the command would do for the paths and options you supplied. It does not check whether an artifact is correct for a release or whether another process will change the bucket before you run the write command.

Use mc ls when you only need to inspect a bucket or prefix. mc diff lists objects that are missing on one side or differ in size, but it does not compare their contents. Use mc mirror --dry-run when you need to see what a mirror would do to a remote destination. These commands make network requests when they access the configured endpoint; only the mirror command without dry-run applies the synchronization.

Tool details come from awesome-ai-cli.