Crates.io | ad4m |
lib.rs | ad4m |
version | 0.10.0-rc2 |
source | src |
created_at | 2022-11-11 19:51:31.220252 |
updated_at | 2024-07-24 14:20:27.935725 |
description | Executables for running, developing and debugging an ADAM node/agent |
homepage | https://ad4m.dev |
repository | https://github.com/coasys/ad4m |
max_upload_size | |
id | 713027 |
size | 2,212,259 |
This package contains command line tools for the Agent-Centric Distributed Application Meta-ontology (ADAM, aka AD4M), a framework for building interoperable, decentralized applications. It provides developers with the tools to control and script the functionalities of AD4M, leveraging the power of the Rust implementation of the AD4M GraphQL interface wrapper.
The purpose of these CLIs is development, scripting, and remote control of AD4M features, as well as programatic setup and running of ADAM agents.
This crate is published to crates.io and can be installed via cargo install ad4m
.
But several dependent crates have non-Rust dependencies which need to be installed.
Make sure you have rustup
installed (follow instructions here).
Use rustup to install the latest stable Rust version.
ADAM currently needs at least Rust version:
1.77.0
For building Holochain DNAs, which are part of the ADAM bootstrap languages included here you need your Rust toolchain to be able to compile to WASM.
Run the following command to install the WASM target:
rustup target add wasm32-unknown-unknown
Holochain currently depends on Go being installed at version 1.21 or later. Follow the installation instructions on https://go.dev/doc/install.
Make sure go
is in your $PATH
before you continue. Output of go version
should look like this:
go version go1.21.0 darwin/arm64
Run the following commands depending on your operating system to get all the system libraries installed that are needed by some of the Rust crates that Holochain and ADAM depend on.
Ensure you have Homebrew installed and then run:
brew install protobuf cmake
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf protobuf-compiler cmake
Ensure you have Chocolatey installed and then run:
choco install strawberryperl protoc cmake curl cygwin gnuwin32-m4 msys2 make mingw
Install AD4M using Cargo, Rust's package manager:
cargo install ad4m
This command installs two binaries:
ad4m
: The client for interacting with the executor.
ad4m-executor
: The executor that runs the AD4M agent.
Initialize the AD4M executor with:
ad4m-executor init
This will create a new agent/config directory in ~/.ad4m.
Run the executor (i.e. the ADAM agent/node) using:
ad4m-executor run
Use the ad4m
client to interact with the executor. Here are some common commands:
A fresh install will first need a new agent to be created, which requires a password which is used to encrypt the agent's keys:
ad4m agent generate
This command will prompt for a new password. Future runs of the executor require the wallet to be unlocked with
ad4m agent unlock
providing the same password.
Show all perspectives:
ad4m perspectives
Query links of a perspective by its UUID:
ad4m perspectives query-links <perspective-UUID>
Watch changes of a perspective in real-time:
ad4m perspectives watch <perspective-UUID>
Clone and publish a language from a template:
ad4m languages apply-template-and-publish <language-template-hash>
Publish a perspective as a Neighbourhood:
ad4m neighbourhoods create <perspective-UUID> <neighbourhood-template-hash>
For a full list of commands and their explanations, use:
ad4m --help
Contributions to AD4M are welcome! Please read our contributing guidelines and submit pull requests to our repository.
AD4M is licensed under the CAL-1.0.
For more information on AD4M and ADAM, visit our official website or check out the core documentation.