Using the Autonomi CLI
Prerequisites
Steps
1
2
3
4
What happened
Next steps
Last updated
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
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.
curl -fsSL https://raw.githubusercontent.com/WithAutonomi/ant-client/main/install.sh | bashirm https://raw.githubusercontent.com/WithAutonomi/ant-client/main/install.ps1 | iexgit clone https://github.com/WithAutonomi/ant-client.git
cd ant-client
cargo build --release --bin antThe 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.
ant --help
# or, if you built from source and have not installed it on PATH:
./target/release/ant --helpFor 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.
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.
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 --publicExpected output includes a public address you can share with other readers, plus the stored chunk count, file size, and total cost.
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 --publicUse 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.
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.
Last updated