pokt-cli 1.0.0 → 1.0.1

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.
package/dist/bin/pokt.js CHANGED
@@ -6,6 +6,8 @@ import { modelsCommand } from '../commands/models.js';
6
6
  import { chatCommand } from '../commands/chat.js';
7
7
  import { providerCommand } from '../commands/provider.js';
8
8
  import { mcpCommand } from '../commands/mcp.js';
9
+ import { updateCommand } from '../commands/update.js';
10
+ import { uninstallCommand } from '../commands/uninstall.js';
9
11
  import prompts from 'prompts';
10
12
  import chalk from 'chalk';
11
13
  import { ui } from '../ui.js';
@@ -22,6 +24,8 @@ else {
22
24
  .command(chatCommand)
23
25
  .command(providerCommand)
24
26
  .command(mcpCommand)
27
+ .command(updateCommand)
28
+ .command(uninstallCommand)
25
29
  .demandCommand(1, 'You need at least one command before moving on')
26
30
  .help()
27
31
  .parse();
@@ -47,6 +51,8 @@ async function showMenu() {
47
51
  { title: '🏠 Switch API Provider (casa de API)', value: 'provider' },
48
52
  { title: '🔌 MCP Servers (tools externos)', value: 'mcp' },
49
53
  { title: '⚙️ Configure API Keys / Tokens', value: 'config' },
54
+ { title: '🔄 Atualizar Pokt CLI', value: 'update' },
55
+ { title: '🗑️ Remover Pokt CLI', value: 'uninstall' },
50
56
  { title: '❌ Exit', value: 'exit' }
51
57
  ]
52
58
  });
@@ -69,6 +75,14 @@ async function showMenu() {
69
75
  else if (response.action === 'config') {
70
76
  await handleConfigMenu();
71
77
  }
78
+ else if (response.action === 'update') {
79
+ const { updateCommand } = await import('../commands/update.js');
80
+ await updateCommand.handler({});
81
+ }
82
+ else if (response.action === 'uninstall') {
83
+ const { uninstallCommand } = await import('../commands/uninstall.js');
84
+ await uninstallCommand.handler({});
85
+ }
72
86
  else if (response.action === 'mcp') {
73
87
  const { mcpCommand } = await import('../commands/mcp.js');
74
88
  await mcpCommand.handler({ action: 'list' });
@@ -0,0 +1,2 @@
1
+ import type * as Yargs from 'yargs';
2
+ export declare const uninstallCommand: Yargs.CommandModule<{}, {}>;
@@ -0,0 +1,18 @@
1
+ import { execSync } from 'child_process';
2
+ import { ui } from '../ui.js';
3
+ export const uninstallCommand = {
4
+ command: 'uninstall',
5
+ describe: 'Remove o Pokt CLI da instalação global (npm uninstall -g pokt-cli)',
6
+ builder: (yargs) => yargs,
7
+ handler: () => {
8
+ console.log(ui.dim('Removendo pokt-cli...\n'));
9
+ try {
10
+ execSync('npm uninstall -g pokt-cli', { stdio: 'inherit' });
11
+ console.log(ui.success('Pokt CLI removido. O comando "pokt" não estará mais disponível.'));
12
+ }
13
+ catch (err) {
14
+ console.log(ui.warn('Para remover manualmente execute: npm uninstall -g pokt-cli'));
15
+ process.exitCode = 1;
16
+ }
17
+ }
18
+ };
@@ -0,0 +1,2 @@
1
+ import type * as Yargs from 'yargs';
2
+ export declare const updateCommand: Yargs.CommandModule<{}, {}>;
@@ -0,0 +1,18 @@
1
+ import { execSync } from 'child_process';
2
+ import { ui } from '../ui.js';
3
+ export const updateCommand = {
4
+ command: 'update',
5
+ describe: 'Atualiza o Pokt CLI para a última versão (npm install -g pokt-cli@latest)',
6
+ builder: (yargs) => yargs,
7
+ handler: () => {
8
+ console.log(ui.dim('Atualizando pokt-cli...\n'));
9
+ try {
10
+ execSync('npm install -g pokt-cli@latest', { stdio: 'inherit' });
11
+ console.log(ui.success('Pokt CLI atualizado. Rode "pokt" para usar a nova versão.'));
12
+ }
13
+ catch (err) {
14
+ console.log(ui.error('Falha ao atualizar. Tente manualmente: npm install -g pokt-cli@latest'));
15
+ process.exitCode = 1;
16
+ }
17
+ }
18
+ };
@@ -39,7 +39,7 @@ export async function connectMcpServer(serverConfig) {
39
39
  args: serverConfig.args ?? [],
40
40
  env: process.env,
41
41
  });
42
- const client = new Client({ name: 'pokt-cli', version: '1.0.0' });
42
+ const client = new Client({ name: 'pokt-cli', version: '1.0.1' });
43
43
  await client.connect(transport);
44
44
  const list = await client.listTools();
45
45
  const tools = (list.tools ?? []).map((t) => ({
package/dist/ui.js CHANGED
@@ -2,7 +2,7 @@ import chalk from 'chalk';
2
2
  import fs from 'fs';
3
3
  import path from 'path';
4
4
  import { execSync } from 'child_process';
5
- const VERSION = '1.0.0';
5
+ const VERSION = '1.0.1';
6
6
  /** Logo em estilo chevron com gradiente (azul → rosa → roxo) */
7
7
  function logo() {
8
8
  const c = (s, color) => color(s);
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "pokt-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Vibe Coding AI CLI for OpenRouter and Ollama",
5
5
  "main": "./dist/bin/pokt.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "pokt": "./dist/bin/pokt.js"
8
+ "pokt": "dist/bin/pokt.js"
9
9
  },
10
10
  "scripts": {
11
11
  "build": "tsc",