| name | self-setup |
| description | First-run setup for D-ND plugin. Maps the local environment, detects capabilities, configures node identity. Run once after installation or when environment changes. |
D-ND Self-Setup — Node Discovery & Configuration
Run this after installing the d-nd-core plugin to configure it for your environment.
What it does
- Environment scan: Detects available repos, tools, access
- Capability mapping: Tests SSH, Docker, API connectivity
- Configuration: Writes
.env.d-nd with discovered settings
Setup procedure
Step 1 — Detect environment
echo "=== D-ND Node Discovery ==="
echo "Hostname: $(hostname)"
echo "User: $(whoami)"
echo "OS: $(uname -s 2>/dev/null || echo 'Windows')"
echo "CWD: $(pwd)"
echo ""
echo "## Detected Repositories"
for dir in */; do
if [ -d "$dir/.git" ]; then
commit=$(git -C "$dir" rev-parse --short HEAD 2>/dev/null)
branch=$(git -C "$dir" branch --show-current 2>/dev/null)
echo " $dir — $branch @ $commit"
fi
done
echo ""
echo "## Capabilities"
command -v ssh >/dev/null 2>&1 && echo " SSH: available" || echo " SSH: not available"
command -v docker >/dev/null 2>&1 && echo " Docker: available" || echo " Docker: not available"
command -v node >/dev/null 2>&1 && echo " Node.js: $(node --version 2>/dev/null)" || echo " Node.js: not available"
command -v python3 >/dev/null 2>&1 && echo " Python: $(python3 --version 2>/dev/null)" || echo " Python: not available"
command -v git >/dev/null 2>&1 && echo " Git: $(git --version 2>/dev/null)" || echo " Git: not available"
echo ""
if [ -n "$DND_VPS_IP" ]; then
echo "## API Connectivity"
curl -s --max-time 3 "http://${DND_VPS_IP}:${DND_VPS_PORT:-3002}/api/status" \
-H "X-Auth-Token: ${DND_API_TOKEN}" >/dev/null 2>&1 \
&& echo " API: reachable" || echo " API: unreachable"
fi
Step 2 — Set identity
Based on discovery results, set these environment variables in your shell profile or .env.d-nd:
export DND_NODE_ID="MY_NODE"
export DND_PROJECT_DIR="/path/to"
export DND_VPS_IP=""
export DND_VPS_PORT="3002"
export DND_API_TOKEN=""
Step 3 — Verify
Run /d-nd-core:system-check to verify everything works.
Node roles
Nodes are identified by their capabilities, not by fixed names:
| Capability | Description |
|---|
| Full access | SSH, Docker, all repos, deploy |
| Development | Code editor, local repos, test environment |
| Satellite | Autonomous project, receives seed updates |
| Specialized | Specific domain (design, finance, research) |
The operator assigns the role. The system adapts.
$ARGUMENTS
Eval
Trigger Tests
"set up my node" -> activates
"configure d-nd" -> activates
"first time setup" -> activates
"deploy" -> does NOT activate
Fidelity Tests
Given fresh environment: detects repos, capabilities, outputs config template
Given configured environment: reports current config, suggests updates if needed