navada-edge-sdk
v2.0.0
Published
Official SDK for the NAVADA Edge Network — distributed AI infrastructure with Cloudflare, Docker, Azure, AI services, and Automation Queue
Maintainers
Readme
navada-edge-sdk
Official SDK for the NAVADA Edge Network — unified access to distributed nodes, Cloudflare, Azure, Docker, AI models, and two AI agents through a single require().
Zero dependencies. Node.js 18+.
npm install navada-edge-sdkNetwork Architecture
Quick Start
const navada = require('navada-edge-sdk');
// Configure
navada.init({
asus: '10.0.0.1',
mcp: 'http://10.0.0.1:8811',
dashboard: 'http://10.0.0.1:7900',
registry: 'http://10.0.0.1:5000',
});
// Use
const status = await navada.network.ping(); // All nodes + cloud
const tools = await navada.mcp.tools(); // 18 MCP tools
const images = await navada.registry.catalog(); // Docker images
const result = await navada.lucas.exec('docker ps'); // Run on EC2What's in the Network
| Layer | Services | |-------|----------| | 4 Nodes | ASUS (Production), EC2 (Monitoring), Oracle (Infra), HP (Database) | | Cloudflare | R2 Storage, Flux AI (FREE), Stream CDN, Tunnel, DNS | | Azure | n8n Workflow Automation | | AI | YOLO v8, Qwen Coder (FREE), GPT-4o, DALL-E 3, Claude, Flux | | Agents | Lucas CTO (8 tools), Claude CoS (email, images, automation) | | Docker | 25 containers, private registry, Portainer | | Database | PostgreSQL 17 |
API Reference
Network & Nodes
await navada.network.ping() // Ping all 6 endpoints
await navada.network.status() // Full dashboard JSON
navada.network.nodes // { asus: { ip, role }, ... }MCP Server (18 tools)
await navada.mcp.tools() // List available tools
await navada.mcp.call('tool', { args }) // Call a toolLucas CTO Agent (EC2)
await navada.lucas.exec('docker ps') // Bash on EC2
await navada.lucas.ssh('hp', 'df -h') // SSH to any node
await navada.lucas.docker('ctr', 'cmd') // Docker exec
await navada.lucas.deploy('name', 'node') // Deploy container
await navada.lucas.readFile('/path') // Read remote file
await navada.lucas.writeFile('/path', content) // Write remote file
await navada.lucas.listFiles('/dir') // List remote files
await navada.lucas.networkStatus() // Full network statusDashboard (Command Center)
await navada.dashboard.register(3000) // Register service
await navada.dashboard.activity('deploy', 'v2 live') // Log eventDatabase (PostgreSQL)
await navada.db.query('SELECT NOW()')
await navada.db.query('SELECT * FROM users WHERE id = $1', [42])
const client = await navada.db.getClient() // Transactions
await navada.db.close()Requires pg package: npm install pg
Docker Registry
await navada.registry.catalog() // ['my-api', 'dashboard', ...]
await navada.registry.tags('my-api') // ['latest', 'v2']OpenCode
await navada.opencode.status('asus') // Check one node
await navada.opencode.statusAll() // All nodesCloudflare R2
await navada.cloudflare.r2.buckets()
await navada.cloudflare.r2.list('images/')
await navada.cloudflare.r2.upload('key', buffer, 'image/png')
await navada.cloudflare.r2.upload('key', '/path/to/file.jpg')
await navada.cloudflare.r2.delete('key')
navada.cloudflare.r2.publicUrl('key')Cloudflare Flux (FREE Image Gen)
const { buffer } = await navada.cloudflare.flux.generate('a city at night')
await navada.cloudflare.flux.generate('logo', { savePath: './logo.png' })
const { key, url } = await navada.cloudflare.flux.generateAndStore('prompt')Cloudflare Stream
await navada.cloudflare.stream.list()
await navada.cloudflare.stream.uploadFromUrl(url, 'Title')
navada.cloudflare.stream.playbackUrl(id) // HLS URL
navada.cloudflare.stream.embedHtml(id) // Iframe HTMLCloudflare Tunnel & DNS
await navada.cloudflare.tunnel.list()
await navada.cloudflare.dns.list('CNAME')
await navada.cloudflare.dns.create('CNAME', 'app', 'target.com')
await navada.cloudflare.trace('https://your-domain.com')Azure (n8n)
await navada.azure.n8n.health()
navada.azure.n8n.restart() // Via Azure CLI
navada.azure.n8n.url // Get URLAI — YOLO
await navada.ai.yolo.health()
await navada.ai.yolo.model() // Classes, model info
await navada.ai.yolo.detect('/path/to/image.jpg') // Detection JSON
const { buffer, detections } = await navada.ai.yolo.detectImage('/path/to/image.jpg')AI — HuggingFace
await navada.ai.huggingface.qwen('Write a REST API') // Qwen Coder 32B (FREE)
await navada.ai.huggingface.inference('model-name', 'input')AI — OpenAI
await navada.ai.openai.chat('What is ISA allowance?')
await navada.ai.openai.chat(messages, { model: 'gpt-4o' })
await navada.ai.openai.image('futuristic server room')HTTP Helpers
const r = await navada.request('http://any-url/api', {
method: 'POST', body: { key: 'value' }, headers: {}, timeout: 5000,
});
// r.status, r.data, r.headersConfiguration
All via environment variables. See .env.example in the package:
cp node_modules/navada-edge-sdk/.env.example .envOr programmatic:
navada.init({ asus: '10.0.0.1', mcp: 'http://10.0.0.1:8811' });Ecosystem
| Package | Install | Purpose |
|---------|---------|---------|
| navada-edge-sdk | npm i navada-edge-sdk | SDK for Node.js apps |
| navada-edge-cli | npm i -g navada-edge-cli | AI agent terminal (45+ commands) |
| MCP Server | :8811/mcp | JSON-RPC tool server |
| Docker | docker pull | Containerised CLI |
License
MIT - Leslie Akpareva / NAVADA
