diff --git a/README.md b/README.md index 8f1c3c1..47f57b5 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ All data and file upload operations accept an optional `payment_mode` parameter - **Rust** toolchain — for building antd - **Python 3.10+** — for the dev CLI (`ant-dev`) and MCP server - **ant-node** repo cloned as sibling (for local testnet only): `git clone https://github.com/WithAutonomi/ant-node ../ant-node` +- **Foundry** (provides `anvil`) — for the local EVM testnet that the devnet spawns: `curl -sL https://foundry.paradigm.xyz | bash && foundryup` **Language-specific** (install only what you need): @@ -428,7 +429,7 @@ The Autonomi network provides these core primitives, all accessible through the ## Developer CLI Reference ``` -ant dev start [--autonomi-dir PATH] [--no-build] # Start local environment +ant dev start [--ant-node-dir PATH] [--no-build] # Start local environment ant dev stop # Tear down everything ant dev status # Show running processes + health ant dev example [-l python|csharp] # Run named example diff --git a/ant-dev/src/ant_dev/cli.py b/ant-dev/src/ant_dev/cli.py index 1c1e4bd..1a19bba 100644 --- a/ant-dev/src/ant_dev/cli.py +++ b/ant-dev/src/ant_dev/cli.py @@ -19,7 +19,9 @@ def main(argv: list[str] | None = None) -> None: # ant dev start p = dev_sub.add_parser("start", help="Start ant devnet + antd") - p.add_argument("--ant-node-dir", help="Path to ant-node repo") + # --autonomi-dir kept as a back-compat alias for older docs/scripts (#62). + p.add_argument("--ant-node-dir", "--autonomi-dir", dest="ant_node_dir", + help="Path to ant-node repo") p.add_argument("--no-build", action="store_true", help="Skip build (use existing binaries)") p.add_argument("--enable-evm", action="store_true", help="Enable EVM payment enforcement") diff --git a/ant-dev/src/ant_dev/cmd_example.py b/ant-dev/src/ant_dev/cmd_example.py index 3c17e22..9cb2e97 100644 --- a/ant-dev/src/ant_dev/cmd_example.py +++ b/ant-dev/src/ant_dev/cmd_example.py @@ -66,9 +66,9 @@ def _run_one_python(script: Path) -> None: print(f"Example file not found: {script}") sys.exit(1) - # Use 'python' on Windows, 'python3' on Unix - python = "python" if sys.platform == "win32" else "python3" - result = subprocess.run([python, str(script)]) + # Use the interpreter that runs ant-dev itself; in editable installs + # that points at the venv where antd[rest] is on sys.path (#63). + result = subprocess.run([sys.executable, str(script)]) if result.returncode != 0: sys.exit(result.returncode) diff --git a/ant-dev/src/ant_dev/cmd_start.py b/ant-dev/src/ant_dev/cmd_start.py index a081d0f..5870b2c 100644 --- a/ant-dev/src/ant_dev/cmd_start.py +++ b/ant-dev/src/ant_dev/cmd_start.py @@ -8,6 +8,7 @@ import json import os +import shutil import sys import time from pathlib import Path @@ -73,6 +74,14 @@ def run(args) -> None: print() # ── 1. Start ant-devnet ── + # Preflight: ant-devnet spawns anvil (Foundry) for the EVM testnet (#64). + # Without anvil on PATH the devnet times out with an unhelpful error. + if shutil.which("anvil") is None: + print(red(" ERROR: anvil (from Foundry) not found on PATH.")) + print(gray(" ant-devnet needs anvil for the local EVM testnet.")) + print(gray(" Install: curl -sL https://foundry.paradigm.xyz | bash && foundryup")) + sys.exit(1) + print(yellow("[1/3] Starting ant devnet...")) devnet_cmd = [