Using the Autonomi CLI

Install ant, confirm it works, retrieve public data from the network, and then move into uploads or local devnet testing when you need them. Choose the CLI when you want shell-first workflows without needing to run the local daemon, antd, first.

The CLI can be a good fit when you want:

  • direct shell access to file, chunk, wallet, or node-management workflows

  • shell-first automation or operational workflows

  • direct control over bootstrap peers, local devnet manifests, and EVM network selection

Prerequisites

  • curl or PowerShell to run the installer, or a Rust toolchain if you prefer to build from source

  • SECRET_KEY for the upload step and for wallet commands. You do not need it for the first download step.

  • A local file to upload later in the guide, unless you use the sample greeting.txt command in the upload step.

If you want SDK ergonomics in another language, see Build with the SDKs and Start the Local Daemon. If you want daemon-free programmatic Rust access, see Build Directly in Rust.

Steps

1

Install the CLI

curl -fsSL https://raw.githubusercontent.com/WithAutonomi/ant-client/main/install.sh | bash

The installer also writes bootstrap_peers.toml into the standard ant config directory, so public-network reads usually work without extra --bootstrap flags.

If you build ant from source instead, provide your own bootstrap config or pass --bootstrap yourself for data commands.

2

Confirm the CLI works

ant --help

# or, if you built from source and have not installed it on PATH:
./target/release/ant --help

For the ant CLI, root flags such as --bootstrap, --devnet-manifest, --allow-loopback, and --evm-network come before the subcommand.

The CLI needs a bootstrap source for data operations. The installer usually provides one through bootstrap_peers.toml. Use --bootstrap to override it, or use --devnet-manifest together with --allow-loopback for a local devnet.

3

Retrieve a public file from the network

This example downloads a public JPEG of Lucky the dog.

ant file download 711c7e20006ff3e0ac6c1f3063286a0c1a3e4c409642e8c526173fa60bb7078a -o lucky.jpg

-o lucky.jpg chooses the local filename for the downloaded copy. The address identifies the content on the network, not the original filename.

4

Store a file on the default network

Set SECRET_KEY, create a small local file, and then upload it on the default network.

printf "hello autonomi\n" > greeting.txt
export SECRET_KEY="0x<hex_private_key>"
ant file upload greeting.txt --public

Expected output includes a public address you can share with other readers, plus the stored chunk count, file size, and total cost.

5

Optional: Use a local devnet for isolated testing

If you already have a devnet manifest, pass it before the subcommand:

SECRET_KEY="0x<hex_private_key>" ant \
  --devnet-manifest /tmp/devnet.json \
  --allow-loopback \
  --evm-network local \
  file upload lucky.jpg --public

Use this mode when you want local nodes and a local EVM chain instead of the public network. For the full setup, see Set Up a Local Network.

What happened

You installed ant, used the configured bootstrap source to reach the Autonomi Network, and downloaded public content directly from the terminal. When you added SECRET_KEY, the same CLI handled self-encryption, upload payment, and DataMap management for file writes.

Next steps

Last updated