navada-edge-cli 3.5.8 → 3.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100,10 +100,10 @@ module.exports = function(reg) {
100
100
  console.log(ui.label('User', r.data.name || r.data.userId || 'connected'));
101
101
  console.log('');
102
102
  console.log(ui.dim('You now have access to:'));
103
- console.log(ui.dim(' /status network health'));
104
- console.log(ui.dim(' /doctor test connections'));
105
- console.log(ui.dim(' /offload run tasks 24/7 (coming soon)'));
106
- console.log(ui.dim(' /sessions view running tasks (coming soon)'));
103
+ console.log(ui.dim(' /offload run tasks 24/7 on cloud'));
104
+ console.log(ui.dim(' /sessions view running tasks'));
105
+ console.log(ui.dim(' /attach stream task output'));
106
+ console.log(ui.dim(' /kill stop a task'));
107
107
  validated = true;
108
108
  break;
109
109
  } else if (r.status === 401) {
@@ -4,13 +4,14 @@ const readline = require('readline');
4
4
  const navada = require('navada-edge-sdk');
5
5
  const ui = require('../ui');
6
6
  const config = require('../config');
7
+ const fs = require('fs');
8
+ const path = require('path');
7
9
 
8
10
  function ask(rl, question) {
9
11
  return new Promise(resolve => rl.question(question, resolve));
10
12
  }
11
13
 
12
14
  async function runSetup(fromRepl = false) {
13
- // Create a fresh readline — don't conflict with the REPL
14
15
  const rl = readline.createInterface({
15
16
  input: process.stdin,
16
17
  output: process.stdout,
@@ -18,80 +19,87 @@ async function runSetup(fromRepl = false) {
18
19
  });
19
20
 
20
21
  console.log('');
21
- console.log(ui.box('SETUP', ' Configure your NAVADA Edge CLI.'));
22
+ console.log(ui.box('NAVADA EDGE SETUP', ' Let\'s configure your CLI in under a minute.'));
22
23
  console.log('');
23
24
 
24
- // 1. API Key — the only required thing
25
- console.log(ui.dim(' Your API key powers the AI agent. Accepts:'));
26
- console.log(ui.dim(' - Anthropic key (sk-ant-...)'));
27
- console.log(ui.dim(' - NAVADA Edge API key (nv_edge_...)'));
28
- console.log(ui.dim(' - OpenAI key (sk-...)'));
29
- console.log(ui.dim(' - Or press Enter to skip (limited mode)'));
25
+ // 1. API Key
26
+ console.log(ui.dim(' Add an AI API key for full agent capabilities.'));
27
+ console.log(ui.dim(' Supported: OpenAI (sk-...), Anthropic (sk-ant-...), Gemini (AIza...)'));
28
+ console.log(ui.dim(' Or press Enter to use the free tier (Grok, limited).'));
30
29
  console.log('');
31
30
 
32
31
  const apiKey = await ask(rl, ' API key: ');
33
32
  if (apiKey.trim()) {
34
33
  const key = apiKey.trim();
35
- config.setApiKey(key);
36
- // Auto-detect key type and save to right field
37
34
  if (key.startsWith('sk-ant')) {
38
35
  config.set('anthropicKey', key);
39
- console.log(ui.success('Anthropic key saved — full agent mode enabled'));
40
- } else if (key.startsWith('nv_edge')) {
41
- console.log(ui.success('NAVADA Edge key saved — MCP access enabled'));
36
+ config.setApiKey(key);
37
+ console.log(ui.success('Anthropic key saved. Full agent mode with tool use enabled.'));
38
+ } else if (key.startsWith('AIza')) {
39
+ config.set('geminiKey', key);
40
+ console.log(ui.success('Gemini key saved. Free unlimited access.'));
42
41
  } else if (key.startsWith('sk-')) {
43
42
  config.set('openaiKey', key);
44
- navada.init({ openaiKey: key });
45
- console.log(ui.success('OpenAI key saved'));
43
+ config.setApiKey(key);
44
+ console.log(ui.success('OpenAI key saved. GPT-4o with tool use enabled.'));
45
+ } else if (key.startsWith('nvapi-')) {
46
+ config.set('nvidiaKey', key);
47
+ console.log(ui.success('NVIDIA key saved. Llama, Mistral, DeepSeek enabled.'));
48
+ } else if (key.startsWith('hf_')) {
49
+ config.set('hfToken', key);
50
+ console.log(ui.success('HuggingFace key saved. Qwen Coder enabled.'));
46
51
  } else {
47
- console.log(ui.success('Key saved'));
52
+ config.setApiKey(key);
53
+ console.log(ui.success('Key saved.'));
48
54
  }
49
55
  } else {
50
- console.log(ui.dim('Skipped you can set this later with /login <key>'));
56
+ console.log(ui.dim(' Skipped. Free tier active. Add a key anytime with /login <key>'));
51
57
  }
52
58
  console.log('');
53
59
 
54
- // 2. Node IPs — optional
55
- const configureNodes = await ask(rl, ' Configure network nodes? (y/N): ');
56
- if (configureNodes.trim().toLowerCase() === 'y') {
57
- console.log('');
58
- console.log(ui.dim(' Enter Tailscale IPs for your NAVADA Edge nodes.'));
59
- console.log(ui.dim(' Press Enter to skip any node.'));
60
- console.log('');
61
-
62
- const asusIp = await ask(rl, ' ASUS IP (Production Engine): ');
63
- if (asusIp.trim()) {
64
- config.set('asus', asusIp.trim());
65
- config.set('mcp', `http://${asusIp.trim()}:8811`);
66
- config.set('dashboard', `http://${asusIp.trim()}:7900`);
67
- config.set('registry', `http://${asusIp.trim()}:5000`);
68
- navada.init({
69
- asus: asusIp.trim(),
70
- mcp: `http://${asusIp.trim()}:8811`,
71
- dashboard: `http://${asusIp.trim()}:7900`,
72
- registry: `http://${asusIp.trim()}:5000`,
73
- });
74
- }
75
- const hpIp = await ask(rl, ' HP IP (Database): ');
76
- if (hpIp.trim()) config.set('hp', hpIp.trim());
77
- const ec2Ip = await ask(rl, ' EC2 IP (Monitoring): ');
78
- if (ec2Ip.trim()) {
79
- config.set('ec2', ec2Ip.trim());
80
- config.set('lucas', `http://${ec2Ip.trim()}:8820`);
60
+ // 2. Theme
61
+ const theme = await ask(rl, ' Theme (dark/crow/matrix/light) [dark]: ');
62
+ config.setTheme(theme.trim() || 'dark');
63
+ console.log('');
64
+
65
+ // 3. Create agent.md
66
+ const agentMd = path.join(config.CONFIG_DIR, 'agent.md');
67
+ if (!fs.existsSync(agentMd)) {
68
+ const createAgent = await ask(rl, ' Create agent.md for custom AI personality? (Y/n): ');
69
+ if (createAgent.trim().toLowerCase() !== 'n') {
70
+ if (!fs.existsSync(config.CONFIG_DIR)) fs.mkdirSync(config.CONFIG_DIR, { recursive: true });
71
+ fs.writeFileSync(agentMd, `# My NAVADA Agent
72
+
73
+ ## About Me
74
+ <!-- Tell the agent who you are and what you work on -->
75
+ I am a developer working on...
76
+
77
+ ## Preferences
78
+ <!-- How should the agent behave? -->
79
+ - Be concise and technical
80
+ - Always explain before making changes
81
+ - Prefer TypeScript for new code
82
+
83
+ ## My Stack
84
+ <!-- What tools and tech do you use? -->
85
+ - ...
86
+ `);
87
+ console.log(ui.success('Created ~/.navada/agent.md'));
88
+ console.log(ui.dim(' Edit this file to personalise your agent.'));
81
89
  }
82
- const oracleIp = await ask(rl, ' Oracle IP (Infrastructure): ');
83
- if (oracleIp.trim()) config.set('oracle', oracleIp.trim());
84
- console.log(ui.success('Nodes configured'));
90
+ } else {
91
+ console.log(ui.dim(' agent.md already exists.'));
85
92
  }
86
93
  console.log('');
87
94
 
88
- // 3. Theme
89
- const theme = await ask(rl, ' Theme (dark/crow/matrix/light) [dark]: ');
90
- config.setTheme(theme.trim() || 'dark');
95
+ // 4. Cloud compute (optional)
96
+ console.log(ui.dim(' Want 24/7 cloud compute? Sign up at portal.navada-edge-server.uk'));
97
+ console.log(ui.dim(' Generate an API key, then run: /edge login nv_edge_your_key'));
91
98
  console.log('');
92
99
 
93
- // 4. Done
94
- console.log(ui.box('READY', ` Config saved: ${config.CONFIG_FILE}\n Type naturally to chat, or /help for commands.`));
100
+ // Done
101
+ const pkg = require('../../package.json');
102
+ console.log(ui.box('READY', ` NAVADA Edge CLI v${pkg.version}\n Config: ${config.CONFIG_FILE}\n\n Type naturally to chat, or /help for commands.`));
95
103
  console.log('');
96
104
 
97
105
  rl.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "navada-edge-cli",
3
- "version": "3.5.8",
3
+ "version": "3.5.9",
4
4
  "description": "Interactive CLI for the NAVADA Edge Network — explore nodes, agents, Cloudflare, AI, Docker, and MCP from your terminal",
5
5
  "main": "lib/cli.js",
6
6
  "bin": {