lnai 0.1.1 → 0.2.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/README.md +15 -2
  2. package/dist/index.js +38 -19
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -1,10 +1,19 @@
1
1
  <p align="center">
2
- <img alt="LNAI Logo" src="apps/docs/public/lnai_white_on_black.png" width="200">
2
+ <img alt="LNAI Logo" src="https://raw.githubusercontent.com/KrystianJonca/lnai/main/apps/docs/public/lnai_white_on_black.png" width="200">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/lnai">
7
+ <img alt="npm version" src="https://img.shields.io/npm/v/lnai">
8
+ </a>
9
+ <a href="https://github.com/KrystianJonca/lnai/stargazers">
10
+ <img alt="GitHub stars" src="https://img.shields.io/github/stars/KrystianJonca/lnai?style=social">
11
+ </a>
3
12
  </p>
4
13
 
5
14
  # LNAI
6
15
 
7
- Unified AI configuration management CLI. Define your AI tool configurations once in `.ai/` and sync them to native formats for Claude Code, Opencode, and more.
16
+ Unified AI configuration management CLI. Define your AI tool configurations once in `.ai/` and sync them to native formats for Claude Code, Cursor, OpenCode, and more.
8
17
 
9
18
  ## Documentation
10
19
 
@@ -49,3 +58,7 @@ lnai sync
49
58
  ## License
50
59
 
51
60
  MIT
61
+
62
+ ---
63
+
64
+ If you find LNAI helpful, please [star us on GitHub](https://github.com/KrystianJonca/lnai)!
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'module';
3
3
  import { Command } from 'commander';
4
4
  import { initUnifiedConfig, runSyncPipeline, parseUnifiedConfig, validateUnifiedState, pluginRegistry } from '@lnai/core';
5
- import chalk3 from 'chalk';
5
+ import chalk2 from 'chalk';
6
6
  import ora from 'ora';
7
7
 
8
8
  var initCommand = new Command("init").description("Initialize a new .ai/ configuration directory").option("--force", "Overwrite existing .ai/ directory").option("--minimal", "Create only config.json (no subdirectories)").option("-t, --tools <tools...>", "Enable only specific tools").action(async (options) => {
@@ -16,17 +16,21 @@ var initCommand = new Command("init").description("Initialize a new .ai/ configu
16
16
  force: options.force
17
17
  });
18
18
  spinner.succeed("Initialized .ai/ configuration");
19
- console.log(chalk3.gray("\nCreated:"));
19
+ console.log(chalk2.gray("\nCreated:"));
20
20
  for (const file of result.created) {
21
- console.log(chalk3.green(` + ${file}`));
21
+ console.log(chalk2.green(` + ${file}`));
22
22
  }
23
23
  console.log(
24
- chalk3.gray("\nRun ") + chalk3.cyan("lnai sync") + chalk3.gray(" to generate tool configs.")
24
+ chalk2.gray("\nRun ") + chalk2.cyan("lnai sync") + chalk2.gray(" to generate tool configs.")
25
25
  );
26
+ console.log(
27
+ chalk2.gray("\nIf you find LNAI helpful, please star us on GitHub:")
28
+ );
29
+ console.log(chalk2.blue("https://github.com/KrystianJonca/lnai"));
26
30
  } catch (error) {
27
31
  spinner.fail("Initialization failed");
28
32
  console.error(
29
- chalk3.red(error instanceof Error ? error.message : String(error))
33
+ chalk2.red(error instanceof Error ? error.message : String(error))
30
34
  );
31
35
  process.exit(1);
32
36
  }
@@ -42,24 +46,39 @@ var syncCommand = new Command("sync").description("Export .ai/ to native configs
42
46
  });
43
47
  spinner.succeed("Sync complete");
44
48
  if (results.length === 0) {
45
- console.log(chalk3.yellow("\nNo tools configured or enabled."));
49
+ console.log(chalk2.yellow("\nNo tools configured or enabled."));
46
50
  return;
47
51
  }
48
52
  for (const result of results) {
49
- console.log(chalk3.blue(`
53
+ console.log(chalk2.blue(`
50
54
  ${result.tool}:`));
51
55
  if (result.changes.length === 0) {
52
- console.log(chalk3.gray(" No changes"));
56
+ console.log(chalk2.gray(" No changes"));
53
57
  }
54
58
  for (const change of result.changes) {
55
- const icon = change.action === "create" ? chalk3.green("+") : change.action === "update" ? chalk3.yellow("~") : change.action === "delete" ? chalk3.red("-") : chalk3.gray("=");
59
+ const icon = change.action === "create" ? chalk2.green("+") : change.action === "update" ? chalk2.yellow("~") : change.action === "delete" ? chalk2.red("-") : chalk2.gray("=");
56
60
  console.log(` ${icon} ${change.path}`);
57
61
  }
58
62
  }
63
+ for (const result of results) {
64
+ if (result.validation.warnings.length > 0) {
65
+ console.log(chalk2.yellow(`
66
+ ${result.tool} warnings:`));
67
+ for (const warning of result.validation.warnings) {
68
+ console.log(
69
+ chalk2.yellow(` - ${warning.path.join(".")}: ${warning.message}`)
70
+ );
71
+ }
72
+ }
73
+ }
74
+ console.log(
75
+ chalk2.gray("\nIf you find LNAI helpful, please star us on GitHub:")
76
+ );
77
+ console.log(chalk2.blue("https://github.com/KrystianJonca/lnai"));
59
78
  } catch (error) {
60
79
  spinner.fail("Sync failed");
61
80
  console.error(
62
- chalk3.red(error instanceof Error ? error.message : String(error))
81
+ chalk2.red(error instanceof Error ? error.message : String(error))
63
82
  );
64
83
  process.exit(1);
65
84
  }
@@ -72,10 +91,10 @@ var validateCommand = new Command("validate").description("Validate .ai/ configu
72
91
  const unifiedResult = validateUnifiedState(state);
73
92
  if (!unifiedResult.valid) {
74
93
  spinner.fail("Validation failed");
75
- console.log(chalk3.red("\nUnified config errors:"));
94
+ console.log(chalk2.red("\nUnified config errors:"));
76
95
  for (const error of unifiedResult.errors) {
77
96
  console.log(
78
- chalk3.red(` - ${error.path.join(".")}: ${error.message}`)
97
+ chalk2.red(` - ${error.path.join(".")}: ${error.message}`)
79
98
  );
80
99
  }
81
100
  process.exit(1);
@@ -103,11 +122,11 @@ var validateCommand = new Command("validate").description("Validate .ai/ configu
103
122
  if (toolErrors.length > 0) {
104
123
  spinner.fail("Validation failed");
105
124
  for (const { plugin, errors } of toolErrors) {
106
- console.log(chalk3.red(`
125
+ console.log(chalk2.red(`
107
126
  ${plugin} errors:`));
108
127
  for (const error of errors) {
109
128
  console.log(
110
- chalk3.red(` - ${error.path.join(".")}: ${error.message}`)
129
+ chalk2.red(` - ${error.path.join(".")}: ${error.message}`)
111
130
  );
112
131
  }
113
132
  }
@@ -115,25 +134,25 @@ ${plugin} errors:`));
115
134
  }
116
135
  spinner.succeed("Validation passed");
117
136
  for (const { plugin, warnings } of toolWarnings) {
118
- console.log(chalk3.yellow(`
137
+ console.log(chalk2.yellow(`
119
138
  ${plugin} warnings:`));
120
139
  for (const warning of warnings) {
121
140
  console.log(
122
- chalk3.yellow(` - ${warning.path.join(".")}: ${warning.message}`)
141
+ chalk2.yellow(` - ${warning.path.join(".")}: ${warning.message}`)
123
142
  );
124
143
  }
125
144
  }
126
145
  for (const { plugin, skipped } of toolSkipped) {
127
- console.log(chalk3.gray(`
146
+ console.log(chalk2.gray(`
128
147
  ${plugin} skipped features:`));
129
148
  for (const item of skipped) {
130
- console.log(chalk3.gray(` - ${item.feature}: ${item.reason}`));
149
+ console.log(chalk2.gray(` - ${item.feature}: ${item.reason}`));
131
150
  }
132
151
  }
133
152
  } catch (error) {
134
153
  spinner.fail("Validation failed");
135
154
  console.error(
136
- chalk3.red(error instanceof Error ? error.message : String(error))
155
+ chalk2.red(error instanceof Error ? error.message : String(error))
137
156
  );
138
157
  process.exit(1);
139
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lnai",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "CLI tool that syncs a unified .ai/ config to native formats for AI coding tools",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,6 +19,7 @@
19
19
  "config",
20
20
  "configuration",
21
21
  "claude",
22
+ "cursor",
22
23
  "opencode",
23
24
  "cli",
24
25
  "ai-tools",
@@ -35,7 +36,7 @@
35
36
  "chalk": "^5.6.2",
36
37
  "commander": "^14.0.2",
37
38
  "ora": "^9.1.0",
38
- "@lnai/core": "0.1.1"
39
+ "@lnai/core": "0.2.0"
39
40
  },
40
41
  "devDependencies": {
41
42
  "@types/node": "^25.0.10",