DAS Toolbox is a CLI tool that simplifies the management of containerized services, OpenFaaS functions, and operations related to the Distributed Atomspace (DAS). It allows you to spin up databases, load MeTTa files, validate syntax, and more.
- Docker — required for some commands that interact with containers.
- Python >= 3.10
pip(required if installing via pip)virtualenv(optional, recommended to isolate the environment)
Note:
pipis only required if you install via pip. On Ubuntu, you can install using the.debpackage generated bymake buildwithout pip.
- Set up the repository:
sudo bash -c "wget -O - http://45.77.4.33/apt-repo/setup.sh | bash"- Install the package:
sudo apt install das-toolbox- Verify the installation:
das-cli --helpThis method installs the
.debpackage directly. Nopipor virtual environment is required.
- Build the package locally:
make build # generates the .deb file in dist/- Install the package (choose one of the methods below):
Using APT (Recommended):
sudo apt install ./dist/das-cli_<version>.debUsing dpkg:
sudo dpkg -i dist/das-cli_<version>.deb- Verify the installation:
das-cli --helpNo
pipor virtualenv needed.
- Clone the repository and navigate to the project root:
git clone https://github.com/singnet/das-toolbox.git- (Optional but recommended) Create and activate a virtual environment:
python -m venv env
source env/bin/activate # Linux/macOS
env\Scripts\activate # Windows- Install the package using
pip:
cd das-toolbox/das-cli
pip install .- Verify the installation:
das-cli --helpThis method works on all supported OSs (Linux, macOS, Windows)
The general syntax for using das-cli is:
das-cli <command> <subcommand> [options]<command>— the main module or functionality you want to access (e.g.,ab,query).<subcommand>— a specific action within the command (e.g.,start,stop).[options]— optional flags or parameters to modify the behavior of the subcommand (e.g.,--follow,--remote).
# Configure Redis, MongoDB, or any supported service
das-cli config setYou can verify the configuration using:
das-cli config ls# Start database services
das-cli db startBefore starting the modules, verify and load your MeTTa files to the database.
# Validate the MeTTa syntax
das-cli metta check ./examples/data/animals.metta
# Load the MeTTa file into the database
das-cli metta load ./examples/data/animals.mettaStart the Attention Broker and the other core services:
# Start the Attention Broker
das-cli ab start
# Start the Query Agent
das-cli query startYou can run a query test using the query send command, passing a port range, and the query expression.
das-cli query send \
--port-range 42500:42599 \
--query 'LINK_TEMPLATE Expression 3 NODE Symbol Similarity NODE Symbol "\"human\"" VARIABLE S'This command sends a MeTTa query to the running DAS environment. This command is under construction yet.
You don't need to memorize all commands. DAS CLI offers a structured help system that lets you explore everything interactively.
das-cli --helpThis will show the main command categories such as db, metta, logs, etc.
To see the available subcommands within a group:
das-cli <command-group> --helpExample:
das-cli db --helpTo understand how to use a specific command:
das-cli <command-group> <subcommand> --helpExample:
das-cli db count-atoms --helpIf you installed das-cli via the APT package, you can also view man pages:
man das-cli
man das-cli-attention-broker-start
man das-cli-db-restartMan pages provide detailed documentation, flags, examples, and usage tips.
If you forgot --recurse-submodules, run:
git submodule update --init --recursivemake tests-localDAS_CLI_TEST_CLUSTER=true make tests-localMake sure you have configured the tests/integration/fixtures/config/redis_cluster.json file. Replace the username and ip for the cluster nodes. For the first node, you don't need to replace the username as it will automatically use the current server's user where the tests are running with das-cli. Do not change the context as it will be created during test execution.
Add your user to the Docker group:
sudo usermod -aG docker $USER
# Restart your terminal sessionEnsure at least 32MB of free disk space. DAS Toolbox extracts files to temporary folders during execution.