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 version
file cost <file>
file upload <file> [--public]
file download <addr> <dest_file>
file list
register generate-key [--overwrite]
register cost <name>
register create <name> <value> [--public]
register edit [--name] <address> <value>
register get [--name] <address>
register list
vault cost
vault create
vault load
vault sync [--force]
wallet create [--no-password] [--password <password>]
wallet import <private_key> [--no-password] [--password <password>]
wallet balance
wallet export
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.
- Go to the Releases page on GitHub.
- Download the latest release for your operating system.
- Extract the downloaded archive.
- Move the binary to a directory included in your system's PATH.
- Ensure you have Rust and Cargo installed on your machine. You can download them from rust-lang.org
- Clone the repository
git clone https://github.com/maidsafe/autonomi.git
cd autonomi
- Build the CLI:
cargo build --release --bin=ant
- Add the CLI to your PATH / Environment Variables
$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]
Uploads a file to the network.
Expected value:
<file>
: File path (accessible by current user)
The following flag can be added:
--public
(Optional) Specifying this will make this file publicly available to anyone on the network
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.
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.
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 Safe Network repository is licensed under the General Public License (GPL), version 3 (LICENSE http://www.gnu.org/licenses/gpl-3.0.en.html).
Contributions are welcome! Please read the CONTRIBUTING.md file for guidelines on how to contribute to this project.