Critical infrastructure of the next web client components: APIs, CLI, and Node.js bindings for the Autonomi Network.
This repository contains the client-side components for interacting with the Autonomi Network:
- Lifetime storage with one-time payment
- Private by design with multilayered encryption
- Decentralized infrastructure built from everyday devices
- Content-addressable storage using Kademlia and libp2p
- CLI - The
ant
command line interface that enables users to interact with the network from their terminal - Autonomi API - The Rust client API library for developers building applications
- Node.js Bindings - JavaScript/TypeScript bindings for the Autonomi client API
- Go to the Releases page
- Download the latest release for your operating system
- Extract and add to your PATH
git clone https://github.com/maidsafe/autonomi_client.git
cd autonomi_client
cargo build --release --bin ant
Add to your Cargo.toml
:
[dependencies]
autonomi = "0.6"
Basic usage:
use autonomi::{Bytes, Client, Wallet};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::init().await?;
let key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
let wallet = Wallet::new_from_private_key(Default::default(), key)?;
// Upload data
let data_addr = client
.data_put_public(Bytes::from("Hello, World"), (&wallet).into())
.await?;
// Download data
let _data_fetched = client.data_get_public(&data_addr).await?;
Ok(())
}
npm install @withautonomi/autonomi
import { Client } from '@withautonomi/autonomi'
const client = await Client.initLocal()
// Ready to use the network!
# Build all components
cargo build --release
# Build CLI only
cargo build --release --bin ant
# Build Node.js bindings
cd autonomi-nodejs
npm install
npm run build
# Run unit tests
cargo test --lib
# Format code
cargo fmt --all
# Run linter
cargo clippy --all-targets --all-features -- -D warnings
For development and testing, you can connect to a local Autonomi network:
-
Set up the main Autonomi repository for running nodes:
git clone https://github.com/maidsafe/autonomi.git cd autonomi
-
Start local EVM testnet:
cargo run --bin evm-testnet
-
Start local network:
cargo run --bin antctl -- local run --build --clean --rewards-address <YOUR_ETHEREUM_ADDRESS>
-
Use the client tools from this repository:
# Using CLI SECRET_KEY=<YOUR_EVM_SECRET_KEY> ./target/release/ant --local file upload <path> # Using Rust API with local network EVM_NETWORK=local cargo test --package autonomi
This repository focuses on client-side components:
autonomi
- Core Rust client library providing high-level APIs for data operations, payments, and network interactionant-cli
- Command-line interface wrapping the autonomi library for end-usersautonomi-nodejs
- Node.js bindings using napi-rs for JavaScript/TypeScript applications
These components depend on core network infrastructure from the main Autonomi repository:
ant-bootstrap
- Network bootstrap peer discoveryant-evm
- Payment processing and blockchain integrationant-protocol
- Network protocol definitionsevmlib
- EVM blockchain integrationant-logging
- Centralized logging infrastructure
- Developer Documentation - Comprehensive guides for building with Autonomi
- API Reference - Rust API documentation
- Individual component READMEs - Detailed usage for each component
Join our community:
- Discord: https://discord.gg/autonomi
- Forum: https://forum.autonomi.community/
- X (Twitter): https://x.com/WithAutonomi
- Reddit: https://www.reddit.com/r/autonomi/
- LinkedIn: https://uk.linkedin.com/company/withautonomi
Contributions are welcome! Please read our contribution guidelines.
- Target the
main
branch - Use Conventional Commits for commit messages
- Ensure all CI tests pass
- Keep PRs under 200 lines of changes when possible
- Reference relevant issues using GitHub keywords
This Autonomi Client repository is licensed under the General Public License (GPL), version 3 (LICENSE).