icoa-cli 1.5.1 → 1.6.0

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.
Files changed (3) hide show
  1. package/dist/index.js +23 -26
  2. package/dist/repl.js +26 -16
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14,33 +14,31 @@ import { registerSetupCommand } from './commands/setup.js';
14
14
  import { registerEnvCommand } from './commands/env.js';
15
15
  import { getConfig, saveConfig } from './lib/config.js';
16
16
  import { startRepl } from './repl.js';
17
- import { checkTerminal } from './lib/terminal.js';
18
17
  import { setTerminalTheme } from './lib/theme.js';
19
- // Banner: each line between ║ ║ = exactly 58 visible chars
20
- const B = chalk.cyan('║');
18
+ const LINE = chalk.cyan(' ─────────────────────────────────────────────────────');
21
19
  const BANNER = `
22
- ${chalk.cyan('╔══════════════════════════════════════════════════════════╗')}
23
- ${B} ${B}
24
- ${B} ${chalk.bold.white('██╗ ██████╗ ██████╗ █████╗')} ${B}
25
- ${B} ${chalk.bold.white('██║██╔════╝██╔═══██╗██╔══██╗')} ${B}
26
- ${B} ${chalk.bold.white('██║██║ ██║ ██║███████║')} ${B}
27
- ${B} ${chalk.bold.white('██║██║ ██║ ██║██╔══██║')} ${B}
28
- ${B} ${chalk.bold.white('██║╚██████╗╚██████╔╝██║ ██║')} ${B}
29
- ${B} ${chalk.bold.white('╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝')} ${B}
30
- ${B} ${B}
31
- ${B} ${chalk.yellow('International Cyber Olympiad in AI 2026')} ${B}
32
- ${B} ${chalk.bold.magenta("The World's First AI Security Olympiad")} ${B}
33
- ${B} ${B}
34
- ${B} ${chalk.green.bold('AI4CTF')} ${chalk.gray('AI as your teammate')} ${B}
35
- ${B} ${chalk.red.bold('CTF4AI')} ${chalk.gray('Hack & evaluate AI systems')} ${B}
36
- ${B} ${chalk.bold.white('AI is your ally. AI is your target.')} ${B}
37
- ${B} ${B}
38
- ${B} ${chalk.white('Sydney, Australia')} ${chalk.gray('Jun 27 - Jul 2, 2026')} ${B}
39
- ${B} ${chalk.cyan.underline('https://icoa2026.au')} ${B}
40
- ${B} ${B}
41
- ${B} ${chalk.gray('CLI-Native Competition Terminal v1.5.1')} ${B}
42
- ${B} ${B}
43
- ${chalk.cyan('╚══════════════════════════════════════════════════════════╝')}
20
+ ${LINE}
21
+
22
+ ${chalk.bold.white('██╗ ██████╗ ██████╗ █████╗')}
23
+ ${chalk.bold.white('██║██╔════╝██╔═══██╗██╔══██╗')}
24
+ ${chalk.bold.white('██║██║ ██║ ██║███████║')}
25
+ ${chalk.bold.white('██║██║ ██║ ██║██╔══██║')}
26
+ ${chalk.bold.white('██║╚██████╗╚██████╔╝██║ ██║')}
27
+ ${chalk.bold.white('╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝')}
28
+
29
+ ${chalk.yellow('International Cyber Olympiad in AI 2026')}
30
+ ${chalk.bold.magenta("The World's First AI Security Olympiad")}
31
+
32
+ ${chalk.green.bold('AI4CTF')}${chalk.gray('[Day 1]')} ${chalk.white('AI as your teammate')}
33
+ ${chalk.red.bold('CTF4AI')}${chalk.gray('[Day 2]')} ${chalk.white('Hack & evaluate AI systems')}
34
+ ${chalk.bold.yellow('AI is your ally. AI is your target.')}
35
+
36
+ ${chalk.white('Sydney, Australia')} ${chalk.gray('Jun 27 - Jul 2, 2026')}
37
+ ${chalk.cyan.underline('https://icoa2026.au')}
38
+
39
+ ${chalk.gray('CLI-Native Competition Terminal v1.6.0')}
40
+
41
+ ${LINE}
44
42
  `;
45
43
  // Global error handlers
46
44
  process.on('uncaughtException', (err) => {
@@ -66,7 +64,6 @@ program
66
64
  // Force hacker theme: black background + green text
67
65
  setTerminalTheme();
68
66
  console.log(BANNER);
69
- checkTerminal();
70
67
  // If running interactively (no extra args or --resume), start REPL
71
68
  if (process.argv.length <= 2 || opts.resume) {
72
69
  startRepl(program, !!opts.resume);
package/dist/repl.js CHANGED
@@ -17,34 +17,44 @@ export function startRepl(program, resumeMode) {
17
17
  if (info) {
18
18
  const mins = Math.floor(info.awaySeconds / 60);
19
19
  const secs = info.awaySeconds % 60;
20
- console.log(chalk.yellow(` Session resumed. Away: ${mins}m ${secs}s | Total exits: ${info.exitCount}`));
21
- }
22
- else {
23
- console.log(chalk.gray(' No previous session to resume.'));
20
+ console.log(chalk.yellow(` Session resumed. Away: ${mins}m ${secs}s | Total exits: ${info.exitCount}`));
21
+ console.log();
24
22
  }
25
- console.log();
26
23
  }
27
24
  // Device mismatch check
28
25
  if (activated && !isDeviceMatch()) {
29
- console.log(chalk.red(' Token was activated on a different device. Access denied.'));
30
- console.log(chalk.gray(' Contact organizer for assistance.'));
26
+ console.log(chalk.red(' Token was activated on a different device.'));
27
+ console.log(chalk.gray(' Contact organizer for assistance.'));
31
28
  console.log();
32
- // Fall through to restricted mode
33
29
  }
34
30
  else if (connected) {
35
- console.log(chalk.gray(' Connected to: ') + chalk.white(config.ctfdUrl));
36
- console.log(chalk.gray(' User: ') + chalk.white(config.userName));
31
+ console.log(chalk.green(` Welcome back, ${config.userName}!`));
32
+ console.log(chalk.gray(` Connected to ${config.ctfdUrl}`));
33
+ console.log();
37
34
  }
38
35
  else if (activated) {
39
- console.log(chalk.green(' Access granted. ') + chalk.gray('Type: ') + chalk.white('join <url>') + chalk.gray(' to connect.'));
36
+ console.log(chalk.green(' Welcome, competitor! Ready to hack.'));
37
+ console.log();
38
+ console.log(chalk.gray(' Quick Start'));
39
+ console.log(chalk.gray(' ─────────────'));
40
+ console.log(chalk.white(' join <url> ') + chalk.gray('Connect to competition'));
41
+ console.log(chalk.white(' challenges ') + chalk.gray('View challenges'));
42
+ console.log(chalk.white(' hint <question> ') + chalk.gray('Ask AI for help'));
43
+ console.log(chalk.white(' env ') + chalk.gray('Check your tools'));
44
+ console.log(chalk.white(' help ') + chalk.gray('All commands'));
45
+ console.log();
40
46
  }
41
47
  else {
42
- console.log(chalk.yellow(' Restricted mode. ') + chalk.gray('Type: ') + chalk.white('activate <token>') + chalk.gray(' to unlock.'));
43
- console.log(chalk.gray(' Available: ') + chalk.white('ref [topic]') + chalk.gray(', ') + chalk.white('help') + chalk.gray(', ') + chalk.white('exit'));
48
+ console.log(chalk.white(' Welcome to ICOA CLI!'));
49
+ console.log();
50
+ console.log(chalk.gray(' Quick Start'));
51
+ console.log(chalk.gray(' ─────────────'));
52
+ console.log(chalk.white(' activate <token> ') + chalk.gray('Unlock with your access token'));
53
+ console.log(chalk.white(' ref <topic> ') + chalk.gray('Browse tool references'));
54
+ console.log(chalk.white(' env ') + chalk.gray('Check your tools'));
55
+ console.log(chalk.white(' help ') + chalk.gray('All commands'));
56
+ console.log();
44
57
  }
45
- console.log();
46
- console.log(chalk.gray(' Type ') + chalk.white('help') + chalk.gray(' for commands, ') + chalk.white('exit') + chalk.gray(' to quit.'));
47
- console.log();
48
58
  program.exitOverride();
49
59
  program.configureOutput({
50
60
  writeErr: () => { },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {