| Crates.io | ant-cli |
| lib.rs | ant-cli |
| version | 0.4.6 |
| created_at | 2024-12-18 13:39:41.857131+00 |
| updated_at | 2025-09-03 17:11:21.746182+00 |
| description | CLI client for the Autonomi network |
| homepage | https://maidsafe.net |
| repository | https://github.com/maidsafe/autonomi |
| max_upload_size | |
| id | 1487595 |
| size | 389,495 |
ant [OPTIONS] <COMMAND>
--log-output-dest <LOG_OUTPUT_DEST>: Specify the logging output destination. [default: data-dir]--log-format <LOG_FORMAT>: Specify the logging format.--peer <multiaddr>: Peer(s) to use for bootstrap, in a 'multiaddr' format containing the peer ID [env: ANT_PEERS=]--timeout <CONNECTION_TIMEOUT>: The maximum duration to wait for a connection to the network before timing out-x, --no-verify: Prevent verification of data storage on the network-h, --help: Print help (see more with '--help')-V, --version: Print versionfile cost <file>file upload <file> [--public] [--no-archive] [--retry-failed 3]file download <addr> <dest_file>file listregister generate-key [--overwrite]register cost <name>register create <name> <value>register edit [--name] <address> <value>register get [--name] <address>register listvault costvault createvault loadvault sync [--force]scratchpad generate-key [--overwrite]scratchpad cost <name>scratchpad create <name> <data> [--max-fee-per-gas <value>]scratchpad share <name>scratchpad get <name> [--secret-key] [--hex]scratchpad edit <name> <data> [--secret-key]scratchpad listwallet create [--no-password] [--password <password>]wallet import <private_key> [--no-password] [--password <password>]wallet balancewallet exportanalyze <address>help
help <COMMAND>
You can install the Autonomi CLI in two ways: by directly downloading the binary from GitHub or by building it from source using a terminal.
git clone https://github.com/maidsafe/autonomi.git
cd autonomi
cargo build --release --bin=ant
$env:PATH += ";C:\path\to\your\binary"
[System.Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:\path\to\your\binary", [System.EnvironmentVariableTarget]::User)
export PATH=$PATH:/path/to/your/binary
echo 'export PATH=$PATH:/path/to/your/binary' >> ~/.bashrc
source ~/.bashrc
--log-output-dest <LOG_OUTPUT_DEST>
Default value: data-dir
Valid values: [stdout , data-dir , <custom path>]
The data directory location is platform specific:
| OS | Path |
|---|---|
| Linux | $HOME/.local/share/autonomi/client/logs |
| macOS | $HOME/Library/Application Support/autonomi/client/logs |
| Windows | %AppData%\autonomi\client\logs |
--log-format <LOG_FORMAT>
Valid values [default , json]
If the argument is not used, the default format will be applied.
--timeout <CONNECTION_TIMEOUT>
Default value: 120
Valid values: [0 - 999]
The maximum duration to wait for a connection to the network before timing out.
This value is expressed in seconds.
-x, --no-verify
This may increase operation speed, but offers no guarantees that operations were successful.
file cost <file>
Gets a cost estimate for uploading a file to the network. This returns both the storage costs and gas fees for the file.
Expected value:
<file>: File path (accessible by current user)
file upload <file> [--public] [--no-archive] [--retry-failed 3]
Uploads a file to the network.
Expected value:
<file>: File path (accessible by current user)The following flags can be added:
--public (Optional) Specifying this will make this file publicly available to anyone on the network--no-archive (Optional) Skip creating local archive after upload. Only upload files without saving archive information. Note that --no-archive is the default behaviour for single file uploads (folk can still upload a single file as an archive by putting it in a directory)--retry-failed (Optional) Automatically retry failed uploads. This is particularly useful for handling gas fee errors when the network base fee exceeds your --max-fee-per-gas setting. The retry mechanism works at the batch level, so only failed chunks are retried, not the entire file upload process. Being the times of the original chunks, default is 0 for not carrying out retry.Example usage with retry functionality:
ant file upload myfile.txt --public --retry-failed 3 --max-fee-per-gas 10000000
This will upload the file publicly and automatically retry if the base fee is higher than arbitrums minimum gas fee, showing detailed error messages with current gas prices. Using these settings ensures your data goes up at minimum cost (but depending on current blockchain fees and the amount of data this might take a while)
file download <addr> <dest_path>
Download a file from network address to output path
Expected values:
<addr>: The network address of a file
<dest_path>: The output path to download the file to
file list
Lists all files (both public and private) in a vault.
register generate-key [--overwrite]
Generate a new register key
The following flag can be applied:
--overwrite (Optional) Adding this flag will overwrite any existing key, and result in loss of access to any existing registers created using that key
register cost <name>
Gets a cost estimate for storing a register on the network. This returns both the storage costs and gas fees.
register create <name> <value>
Create a new register with the given name and value. Note: that anyone with the register address can read its value.
Expected values:
<name>: The name of the register<value>: The value to store in the registerregister edit [--name] <address> <value>
Edit an existing register
Expected values:
<address>: The address of the register to edit<value>: The new value to store in the registerThe following flag can be applied:
--name:bool (Optional) Adding this flag will use the name of the register instead of the address
Note: that only the owner of the register can use this shorthand as the address can be generated from the name and register key.
register get [--name] <address>
Get a register from the network
Expected values:
<address>: The address of the registerThe following flag can be applied:
--name:bool (Optional) Adding this flag will use the name of the register instead of the address
Note: that only the owner of the register can use this shorthand as the address can be generated from the name and register key.
register list
List local registers
vault cost
Gets a cost estimate for uploading a vault to the network. This returns both the storage costs and gas fees for the vault.
vault create
Creates a new vault and uploads it to the network. This will initialise a new vault in the local storage and then upload it to the network.
vault load
Retrieves data from the network and writes it to local storage. This will download the vault data from the network and synchronise it with the local storage.
vault sync [--force]
Sync the users local data with the network vault data.
The following flag can be applied:
--force (Optional) Add this flag to overwrite data in the vault with local user data
wallet create [--no-password]
You will be prompted for an optional password, ignoring this will not encrypt the wallet. This will output the private key for the wallet, the public key for the wallet, and the stored location on device.
The following flags can be used to explictly include or exclude encryption of the created wallet
--no-password (Optional) Add this flag to skip the password prompt and encryption step.
--password <password> (Optional) Add this flag to encrypt the create wallet
Note on wallet security Encrypted wallets provide an additional layer of security, requiring a password to read the private key and perform transactions. However, ensure you remember your password; losing it may result in the inability to access your encrypted wallet.
wallet import <private_key>
The following flags can be used to explictly include or exclude encryption of the imported wallet
--no-password (Optional) Add this flag to skip the password prompt and encryption step.
--password <password> (Optional) Add this flag to encrypt the create wallet
wallet balance
This will display both the token and gas balances.
wallet export
This will display both the address and private key of the wallet.
Analyze an address to get the address type, and visualize the content.
analyze <address>
scratchpad generate-key [--overwrite]
Generate a new general scratchpad key from which all your scratchpad keys can be derived.
The following flag can be applied:
--overwrite (Optional) Warning: overwriting the existing key will result in loss of access to any existing scratchpads
scratchpad cost <name>
Gets a cost estimate for creating a scratchpad on the network.
Expected values:
<name>: The name of the scratchpadscratchpad create <name> <data> [--max-fee-per-gas <value>]
Create a new scratchpad with the given name and data.
Expected values:
<name>: The name of the scratchpad<data>: The data to store in the scratchpad (Up to 4MB)The following flag can be applied:
--max-fee-per-gas <value> (Optional) Specify the maximum fee per gas
scratchpad share <name>
Share a scratchpad secret key with someone else. Sharing this key means that the other party will have permanent read and write access to the scratchpad.
Expected values:
<name>: The name of the scratchpadscratchpad get <name> [--secret-key] [--hex]
Get the contents of an existing scratchpad from the network.
Expected values:
<name>: The name of the scratchpadThe following flags can be applied:
--secret-key (Optional) Indicate that this is an external scratchpad secret key (Use when interacting with a shared scratchpad)
--hex (Optional) Display the data as a hex string instead of raw bytes
scratchpad edit <name> <data> [--secret-key]
Edit the contents of an existing scratchpad.
Expected values:
<name>: The name of the scratchpad<data>: The new data to store in the scratchpad (Up to 4MB)The following flag can be applied:
--secret-key (Optional) Indicate that this is an external scratchpad secret key (Use when interacting with a shared scratchpad)
scratchpad list
List owned scratchpads.
If you encounter any errors while using the CLI, you can use the --log-output-dest and --log-format options to specify logging details. This can help with debugging and understanding the behavior of the CLI.
This Autonomi Network repository is licensed under the General Public License (GPL), version 3 (LICENSE).
Contributions are welcome! Please read the CONTRIBUTING.md file for guidelines on how to contribute to this project.