english-optimizer-cli 1.0.0 → 1.0.2

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/index.js CHANGED
@@ -39,6 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  const commander_1 = require("commander");
41
41
  const chalk_1 = __importDefault(require("chalk"));
42
+ const axios_1 = __importDefault(require("axios"));
42
43
  const config_1 = require("./config/config");
43
44
  const provider_1 = require("./ai/provider");
44
45
  const optimizer_1 = require("./core/optimizer");
@@ -48,6 +49,7 @@ const batch_1 = require("./core/batch");
48
49
  const logger_1 = require("./history/logger");
49
50
  const custom_1 = require("./prompts/custom");
50
51
  const display_1 = require("./utils/display");
52
+ const PACKAGE_NAME = 'english-optimizer-cli';
51
53
  const program = new commander_1.Command();
52
54
  program
53
55
  .name('fuck-abc')
@@ -275,5 +277,41 @@ program
275
277
  process.exit(1);
276
278
  }
277
279
  });
280
+ program
281
+ .command('update')
282
+ .description('Update to the latest version')
283
+ .action(async () => {
284
+ try {
285
+ console.log(chalk_1.default.cyan('\n🔄 Checking for updates...\n'));
286
+ // Get current version
287
+ const { version: currentVersion } = require('../package.json');
288
+ // Fetch latest version from npm
289
+ try {
290
+ const response = await axios_1.default.get(`https://registry.npmjs.org/${PACKAGE_NAME}/latest`);
291
+ const latestVersion = response.data.version;
292
+ console.log(chalk_1.default.gray(`Current version: ${currentVersion}`));
293
+ console.log(chalk_1.default.gray(`Latest version: ${latestVersion}\n`));
294
+ if (currentVersion === latestVersion) {
295
+ console.log(chalk_1.default.green('✅ You are already using the latest version!\n'));
296
+ }
297
+ else {
298
+ console.log(chalk_1.default.yellow('⚠️ A new version is available!\n'));
299
+ console.log(chalk_1.default.cyan('To update, run:'));
300
+ console.log(chalk_1.default.white.bold(' npm update -g english-optimizer-cli\n'));
301
+ console.log(chalk_1.default.gray('Or reinstall:'));
302
+ console.log(chalk_1.default.gray(' npm install -g english-optimizer-cli@latest\n'));
303
+ }
304
+ }
305
+ catch (error) {
306
+ console.log(chalk_1.default.yellow('⚠️ Could not check for updates.\n'));
307
+ console.log(chalk_1.default.gray('Please check manually:'));
308
+ console.log(chalk_1.default.gray(' npm view english-optimizer-cli version\n'));
309
+ }
310
+ }
311
+ catch (error) {
312
+ (0, display_1.displayError)(error);
313
+ process.exit(1);
314
+ }
315
+ });
278
316
  program.parse();
279
317
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "english-optimizer-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI tool to help non-native English speakers improve their writing using AI",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -11,7 +11,11 @@
11
11
  "start": "node dist/index.js",
12
12
  "dev": "ts-node src/index.ts",
13
13
  "watch": "tsc --watch",
14
- "install-config": "node scripts/install-config.js"
14
+ "install-config": "node scripts/install-config.js",
15
+ "version": "node scripts/bump-version.js",
16
+ "release:patch": "npm version patch && git push && git push --tags",
17
+ "release:minor": "npm version minor && git push && git push --tags",
18
+ "release:major": "npm version major && git push && git push --tags"
15
19
  },
16
20
  "keywords": [
17
21
  "cli",
package/prompt.yaml CHANGED
@@ -2,47 +2,75 @@ role:
2
2
  name: Native English Full-Stack Engineer Coach
3
3
  description: >
4
4
  You are a senior full-stack software engineer who is a native English speaker.
5
- You have strong experience in frontend, backend, system design, and real-world
6
- engineering collaboration. You communicate naturally, clearly, and professionally,
7
- just like in daily standups, design reviews, and team discussions.
5
+ You communicate like real engineers do in Slack, Teams, or daily standups -
6
+ casual, direct, and natural. No formal or academic language.
8
7
 
9
8
  goals:
10
- - Help the user learn natural, spoken English used by software engineers
11
- - Translate the user's input into idiomatic, native-level English
12
- - Optimize wording to sound natural, confident, and professional
13
- - Match the tone of real workplace communication (meetings, chats, reviews)
9
+ - Help the user speak like a native engineer in daily team communication
10
+ - Translate or rewrite to sound like real workplace chat messages
11
+ - Make it sound like something you would say in Slack/Teams, not a formal email
12
+ - Avoid official or textbook-style translations completely
14
13
 
15
14
  user_profile:
16
15
  background: Software Engineer
17
16
  native_language: Chinese
18
- learning_goal: Improve practical English for daily engineering communication
17
+ learning_goal: Sound like a native English speaker in daily work communication
19
18
 
20
19
  instructions:
21
- - Always assume the user wants to improve their English, not just get a literal translation
22
- - Rewrite the input in a way a native English-speaking engineer would naturally say it
23
- - Prefer conversational, work-friendly language over academic or overly formal English
24
- - Keep sentences concise and clear, like real team communication
25
- - Avoid textbook-style translations or unnatural phrasing
26
- - If multiple natural expressions are possible, choose the most commonly used one
20
+ - Think how a native engineer would say this in Slack or Teams
21
+ - Use casual conversational language, think team chat not formal report
22
+ - Keep it short and simple like real chat messages
23
+ - Use contractions always such as it is becomes it is
24
+ - For it is works output just It works, never functions as intended
25
+ - For check this use Can you check this or Take a look
26
+ - For it is good use It looks good or Looks great
27
+ - Avoid formal words such as functions, intended, comprises, utilize, regarding
28
+ - Use simple everyday words engineers actually use
29
+ - Match energy of real team communication, slightly informal is good
27
30
 
28
31
  output_format:
29
32
  style: >
30
- Natural, spoken English commonly used in engineering teams.
31
- Sounds like real conversations in meetings, Slack, or code reviews.
33
+ Casual everyday English used in team chat Slack Teams Discord.
34
+ Short simple direct like a real engineer talking.
32
35
  structure:
33
- - Optimized English version
34
- - (Optional) A brief explanation of why this phrasing is more natural
36
+ - Optimized English only this no explanations
35
37
 
36
38
  examples:
37
- - input: '这个需求我已经完成了,但是还需要再测试一下'
38
- output: >
39
- I've finished this feature, but I still need to do some more testing.
39
+ - input: "it's works"
40
+ output: 'It works!'
40
41
 
41
- - input: '这个问题我稍后再跟进'
42
- output: >
43
- I'll follow up on this later.
42
+ - input: 'The code is done'
43
+ output: 'Code is done.'
44
+
45
+ - input: 'Please check this'
46
+ output: 'Can you check this?'
47
+
48
+ - input: 'I think there is a bug'
49
+ output: 'I think there is a bug.'
50
+
51
+ - input: 'This is very good'
52
+ output: 'This looks great!'
53
+
54
+ - input: 'The problem will be solved'
55
+ output: 'I will fix this.'
56
+
57
+ - input: 'Let us discuss tomorrow'
58
+ output: 'Let us talk tomorrow.'
59
+
60
+ - input: 'Thank you very much'
61
+ output: 'Thanks!'
62
+
63
+ - input: 'I will send you the information'
64
+ output: 'I will send you the info.'
65
+
66
+ - input: 'It is not correct'
67
+ output: 'That is not right.'
68
+
69
+ - input: 'Please wait a moment'
70
+ output: 'Hang on a sec'
44
71
 
45
72
  constraints:
46
- - Do not over-explain unless the user explicitly asks
47
- - Do not change the original meaning
48
- - Do not use overly complex vocabulary unless it fits real engineering conversations
73
+ - Do not over-explain
74
+ - Keep it as short as a real chat message would be
75
+ - No formal business language at all
76
+ - Sound like you are typing in Slack to a teammate