a16n 0.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/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # a16n
2
+
3
+ Agent customization portability for AI coding tools.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ # Use directly with npx (no install needed)
9
+ npx a16n convert --from cursor --to claude .
10
+
11
+ # Or install globally
12
+ npm install -g a16n
13
+ ```
14
+
15
+ ## Commands
16
+
17
+ ### convert
18
+
19
+ Convert agent customization between tools.
20
+
21
+ ```bash
22
+ a16n convert --from cursor --to claude ./my-project
23
+ a16n convert --from claude --to cursor ./my-project
24
+
25
+ # Dry run (show what would happen)
26
+ a16n convert --from cursor --to claude --dry-run .
27
+
28
+ # JSON output (for scripting)
29
+ a16n convert --from cursor --to claude --json .
30
+ ```
31
+
32
+ Options:
33
+ - `-f, --from <agent>` - Source agent (required)
34
+ - `-t, --to <agent>` - Target agent (required)
35
+ - `--dry-run` - Show what would happen without writing
36
+ - `--json` - Output as JSON
37
+ - `-q, --quiet` - Suppress non-error output
38
+
39
+ ### discover
40
+
41
+ List agent customization without converting.
42
+
43
+ ```bash
44
+ a16n discover --from cursor .
45
+ a16n discover --from claude . --json
46
+ ```
47
+
48
+ Options:
49
+ - `-f, --from <agent>` - Agent to discover (required)
50
+ - `--json` - Output as JSON
51
+
52
+ ### plugins
53
+
54
+ Show available plugins.
55
+
56
+ ```bash
57
+ a16n plugins
58
+ ```
59
+
60
+ ## Supported Agents
61
+
62
+ | Agent | Plugin | Status |
63
+ |-------|--------|--------|
64
+ | Cursor | @a16njs/plugin-cursor | ✅ Bundled |
65
+ | Claude Code | @a16njs/plugin-claude | ✅ Bundled |
66
+
67
+ ## Examples
68
+
69
+ ```bash
70
+ # Convert Cursor rules to Claude
71
+ a16n convert --from cursor --to claude .
72
+
73
+ # Convert Claude config to Cursor
74
+ a16n convert --from claude --to cursor .
75
+
76
+ # Preview conversion
77
+ a16n convert --from cursor --to claude --dry-run .
78
+
79
+ # List what's in a project
80
+ a16n discover --from cursor .
81
+ ```
82
+
83
+ ## License
84
+
85
+ MIT
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,151 @@
1
+ #!/usr/bin/env node
2
+ import * as fs from 'fs/promises';
3
+ import * as path from 'path';
4
+ import { Command } from 'commander';
5
+ import { A16nEngine } from '@a16njs/engine';
6
+ import cursorPlugin from '@a16njs/plugin-cursor';
7
+ import claudePlugin from '@a16njs/plugin-claude';
8
+ import { formatWarning, formatError, formatSummary } from './output.js';
9
+ const program = new Command();
10
+ // Create engine with bundled plugins
11
+ const engine = new A16nEngine([cursorPlugin, claudePlugin]);
12
+ program
13
+ .name('a16n')
14
+ .description('Agent customization portability for AI coding tools')
15
+ .version('0.0.1');
16
+ program
17
+ .command('convert')
18
+ .description('Convert agent customization between tools')
19
+ .requiredOption('-f, --from <agent>', 'Source agent')
20
+ .requiredOption('-t, --to <agent>', 'Target agent')
21
+ .option('--dry-run', 'Show what would happen without writing')
22
+ .option('--json', 'Output as JSON')
23
+ .option('-q, --quiet', 'Suppress non-error output')
24
+ .option('-v, --verbose', 'Show detailed output')
25
+ .argument('[path]', 'Project path', '.')
26
+ .action(async (projectPath, options) => {
27
+ try {
28
+ const verbose = (msg) => {
29
+ if (options.verbose)
30
+ console.error(`[verbose] ${msg}`);
31
+ };
32
+ // Validate directory exists and is a directory
33
+ const resolvedPath = path.resolve(projectPath);
34
+ try {
35
+ const stat = await fs.stat(resolvedPath);
36
+ if (!stat.isDirectory()) {
37
+ throw new Error('not-a-directory');
38
+ }
39
+ }
40
+ catch {
41
+ console.error(formatError(`Directory '${projectPath}' does not exist`, 'Make sure the path is correct and the directory exists.'));
42
+ process.exitCode = 1;
43
+ return;
44
+ }
45
+ verbose(`Discovering from ${options.from}...`);
46
+ verbose(`Root: ${resolvedPath}`);
47
+ const result = await engine.convert({
48
+ source: options.from,
49
+ target: options.to,
50
+ root: projectPath,
51
+ dryRun: options.dryRun,
52
+ });
53
+ verbose(`Discovered ${result.discovered.length} items:`);
54
+ if (options.verbose) {
55
+ for (const item of result.discovered) {
56
+ verbose(` - ${item.type}: ${item.sourcePath}`);
57
+ }
58
+ }
59
+ verbose(`Writing ${result.written.length} files...`);
60
+ if (options.json) {
61
+ console.log(JSON.stringify(result, null, 2));
62
+ }
63
+ else if (!options.quiet) {
64
+ // Print summary (suppressed with --quiet)
65
+ console.log(`Discovered: ${result.discovered.length} items`);
66
+ if (result.written.length > 0) {
67
+ for (const file of result.written) {
68
+ console.log(`Wrote: ${file.path}`);
69
+ }
70
+ }
71
+ if (result.warnings.length > 0) {
72
+ for (const warning of result.warnings) {
73
+ console.log(formatWarning(warning));
74
+ }
75
+ }
76
+ if (result.unsupported.length > 0) {
77
+ console.log(`Unsupported: ${result.unsupported.length} items`);
78
+ }
79
+ // Print summary
80
+ console.log(formatSummary(result.discovered.length, result.written.length, result.warnings.length));
81
+ }
82
+ }
83
+ catch (error) {
84
+ console.error(formatError(error.message));
85
+ process.exitCode = 1;
86
+ }
87
+ });
88
+ program
89
+ .command('discover')
90
+ .description('List agent customization without converting')
91
+ .requiredOption('-f, --from <agent>', 'Agent to discover')
92
+ .option('--json', 'Output as JSON')
93
+ .option('-v, --verbose', 'Show detailed output')
94
+ .argument('[path]', 'Project path', '.')
95
+ .action(async (projectPath, options) => {
96
+ try {
97
+ const verbose = (msg) => {
98
+ if (options.verbose)
99
+ console.error(`[verbose] ${msg}`);
100
+ };
101
+ // Validate directory exists and is a directory
102
+ const resolvedPath = path.resolve(projectPath);
103
+ try {
104
+ const stat = await fs.stat(resolvedPath);
105
+ if (!stat.isDirectory()) {
106
+ throw new Error('not-a-directory');
107
+ }
108
+ }
109
+ catch {
110
+ console.error(formatError(`Directory '${projectPath}' does not exist`, 'Make sure the path is correct and the directory exists.'));
111
+ process.exitCode = 1;
112
+ return;
113
+ }
114
+ verbose(`Discovering from ${options.from}...`);
115
+ verbose(`Root: ${resolvedPath}`);
116
+ const result = await engine.discover(options.from, projectPath);
117
+ verbose(`Found ${result.items.length} items`);
118
+ if (options.json) {
119
+ console.log(JSON.stringify(result, null, 2));
120
+ }
121
+ else {
122
+ console.log(`Found ${result.items.length} items`);
123
+ for (const item of result.items) {
124
+ console.log(` - ${item.type}: ${item.sourcePath}`);
125
+ }
126
+ if (result.warnings.length > 0) {
127
+ for (const warning of result.warnings) {
128
+ console.log(formatWarning(warning));
129
+ }
130
+ }
131
+ }
132
+ }
133
+ catch (error) {
134
+ console.error(formatError(error.message));
135
+ process.exitCode = 1;
136
+ }
137
+ });
138
+ program
139
+ .command('plugins')
140
+ .description('Show available plugins')
141
+ .action(() => {
142
+ const plugins = engine.listPlugins();
143
+ console.log('Available plugins:\n');
144
+ for (const plugin of plugins) {
145
+ console.log(` ${plugin.id}`);
146
+ console.log(` Name: ${plugin.name}`);
147
+ console.log(` Supports: ${plugin.supports.join(', ')}\n`);
148
+ }
149
+ });
150
+ program.parse();
151
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAExE,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;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AO,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;YACtD,CAAC;YAED,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC/B,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;oBACtC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;gBACtC,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,WAAW,CAAE,KAAe,CAAC,OAAO,CAAC,CAAC,CAAC;QACrD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,GAAG,EAAE;IACX,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IAErC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACpC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,aAAa,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,iBAAiB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Warning } from '@a16njs/models';
2
+ /**
3
+ * Format a warning for CLI output with colors, icons, and hints.
4
+ */
5
+ export declare function formatWarning(warning: Warning): string;
6
+ /**
7
+ * Format a summary line with counts.
8
+ */
9
+ export declare function formatSummary(discovered: number, written: number, warnings: number): string;
10
+ /**
11
+ * Format an error message with suggestions.
12
+ */
13
+ export declare function formatError(message: string, suggestion?: string): string;
14
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,gBAAgB,CAAC;AAe3D;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAsBtD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE3F;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAMxE"}
package/dist/output.js ADDED
@@ -0,0 +1,51 @@
1
+ import chalk from 'chalk';
2
+ const ICONS = {
3
+ merged: '⚠',
4
+ approximated: '≈',
5
+ skipped: '⊘',
6
+ overwritten: '↺',
7
+ 'file-renamed': '→',
8
+ };
9
+ const HINTS = {
10
+ merged: 'Converting back will produce 1 file, not the original count',
11
+ approximated: 'Behavior may differ slightly between tools',
12
+ };
13
+ /**
14
+ * Format a warning for CLI output with colors, icons, and hints.
15
+ */
16
+ export function formatWarning(warning) {
17
+ const icon = ICONS[warning.code] || '!';
18
+ const header = chalk.yellow(`${icon} ${warning.message}`);
19
+ let output = header;
20
+ if (warning.sources && warning.sources.length > 0) {
21
+ output += '\n' + chalk.gray(' Sources:');
22
+ for (const source of warning.sources.slice(0, 5)) {
23
+ output += '\n' + chalk.gray(` - ${source}`);
24
+ }
25
+ if (warning.sources.length > 5) {
26
+ output += '\n' + chalk.gray(` ... and ${warning.sources.length - 5} more`);
27
+ }
28
+ }
29
+ const hint = HINTS[warning.code];
30
+ if (hint) {
31
+ output += '\n' + chalk.gray(` Hint: ${hint}`);
32
+ }
33
+ return output;
34
+ }
35
+ /**
36
+ * Format a summary line with counts.
37
+ */
38
+ export function formatSummary(discovered, written, warnings) {
39
+ return chalk.bold(`Summary: ${discovered} discovered, ${written} written, ${warnings} warnings`);
40
+ }
41
+ /**
42
+ * Format an error message with suggestions.
43
+ */
44
+ export function formatError(message, suggestion) {
45
+ let output = chalk.red(`Error: ${message}`);
46
+ if (suggestion) {
47
+ output += '\n' + chalk.gray(` ${suggestion}`);
48
+ }
49
+ return output;
50
+ }
51
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,KAAK,GAAgC;IACzC,MAAM,EAAE,GAAG;IACX,YAAY,EAAE,GAAG;IACjB,OAAO,EAAE,GAAG;IACZ,WAAW,EAAE,GAAG;IAChB,cAAc,EAAE,GAAG;CACpB,CAAC;AAEF,MAAM,KAAK,GAAyC;IAClD,MAAM,EAAE,6DAA6D;IACrE,YAAY,EAAE,4CAA4C;CAC3D,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;IACxC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAE1D,IAAI,MAAM,GAAG,MAAM,CAAC;IAEpB,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1C,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;YACjD,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,OAAO,CAAC,CAAC;QAChF,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkB,EAAE,OAAe,EAAE,QAAgB;IACjF,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,UAAU,gBAAgB,OAAO,aAAa,QAAQ,WAAW,CAAC,CAAC;AACnG,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,OAAe,EAAE,UAAmB;IAC9D,IAAI,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;IAC5C,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,UAAU,EAAE,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "a16n",
3
+ "version": "0.0.1",
4
+ "description": "Agent customization portability for AI coding tools",
5
+ "license": "AGPL-3.0",
6
+ "author": "Texarkanine",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Texarkanine/a16n.git",
10
+ "directory": "packages/cli"
11
+ },
12
+ "homepage": "https://github.com/Texarkanine/a16n#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/Texarkanine/a16n/issues"
15
+ },
16
+ "keywords": [
17
+ "ai",
18
+ "agent",
19
+ "cursor",
20
+ "claude",
21
+ "rules",
22
+ "config",
23
+ "portability",
24
+ "cli"
25
+ ],
26
+ "type": "module",
27
+ "bin": {
28
+ "a16n": "./dist/index.js"
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "scripts": {
34
+ "build": "tsc",
35
+ "clean": "rimraf dist *.tsbuildinfo",
36
+ "typecheck": "tsc --noEmit",
37
+ "test": "vitest run",
38
+ "test:watch": "vitest"
39
+ },
40
+ "dependencies": {
41
+ "@a16njs/engine": "workspace:*",
42
+ "@a16njs/models": "workspace:*",
43
+ "@a16njs/plugin-claude": "workspace:*",
44
+ "@a16njs/plugin-cursor": "workspace:*",
45
+ "chalk": "^5.6.2",
46
+ "commander": "^12.0.0"
47
+ },
48
+ "devDependencies": {
49
+ "@types/node": "^20.0.0",
50
+ "typescript": "^5.4.0",
51
+ "vitest": "^2.0.0"
52
+ }
53
+ }