ikie-cli 0.1.28 → 0.1.29

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 (2) hide show
  1. package/dist/onboarding.js +100 -95
  2. package/package.json +1 -1
@@ -1,18 +1,24 @@
1
+ import { createInterface } from 'node:readline';
1
2
  import { c, successLine, infoLine, errorLine } from './theme.js';
2
3
  import { login } from './auth.js';
3
4
  import { saveConfig, isLoggedIn } from './config.js';
4
- import { createInterface } from 'node:readline';
5
- function waitForEnter(message = 'Press Enter to continue...') {
5
+ function waitForEnter(message) {
6
+ const msg = message || 'Press Enter to continue...';
6
7
  return new Promise((resolve) => {
7
8
  const iface = createInterface({ input: process.stdin, output: process.stdout });
8
- iface.question(`\n ${c.muted('')} ${c.dim(message)} `, () => { iface.close(); resolve(); });
9
+ iface.question('\n ' + c.muted('\u25b8') + ' ' + c.dim(msg) + ' ', () => {
10
+ iface.close();
11
+ resolve();
12
+ });
9
13
  });
10
14
  }
11
15
  function askYesNo(question, defaultYes = true) {
12
16
  return new Promise((resolve) => {
13
17
  const iface = createInterface({ input: process.stdin, output: process.stdout });
14
- const hint = defaultYes ? `${c.success('Y')}/${c.dim('n')}` : `${c.dim('y')}/${c.error('N')}`;
15
- iface.question(`\n ${c.primary('?')} ${c.white(question)} ${hint} `, (answer) => {
18
+ const hint = defaultYes
19
+ ? c.success('Y') + '/' + c.dim('n')
20
+ : c.dim('y') + '/' + c.error('N');
21
+ iface.question('\n ' + c.primary('?') + ' ' + c.white(question) + ' ' + hint + ' ', (answer) => {
16
22
  iface.close();
17
23
  const a = answer.trim().toLowerCase();
18
24
  if (!a)
@@ -23,45 +29,47 @@ function askYesNo(question, defaultYes = true) {
23
29
  });
24
30
  }
25
31
  function displayWelcome() {
26
- console.log(`
27
- ${c.primary.bold('╔═══════════════════════════════════════════════════════════════╗')}
28
- ${c.primary.bold('')} ${c.primary.bold('')}
29
- ${c.primary.bold('║')} ${c.accent.bold('Welcome to')} ${c.primary.bold('ikie')} ${c.muted('— Your AI Pair Programmer')} ${c.primary.bold('')}
30
- ${c.primary.bold('')} ${c.muted('Agentic Coding in Your Terminal')} ${c.primary.bold('')}
31
- ${c.primary.bold('')} ${c.primary.bold('')}
32
- ${c.primary.bold('╚═══════════════════════════════════════════════════════════════╝')}
33
-
34
- ${c.white.bold("Hey there! 👋")}
35
-
36
- ${c.white("Let's get you set up in just a few steps.")}
37
- `);
32
+ const border = c.primary.bold('\u2550'.repeat(60));
33
+ console.log();
34
+ console.log(c.primary.bold('\u2554') + border + c.primary.bold('\u2557'));
35
+ console.log(c.primary.bold('\u2551') + ' ' + c.primary.bold('\u2551'));
36
+ console.log(c.primary.bold('\u2551') + ' ' + c.accent.bold('Welcome to') + ' ' + c.primary.bold('ikie') + ' ' + c.muted('\u2014 Your AI Pair Programmer') + ' ' + c.primary.bold('\u2551'));
37
+ console.log(c.primary.bold('\u2551') + ' ' + c.muted('Agentic Coding in Your Terminal') + ' ' + c.primary.bold('\u2551'));
38
+ console.log(c.primary.bold('\u2551') + ' ' + c.primary.bold('\u2551'));
39
+ console.log(c.primary.bold('\u255a') + border + c.primary.bold('\u255d'));
40
+ console.log();
41
+ console.log(c.white.bold('Hey there! \u{1F44B}'));
42
+ console.log();
43
+ console.log(c.white("Let's get you set up in just a few steps."));
44
+ console.log();
38
45
  }
39
46
  async function stepAuthentication(config) {
40
- console.log(`
41
-
42
- ${c.primary.bold('Step 1 of 3:')} ${c.white.bold('Sign In')}
43
- ${c.muted('\u2501'.repeat(60))}
44
-
45
- ${c.white('To use ikie, you need a free ikie account:')}
46
-
47
- ${c.success('')} Access to powerful AI models
48
- ${c.success('')} Web search capabilities
49
- ${c.success('')} Session sync across devices
50
- ${c.success('✓')} Weekly free credit limits
51
- `);
47
+ console.log();
48
+ console.log(c.primary.bold('Step 1 of 3:') + ' ' + c.white.bold('Sign In'));
49
+ console.log(c.muted('\u2501'.repeat(60)));
50
+ console.log();
51
+ console.log(c.white('To use ikie, you need a free ikie account:'));
52
+ console.log();
53
+ console.log(' ' + c.success('\u2713') + ' Access to powerful AI models');
54
+ console.log(' ' + c.success('\u2713') + ' Web search capabilities');
55
+ console.log(' ' + c.success('\u2713') + ' Session sync across devices');
56
+ console.log(' ' + c.success('\u2713') + ' Weekly free credit limits');
57
+ console.log();
52
58
  if (isLoggedIn(config)) {
53
59
  console.log(successLine('You are already signed in!'));
54
60
  return waitForEnter();
55
61
  }
56
62
  const shouldLogin = await askYesNo('Would you like to sign in now?', true);
57
63
  if (shouldLogin) {
58
- console.log(`\n${c.muted(' Opening login in your browser...')}\n`);
64
+ console.log();
65
+ console.log(c.muted(' Opening login in your browser...'));
66
+ console.log();
59
67
  try {
60
68
  await login();
61
69
  console.log(successLine('Successfully signed in!'));
62
70
  }
63
71
  catch (err) {
64
- console.log(errorLine(`Login failed: ${err instanceof Error ? err.message : String(err)}`));
72
+ console.log(errorLine('Login failed: ' + (err instanceof Error ? err.message : String(err))));
65
73
  console.log(infoLine('You can sign in later with: ikie login'));
66
74
  }
67
75
  }
@@ -71,75 +79,72 @@ ${c.white('To use ikie, you need a free ikie account:')}
71
79
  await waitForEnter();
72
80
  }
73
81
  async function stepFeatureTour() {
74
- console.log(`
75
-
76
- ${c.primary.bold('Step 2 of 3:')} ${c.white.bold('What Can ikie Do?')}
77
- ${c.muted('\u2501'.repeat(60))}
78
-
79
- ${c.secondary.bold('Tools')}
80
- ${c.muted('')} Read, write, and edit files
81
- ${c.muted('')} Run shell commands
82
- ${c.muted('')} Git operations (status, diff, commit, branch)
83
- ${c.muted('')} Search the web and fetch URLs
84
- ${c.muted('•')} Save persistent memory notes
85
-
86
- ${c.secondary.bold('Two Interaction Modes')}
87
- ${c.muted('')} ${c.success('Agent mode')} Full execution, makes changes
88
- ${c.muted('•')} ${c.warning('Plan mode')} — Read-only, proposes plans
89
-
90
- ${c.secondary.bold('Extensible')}
91
- ${c.muted('')} Skills system (reusable instructions)
92
- ${c.muted('')} MCP servers (Model Context Protocol)
93
- ${c.muted('•')} Spawn sub-agents for parallel work
94
- `);
82
+ console.log();
83
+ console.log(c.primary.bold('Step 2 of 3:') + ' ' + c.white.bold('What Can ikie Do?'));
84
+ console.log(c.muted('\u2501'.repeat(60)));
85
+ console.log();
86
+ console.log(c.secondary.bold('Tools'));
87
+ console.log(' ' + c.muted('\u2022') + ' Read, write, and edit files');
88
+ console.log(' ' + c.muted('\u2022') + ' Run shell commands');
89
+ console.log(' ' + c.muted('\u2022') + ' Git operations (status, diff, commit, branch)');
90
+ console.log(' ' + c.muted('\u2022') + ' Search the web and fetch URLs');
91
+ console.log(' ' + c.muted('\u2022') + ' Save persistent memory notes');
92
+ console.log();
93
+ console.log(c.secondary.bold('Two Interaction Modes'));
94
+ console.log(' ' + c.muted('\u2022') + ' ' + c.success('Agent mode') + ' \u2014 Full execution, makes changes');
95
+ console.log(' ' + c.muted('\u2022') + ' ' + c.warning('Plan mode') + ' \u2014 Read-only, proposes plans');
96
+ console.log();
97
+ console.log(c.secondary.bold('Extensible'));
98
+ console.log(' ' + c.muted('\u2022') + ' Skills system (reusable instructions)');
99
+ console.log(' ' + c.muted('\u2022') + ' MCP servers (Model Context Protocol)');
100
+ console.log(' ' + c.muted('\u2022') + ' Spawn sub-agents for parallel work');
101
+ console.log();
95
102
  await waitForEnter();
96
103
  }
97
104
  async function stepQuickStart() {
98
- console.log(`
99
-
100
- ${c.primary.bold('Step 3 of 3:')} ${c.white.bold('Getting Started')}
101
- ${c.muted('\u2501'.repeat(60))}
102
-
103
- ${c.accent('1.')} ${c.white('Ask a question')}
104
- ${c.dim('ikie "explain this codebase"')}
105
-
106
- ${c.accent('2.')} ${c.white('One-shot commands')}
107
- ${c.dim('ikie "add error handling to api.ts"')}
108
-
109
- ${c.accent('3.')} ${c.white('Interactive mode')}
110
- ${c.dim('ikie')}
111
- ${c.dim('Chat back and forth with the AI')}
112
-
113
- ${c.accent('4.')} ${c.white('Slash commands')}
114
- ${c.dim('/help')} — Show all commands
115
- ${c.dim('/memory save')} — Save persistent notes
116
- ${c.dim('/session load')} Resume previous conversation
117
- ${c.dim('/plan')} — Read-only planning mode
118
- ${c.dim('/theme')} — Change color theme
119
-
120
- ${c.white.bold('Pro Tips:')}
121
- ${c.success('')} Type ${c.white('!')} before a command to run shell directly: ${c.dim('!ls -la')}
122
- ${c.success('')} Press ${c.white('Shift+Tab')} to toggle agent/plan modes
123
- ${c.success('•')} Press ${c.white('Esc')} during execution to cancel
124
- `);
105
+ console.log();
106
+ console.log(c.primary.bold('Step 3 of 3:') + ' ' + c.white.bold('Getting Started'));
107
+ console.log(c.muted('\u2501'.repeat(60)));
108
+ console.log();
109
+ console.log(c.accent('1.') + ' ' + c.white('Ask a question'));
110
+ console.log(' ' + c.dim('ikie "explain this codebase"'));
111
+ console.log();
112
+ console.log(c.accent('2.') + ' ' + c.white('One-shot commands'));
113
+ console.log(' ' + c.dim('ikie "add error handling to api.ts"'));
114
+ console.log();
115
+ console.log(c.accent('3.') + ' ' + c.white('Interactive mode'));
116
+ console.log(' ' + c.dim('ikie'));
117
+ console.log(' ' + c.dim('Chat back and forth with the AI'));
118
+ console.log();
119
+ console.log(c.accent('4.') + ' ' + c.white('Slash commands'));
120
+ console.log(' ' + c.white('/help') + ' \u2014 Show all commands');
121
+ console.log(' ' + c.white('/memory save') + ' \u2014 Save persistent notes');
122
+ console.log(' ' + c.white('/session load') + ' \u2014 Resume previous conversation');
123
+ console.log(' ' + c.white('/plan') + ' \u2014 Read-only planning mode');
124
+ console.log(' ' + c.white('/theme') + ' \u2014 Change color theme');
125
+ console.log();
126
+ console.log(c.white.bold('Pro Tips:'));
127
+ console.log(' ' + c.success('\u2022') + ' Type ' + c.white('!') + ' before a command to run shell directly: ' + c.dim('!ls -la'));
128
+ console.log(' ' + c.success('\u2022') + ' Press ' + c.white('Shift+Tab') + ' to toggle agent/plan modes');
129
+ console.log(' ' + c.success('\u2022') + ' Press ' + c.white('Esc') + ' during execution to cancel');
130
+ console.log();
125
131
  await waitForEnter();
126
132
  }
127
133
  function displayCompletion() {
128
- console.log(`
129
-
130
- ${c.success.bold('All Set!')}
131
- ${c.muted('\u2501'.repeat(60))}
132
-
133
- ${c.white.bold("You're ready to start coding with ikie!")}
134
-
135
- ${c.primary('1.')} Type ${c.accent('ikie')} to start interactive mode
136
- ${c.primary('2.')} Type ${c.accent('/help')} to see all commands
137
- ${c.primary('3.')} Start building something amazing!
138
-
139
- ${c.muted('Dashboard:')} ${c.dim('http://140.245.26.210:3000/dashboard')}
140
-
141
- ${c.success.bold('Happy coding!')}
142
- `);
134
+ console.log();
135
+ console.log(c.success.bold('All Set!'));
136
+ console.log(c.muted('\u2501'.repeat(60)));
137
+ console.log();
138
+ console.log(c.white.bold("You're ready to start coding with ikie!"));
139
+ console.log();
140
+ console.log(c.primary('1.') + ' Type ' + c.accent('ikie') + ' to start interactive mode');
141
+ console.log(c.primary('2.') + ' Type ' + c.accent('/help') + ' to see all commands');
142
+ console.log(c.primary('3.') + ' Start building something amazing!');
143
+ console.log();
144
+ console.log(c.muted('Dashboard:') + ' ' + c.dim('http://140.245.26.210:3000/dashboard'));
145
+ console.log();
146
+ console.log(c.success.bold('Happy coding!'));
147
+ console.log();
143
148
  }
144
149
  export async function runOnboarding(config) {
145
150
  try {
@@ -153,7 +158,7 @@ export async function runOnboarding(config) {
153
158
  await waitForEnter('Press Enter to start ikie...');
154
159
  }
155
160
  catch (err) {
156
- console.log(errorLine(`Onboarding error: ${err instanceof Error ? err.message : String(err)}`));
161
+ console.log(errorLine('Onboarding error: ' + (err instanceof Error ? err.message : String(err))));
157
162
  saveConfig({ hasCompletedOnboarding: true });
158
163
  }
159
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ikie-cli",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "Agentic coding CLI — your terminal AI pair programmer",
5
5
  "type": "module",
6
6
  "bin": {