| 4 | const path = require('node:path'); |
| 5 | |
| 6 | function printUsage() { |
| 7 | console.log(` |
| 8 | AgentVM CLI - Interactive terminal into the VM |
| 9 | |
| 10 | Usage: agentvm [options] |
| 11 | |
| 12 | Options: |
| 13 | --network, -n Enable networking (default: enabled) |
| 14 | --no-network Disable networking |
| 15 | --mount, -m <path> Mount a host directory into the VM at /mnt/host |
| 16 | Can specify VM path with: --mount /host/path:/vm/path |
| 17 | --debug, -d Enable debug logging |
| 18 | --help, -h Show this help message |
| 19 | |
| 20 | Examples: |
| 21 | agentvm # Start VM with networking enabled |
| 22 | agentvm --no-network # Start VM without networking |
| 23 | agentvm -m /home/user/project # Mount directory at /mnt/host |
| 24 | agentvm -m /tmp/data:/data # Mount /tmp/data at /data in VM |
| 25 | agentvm -n -m ./mydir # Network on, mount ./mydir |
| 26 | `); |
| 27 | } |
| 28 | |
| 29 | function parseArgs(args) { |
| 30 | const options = { |