aliasmate 1.0.0 → 1.3.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.
- package/CHANGELOG.md +159 -0
- package/README.md +188 -3
- package/dist/cli.js +66 -15
- package/dist/cli.js.map +1 -1
- package/dist/commands/delete.d.ts +12 -0
- package/dist/commands/delete.d.ts.map +1 -1
- package/dist/commands/delete.js +29 -8
- package/dist/commands/delete.js.map +1 -1
- package/dist/commands/edit.d.ts +13 -0
- package/dist/commands/edit.d.ts.map +1 -1
- package/dist/commands/edit.js +72 -26
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/export.d.ts +17 -0
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +42 -7
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/import.d.ts +21 -0
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +93 -48
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/list.d.ts +20 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +83 -6
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/prev.d.ts +14 -1
- package/dist/commands/prev.d.ts.map +1 -1
- package/dist/commands/prev.js +43 -14
- package/dist/commands/prev.js.map +1 -1
- package/dist/commands/run.d.ts +16 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +52 -11
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/save.d.ts +15 -1
- package/dist/commands/save.d.ts.map +1 -1
- package/dist/commands/save.js +82 -35
- package/dist/commands/save.js.map +1 -1
- package/dist/commands/search.d.ts +19 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +113 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/storage/index.d.ts +44 -8
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +58 -12
- package/dist/storage/index.js.map +1 -1
- package/dist/utils/constants.d.ts +48 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +51 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/errors.d.ts +30 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +62 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/executor.d.ts +22 -1
- package/dist/utils/executor.d.ts.map +1 -1
- package/dist/utils/executor.js +36 -11
- package/dist/utils/executor.js.map +1 -1
- package/dist/utils/history.d.ts +21 -3
- package/dist/utils/history.d.ts.map +1 -1
- package/dist/utils/history.js +28 -14
- package/dist/utils/history.js.map +1 -1
- package/dist/utils/llm-generator.d.ts +21 -0
- package/dist/utils/llm-generator.d.ts.map +1 -0
- package/dist/utils/llm-generator.js +337 -0
- package/dist/utils/llm-generator.js.map +1 -0
- package/dist/utils/onboarding.d.ts +10 -0
- package/dist/utils/onboarding.d.ts.map +1 -0
- package/dist/utils/onboarding.js +201 -0
- package/dist/utils/onboarding.js.map +1 -0
- package/dist/utils/paths.d.ts +39 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +56 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/prompts.d.ts +56 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +51 -0
- package/dist/utils/prompts.js.map +1 -0
- package/package.json +22 -6
package/dist/utils/executor.js
CHANGED
|
@@ -42,34 +42,59 @@ const path = __importStar(require("path"));
|
|
|
42
42
|
const fs = __importStar(require("fs"));
|
|
43
43
|
/**
|
|
44
44
|
* Execute a command in a specific directory
|
|
45
|
-
*
|
|
45
|
+
* Uses execa with shell mode for cross-platform compatibility
|
|
46
|
+
*
|
|
47
|
+
* @param command - The shell command to execute
|
|
48
|
+
* @param cwd - The working directory to execute the command in
|
|
49
|
+
* @returns A promise that resolves with the execution result
|
|
50
|
+
* @throws {Error} If the directory doesn't exist
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const result = await executeCommand('npm install', '/path/to/project');
|
|
55
|
+
* if (result.success) {
|
|
56
|
+
* console.log('Installation successful');
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
46
59
|
*/
|
|
47
60
|
async function executeCommand(command, cwd) {
|
|
61
|
+
// Validate inputs
|
|
62
|
+
if (!command || !command.trim()) {
|
|
63
|
+
throw new Error('Command cannot be empty');
|
|
64
|
+
}
|
|
65
|
+
// Resolve the directory path
|
|
66
|
+
const resolvedCwd = path.resolve(cwd);
|
|
67
|
+
// Check if directory exists
|
|
68
|
+
if (!fs.existsSync(resolvedCwd)) {
|
|
69
|
+
throw new Error(`Directory does not exist: ${resolvedCwd}`);
|
|
70
|
+
}
|
|
71
|
+
// Check if it's actually a directory
|
|
72
|
+
const stats = fs.statSync(resolvedCwd);
|
|
73
|
+
if (!stats.isDirectory()) {
|
|
74
|
+
throw new Error(`Path is not a directory: ${resolvedCwd}`);
|
|
75
|
+
}
|
|
48
76
|
try {
|
|
49
|
-
// Resolve the directory path
|
|
50
|
-
const resolvedCwd = path.resolve(cwd);
|
|
51
|
-
// Check if directory exists
|
|
52
|
-
if (!fs.existsSync(resolvedCwd)) {
|
|
53
|
-
throw new Error(`Directory does not exist: ${resolvedCwd}`);
|
|
54
|
-
}
|
|
55
77
|
// Execute the command using the user's shell
|
|
56
78
|
// stdio: 'inherit' allows real-time output to terminal
|
|
57
79
|
await (0, execa_1.default)(command, {
|
|
58
80
|
shell: true,
|
|
59
81
|
cwd: resolvedCwd,
|
|
60
|
-
stdio: 'inherit'
|
|
82
|
+
stdio: 'inherit',
|
|
61
83
|
});
|
|
62
84
|
return {
|
|
63
85
|
success: true,
|
|
64
86
|
stdout: '',
|
|
65
|
-
stderr: ''
|
|
87
|
+
stderr: '',
|
|
88
|
+
exitCode: 0,
|
|
66
89
|
};
|
|
67
90
|
}
|
|
68
91
|
catch (error) {
|
|
92
|
+
const execaError = error;
|
|
69
93
|
return {
|
|
70
94
|
success: false,
|
|
71
|
-
stdout:
|
|
72
|
-
stderr:
|
|
95
|
+
stdout: execaError.stdout || '',
|
|
96
|
+
stderr: execaError.stderr || execaError.message,
|
|
97
|
+
exitCode: execaError.exitCode,
|
|
73
98
|
};
|
|
74
99
|
}
|
|
75
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/utils/executor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/utils/executor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,wCA4CC;AA/ED,kDAA0B;AAC1B,2CAA6B;AAC7B,uCAAyB;AAgBzB;;;;;;;;;;;;;;;;GAgBG;AACI,KAAK,UAAU,cAAc,CAAC,OAAe,EAAE,GAAW;IAC/D,kBAAkB;IAClB,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,6BAA6B;IAC7B,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAEtC,4BAA4B;IAC5B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,6BAA6B,WAAW,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,qCAAqC;IACrC,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACvC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,4BAA4B,WAAW,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,CAAC;QACH,6CAA6C;QAC7C,uDAAuD;QACvD,MAAM,IAAA,eAAK,EAAC,OAAO,EAAE;YACnB,KAAK,EAAE,IAAI;YACX,GAAG,EAAE,WAAW;YAChB,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;QAEH,OAAO;YACL,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,CAAC;SACZ,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,UAAU,GAAG,KAAyB,CAAC;QAC7C,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,UAAU,CAAC,MAAM,IAAI,EAAE;YAC/B,MAAM,EAAE,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,OAAO;YAC/C,QAAQ,EAAE,UAAU,CAAC,QAAQ;SAC9B,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/utils/history.d.ts
CHANGED
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get the last command from shell history
|
|
3
3
|
*
|
|
4
|
-
* IMPORTANT: This
|
|
5
|
-
*
|
|
4
|
+
* IMPORTANT: This reads from the shell history file, which may not include
|
|
5
|
+
* the most recent commands until the shell writes them.
|
|
6
6
|
*
|
|
7
|
-
* For best results,
|
|
7
|
+
* For best results, configure your shell for immediate history writing:
|
|
8
8
|
* - zsh: Add "setopt INC_APPEND_HISTORY" or "setopt SHARE_HISTORY" to ~/.zshrc
|
|
9
9
|
* - bash: Add "PROMPT_COMMAND='history -a'" to ~/.bashrc
|
|
10
10
|
* - PowerShell (Windows): History is written immediately by default
|
|
11
11
|
*
|
|
12
12
|
* Alternative: Use environment variable ALIASMATE_LAST_CMD passed from parent shell
|
|
13
|
+
*
|
|
14
|
+
* @returns The last command from history, or null if unavailable
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const lastCmd = getLastCommand();
|
|
19
|
+
* if (lastCmd) {
|
|
20
|
+
* console.log(`Last command was: ${lastCmd}`);
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
13
23
|
*/
|
|
14
24
|
export declare function getLastCommand(): string | null;
|
|
15
25
|
/**
|
|
16
26
|
* Get shell-specific configuration instructions for real-time history
|
|
27
|
+
*
|
|
28
|
+
* @returns Instructions formatted for the user's shell
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const instructions = getHistoryConfigInstructions();
|
|
33
|
+
* console.log(`Configure your shell:\n${instructions}`);
|
|
34
|
+
* ```
|
|
17
35
|
*/
|
|
18
36
|
export declare function getHistoryConfigInstructions(): string;
|
|
19
37
|
//# sourceMappingURL=history.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../src/utils/history.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../src/utils/history.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CA8F9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAsBrD"}
|
package/dist/utils/history.js
CHANGED
|
@@ -41,15 +41,25 @@ const os = __importStar(require("os"));
|
|
|
41
41
|
/**
|
|
42
42
|
* Get the last command from shell history
|
|
43
43
|
*
|
|
44
|
-
* IMPORTANT: This
|
|
45
|
-
*
|
|
44
|
+
* IMPORTANT: This reads from the shell history file, which may not include
|
|
45
|
+
* the most recent commands until the shell writes them.
|
|
46
46
|
*
|
|
47
|
-
* For best results,
|
|
47
|
+
* For best results, configure your shell for immediate history writing:
|
|
48
48
|
* - zsh: Add "setopt INC_APPEND_HISTORY" or "setopt SHARE_HISTORY" to ~/.zshrc
|
|
49
49
|
* - bash: Add "PROMPT_COMMAND='history -a'" to ~/.bashrc
|
|
50
50
|
* - PowerShell (Windows): History is written immediately by default
|
|
51
51
|
*
|
|
52
52
|
* Alternative: Use environment variable ALIASMATE_LAST_CMD passed from parent shell
|
|
53
|
+
*
|
|
54
|
+
* @returns The last command from history, or null if unavailable
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const lastCmd = getLastCommand();
|
|
59
|
+
* if (lastCmd) {
|
|
60
|
+
* console.log(`Last command was: ${lastCmd}`);
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
53
63
|
*/
|
|
54
64
|
function getLastCommand() {
|
|
55
65
|
try {
|
|
@@ -90,7 +100,7 @@ function getLastCommand() {
|
|
|
90
100
|
path.join(homeDir, '.zsh_history'),
|
|
91
101
|
path.join(homeDir, '.bash_history'),
|
|
92
102
|
path.join(homeDir, '.sh_history'),
|
|
93
|
-
path.join(homeDir, '.history')
|
|
103
|
+
path.join(homeDir, '.history'),
|
|
94
104
|
];
|
|
95
105
|
for (const file of possibleFiles) {
|
|
96
106
|
if (fs.existsSync(file)) {
|
|
@@ -133,29 +143,33 @@ function getLastCommand() {
|
|
|
133
143
|
}
|
|
134
144
|
/**
|
|
135
145
|
* Get shell-specific configuration instructions for real-time history
|
|
146
|
+
*
|
|
147
|
+
* @returns Instructions formatted for the user's shell
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```ts
|
|
151
|
+
* const instructions = getHistoryConfigInstructions();
|
|
152
|
+
* console.log(`Configure your shell:\n${instructions}`);
|
|
153
|
+
* ```
|
|
136
154
|
*/
|
|
137
155
|
function getHistoryConfigInstructions() {
|
|
138
156
|
const platform = os.platform();
|
|
139
157
|
const shell = process.env.SHELL || '';
|
|
140
158
|
if (platform === 'win32') {
|
|
141
|
-
return 'PowerShell writes history immediately. If using Git Bash, add to ~/.bashrc:\n' +
|
|
142
|
-
' PROMPT_COMMAND="history -a"';
|
|
159
|
+
return ('PowerShell writes history immediately. If using Git Bash, add to ~/.bashrc:\n' +
|
|
160
|
+
' PROMPT_COMMAND="history -a"');
|
|
143
161
|
}
|
|
144
162
|
else if (shell.includes('zsh')) {
|
|
145
|
-
return 'Add to ~/.zshrc:\n' +
|
|
146
|
-
' setopt INC_APPEND_HISTORY\n' +
|
|
147
|
-
'Then run: source ~/.zshrc';
|
|
163
|
+
return 'Add to ~/.zshrc:\n' + ' setopt INC_APPEND_HISTORY\n' + 'Then run: source ~/.zshrc';
|
|
148
164
|
}
|
|
149
165
|
else if (shell.includes('bash')) {
|
|
150
|
-
return 'Add to ~/.bashrc:\n' +
|
|
151
|
-
' PROMPT_COMMAND="history -a"\n' +
|
|
152
|
-
'Then run: source ~/.bashrc';
|
|
166
|
+
return 'Add to ~/.bashrc:\n' + ' PROMPT_COMMAND="history -a"\n' + 'Then run: source ~/.bashrc';
|
|
153
167
|
}
|
|
154
168
|
else if (shell.includes('fish')) {
|
|
155
169
|
return 'Fish writes history immediately by default';
|
|
156
170
|
}
|
|
157
|
-
return 'Configure your shell to write history immediately.\n' +
|
|
171
|
+
return ('Configure your shell to write history immediately.\n' +
|
|
158
172
|
'For bash: Add PROMPT_COMMAND="history -a" to ~/.bashrc\n' +
|
|
159
|
-
'For zsh: Add "setopt INC_APPEND_HISTORY" to ~/.zshrc';
|
|
173
|
+
'For zsh: Add "setopt INC_APPEND_HISTORY" to ~/.zshrc');
|
|
160
174
|
}
|
|
161
175
|
//# sourceMappingURL=history.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.js","sourceRoot":"","sources":["../../src/utils/history.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"history.js","sourceRoot":"","sources":["../../src/utils/history.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,wCA8FC;AAaD,oEAsBC;AA5JD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAEzB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAgB,cAAc;IAC5B,IAAI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,CAAC;QAClC,OAAO,4CAA4C,CAAC;IACtD,CAAC;IAED,OAAO,CACL,sDAAsD;QACtD,0DAA0D;QAC1D,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate LLM.txt content with all AliasMate features and documentation
|
|
3
|
+
*/
|
|
4
|
+
export declare function generateLLMContent(): string;
|
|
5
|
+
/**
|
|
6
|
+
* Create llm.txt file in the specified directory
|
|
7
|
+
* @param targetDir - The directory where llm.txt should be created
|
|
8
|
+
* @returns The full path to the created file
|
|
9
|
+
*/
|
|
10
|
+
export declare function createLLMFile(targetDir: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Get the default LLM command configuration
|
|
13
|
+
* This command will be auto-created during onboarding
|
|
14
|
+
*/
|
|
15
|
+
export declare function getDefaultLLMCommand(): {
|
|
16
|
+
name: string;
|
|
17
|
+
command: string;
|
|
18
|
+
directory: string;
|
|
19
|
+
pathMode: 'current';
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=llm-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-generator.d.ts","sourceRoot":"","sources":["../../src/utils/llm-generator.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CA4Q3C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAOvD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,CAOhH"}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.generateLLMContent = generateLLMContent;
|
|
37
|
+
exports.createLLMFile = createLLMFile;
|
|
38
|
+
exports.getDefaultLLMCommand = getDefaultLLMCommand;
|
|
39
|
+
const fs = __importStar(require("fs"));
|
|
40
|
+
const path = __importStar(require("path"));
|
|
41
|
+
const constants_1 = require("./constants");
|
|
42
|
+
/**
|
|
43
|
+
* Generate LLM.txt content with all AliasMate features and documentation
|
|
44
|
+
*/
|
|
45
|
+
function generateLLMContent() {
|
|
46
|
+
return `# AliasMate - Terminal Command Management CLI
|
|
47
|
+
|
|
48
|
+
Version: ${constants_1.APP_VERSION}
|
|
49
|
+
Official Tool: ${constants_1.APP_NAME}
|
|
50
|
+
|
|
51
|
+
## Overview
|
|
52
|
+
|
|
53
|
+
AliasMate is a powerful CLI utility that saves, manages, and re-runs shell commands with their working directories. It helps developers save time, reduce errors, and boost productivity by eliminating the need to retype complex commands or remember their exact locations.
|
|
54
|
+
|
|
55
|
+
## Core Capabilities
|
|
56
|
+
|
|
57
|
+
### 1. Command Storage
|
|
58
|
+
- Save any shell command with a memorable name
|
|
59
|
+
- Store the working directory where the command should execute
|
|
60
|
+
- Preserve metadata (creation date, last modified)
|
|
61
|
+
- Support for complex multi-line commands and scripts
|
|
62
|
+
|
|
63
|
+
### 2. Command Execution
|
|
64
|
+
- Run saved commands from anywhere in the filesystem
|
|
65
|
+
- Automatic directory switching to the saved location
|
|
66
|
+
- Option to override execution directory (use current or saved path)
|
|
67
|
+
- Support for both absolute and relative path overrides
|
|
68
|
+
|
|
69
|
+
### 3. Command Management
|
|
70
|
+
- List all saved commands with full details
|
|
71
|
+
- Search commands by name, command text, or directory
|
|
72
|
+
- Edit existing commands interactively
|
|
73
|
+
- Delete unwanted commands
|
|
74
|
+
- Export/import commands for backup and team sharing
|
|
75
|
+
|
|
76
|
+
## Available Commands
|
|
77
|
+
|
|
78
|
+
### aliasmate prev <name>
|
|
79
|
+
Save the previous command from shell history.
|
|
80
|
+
- Automatically captures the last executed command
|
|
81
|
+
- Saves current working directory
|
|
82
|
+
- Example: \`aliasmate prev build\`
|
|
83
|
+
|
|
84
|
+
### aliasmate run <name> [path]
|
|
85
|
+
Execute a saved command.
|
|
86
|
+
- Runs in saved directory by default
|
|
87
|
+
- Optional path parameter to override directory
|
|
88
|
+
- Supports path mode (saved vs current directory)
|
|
89
|
+
- Example: \`aliasmate run build\` or \`aliasmate run build .\`
|
|
90
|
+
|
|
91
|
+
### aliasmate save
|
|
92
|
+
Interactively create a new saved command.
|
|
93
|
+
- Prompts for command name
|
|
94
|
+
- Prompts for command to execute
|
|
95
|
+
- Prompts for working directory
|
|
96
|
+
- Prompts for path mode preference
|
|
97
|
+
- Example: \`aliasmate save\`
|
|
98
|
+
|
|
99
|
+
### aliasmate list (alias: ls)
|
|
100
|
+
Display all saved commands.
|
|
101
|
+
- Shows command name, actual command, and directory
|
|
102
|
+
- Displays path mode for each command
|
|
103
|
+
- Color-coded output for readability
|
|
104
|
+
- Example: \`aliasmate list\`
|
|
105
|
+
|
|
106
|
+
### aliasmate search <query> (alias: find)
|
|
107
|
+
Search for commands by keyword.
|
|
108
|
+
- Searches in command name, command text, and directory path
|
|
109
|
+
- Case-insensitive matching
|
|
110
|
+
- Example: \`aliasmate search deploy\`
|
|
111
|
+
|
|
112
|
+
### aliasmate edit <name>
|
|
113
|
+
Modify an existing command.
|
|
114
|
+
- Interactive prompts with current values
|
|
115
|
+
- Update command text, directory, or path mode
|
|
116
|
+
- Example: \`aliasmate edit build\`
|
|
117
|
+
|
|
118
|
+
### aliasmate delete <name> (alias: rm)
|
|
119
|
+
Remove a saved command.
|
|
120
|
+
- Permanently deletes the command
|
|
121
|
+
- Example: \`aliasmate delete old-build\`
|
|
122
|
+
|
|
123
|
+
### aliasmate export <file>
|
|
124
|
+
Export all commands to a JSON file.
|
|
125
|
+
- Backup your commands
|
|
126
|
+
- Share with team members
|
|
127
|
+
- Example: \`aliasmate export my-commands.json\`
|
|
128
|
+
|
|
129
|
+
### aliasmate import <file>
|
|
130
|
+
Import commands from a JSON file.
|
|
131
|
+
- Restore from backup
|
|
132
|
+
- Load teammate's commands
|
|
133
|
+
- Prompts before overwriting existing commands
|
|
134
|
+
- Example: \`aliasmate import my-commands.json\`
|
|
135
|
+
|
|
136
|
+
### aliasmate llm
|
|
137
|
+
Generate this llm.txt file (default command).
|
|
138
|
+
- Creates comprehensive documentation
|
|
139
|
+
- Can be shared with AI assistants
|
|
140
|
+
- Example: \`aliasmate run llm\`
|
|
141
|
+
|
|
142
|
+
## Path Mode Feature
|
|
143
|
+
|
|
144
|
+
Each saved command can have a path mode that determines where it executes:
|
|
145
|
+
|
|
146
|
+
### Saved Directory Mode (default)
|
|
147
|
+
- Command always runs in the directory where it was saved
|
|
148
|
+
- Useful for project-specific commands
|
|
149
|
+
- Example: Build scripts that must run in the project root
|
|
150
|
+
|
|
151
|
+
### Current Directory Mode
|
|
152
|
+
- Command runs in your current working directory
|
|
153
|
+
- Useful for general-purpose utilities
|
|
154
|
+
- Example: Git commands that work in any repository
|
|
155
|
+
|
|
156
|
+
You can choose the path mode when saving or editing a command.
|
|
157
|
+
|
|
158
|
+
## Configuration
|
|
159
|
+
|
|
160
|
+
### Storage Location
|
|
161
|
+
- Config file: \`~/.config/aliasmate/config.json\`
|
|
162
|
+
- Contains all saved commands and their metadata
|
|
163
|
+
- JSON format for easy editing if needed
|
|
164
|
+
|
|
165
|
+
### Command Alias Structure
|
|
166
|
+
Each command contains:
|
|
167
|
+
- \`command\`: The shell command to execute
|
|
168
|
+
- \`directory\`: The saved working directory path
|
|
169
|
+
- \`pathMode\`: Either "saved" or "current"
|
|
170
|
+
- \`createdAt\`: ISO 8601 timestamp
|
|
171
|
+
- \`updatedAt\`: ISO 8601 timestamp
|
|
172
|
+
|
|
173
|
+
## Use Cases
|
|
174
|
+
|
|
175
|
+
### Development Workflows
|
|
176
|
+
- Save complex build commands: \`aliasmate prev build-prod\`
|
|
177
|
+
- Run test suites: \`aliasmate prev test-integration\`
|
|
178
|
+
- Deploy applications: \`aliasmate prev deploy-staging\`
|
|
179
|
+
|
|
180
|
+
### Multi-Project Management
|
|
181
|
+
- Switch between projects easily
|
|
182
|
+
- Run project-specific commands without navigating
|
|
183
|
+
- Maintain consistent workflows across projects
|
|
184
|
+
|
|
185
|
+
### Team Collaboration
|
|
186
|
+
- Export team workflows: \`aliasmate export team-commands.json\`
|
|
187
|
+
- Share best practices and scripts
|
|
188
|
+
- Onboard new team members quickly
|
|
189
|
+
|
|
190
|
+
### DevOps and Automation
|
|
191
|
+
- Save deployment scripts with correct paths
|
|
192
|
+
- Manage multiple environment configurations
|
|
193
|
+
- Quick access to frequently used operations
|
|
194
|
+
|
|
195
|
+
## Best Practices
|
|
196
|
+
|
|
197
|
+
1. **Descriptive Names**: Use clear, memorable names for commands
|
|
198
|
+
- Good: \`deploy-prod\`, \`test-unit\`, \`start-server\`
|
|
199
|
+
- Avoid: \`cmd1\`, \`x\`, \`temp\`
|
|
200
|
+
|
|
201
|
+
2. **Path Mode Selection**: Choose the right mode for each command
|
|
202
|
+
- Use "saved" for project-specific commands
|
|
203
|
+
- Use "current" for general utilities
|
|
204
|
+
|
|
205
|
+
3. **Regular Backups**: Export commands periodically
|
|
206
|
+
- \`aliasmate export ~/backups/aliases-\$(date +%Y%m%d).json\`
|
|
207
|
+
|
|
208
|
+
4. **Team Sharing**: Maintain a shared command repository
|
|
209
|
+
- Version control your command exports
|
|
210
|
+
- Document complex commands
|
|
211
|
+
|
|
212
|
+
5. **Command Organization**: Use prefixes for grouping
|
|
213
|
+
- \`test-unit\`, \`test-integration\`, \`test-e2e\`
|
|
214
|
+
- \`deploy-dev\`, \`deploy-staging\`, \`deploy-prod\`
|
|
215
|
+
|
|
216
|
+
## Integration with AI Assistants
|
|
217
|
+
|
|
218
|
+
This llm.txt file is designed to help AI assistants understand AliasMate's full capabilities. When asking an AI for help with AliasMate:
|
|
219
|
+
|
|
220
|
+
1. Share this file for complete context
|
|
221
|
+
2. Mention specific commands you're working with
|
|
222
|
+
3. Describe your workflow or use case
|
|
223
|
+
4. Ask for command suggestions or optimizations
|
|
224
|
+
|
|
225
|
+
## Troubleshooting
|
|
226
|
+
|
|
227
|
+
### Command Not Found
|
|
228
|
+
- Run \`aliasmate list\` to see available commands
|
|
229
|
+
- Check spelling of command name
|
|
230
|
+
- Verify command was saved successfully
|
|
231
|
+
|
|
232
|
+
### Directory Not Found
|
|
233
|
+
- Ensure the saved directory still exists
|
|
234
|
+
- Use path override to run in different location
|
|
235
|
+
- Edit command to update directory: \`aliasmate edit <name>\`
|
|
236
|
+
|
|
237
|
+
### Command Execution Fails
|
|
238
|
+
- Verify command syntax is correct
|
|
239
|
+
- Check if required tools/dependencies are installed
|
|
240
|
+
- Ensure directory permissions are correct
|
|
241
|
+
|
|
242
|
+
## Technical Details
|
|
243
|
+
|
|
244
|
+
- Written in TypeScript
|
|
245
|
+
- Cross-platform (Linux, macOS, Windows)
|
|
246
|
+
- Node.js 14.0.0 or higher required
|
|
247
|
+
- Dependencies: chalk, commander, execa, inquirer
|
|
248
|
+
|
|
249
|
+
## Getting Help
|
|
250
|
+
|
|
251
|
+
- View all commands: \`aliasmate --help\`
|
|
252
|
+
- View command help: \`aliasmate <command> --help\`
|
|
253
|
+
- GitHub Issues: Report bugs or request features
|
|
254
|
+
- Version info: \`aliasmate --version\`
|
|
255
|
+
|
|
256
|
+
## Example Workflows
|
|
257
|
+
|
|
258
|
+
### Frontend Development
|
|
259
|
+
\`\`\`bash
|
|
260
|
+
# Save development server
|
|
261
|
+
npm run dev
|
|
262
|
+
aliasmate prev dev
|
|
263
|
+
|
|
264
|
+
# Save production build
|
|
265
|
+
npm run build
|
|
266
|
+
aliasmate prev build
|
|
267
|
+
|
|
268
|
+
# Save test suite
|
|
269
|
+
npm test
|
|
270
|
+
aliasmate prev test
|
|
271
|
+
|
|
272
|
+
# Run from anywhere
|
|
273
|
+
aliasmate run dev
|
|
274
|
+
aliasmate run build
|
|
275
|
+
aliasmate run test
|
|
276
|
+
\`\`\`
|
|
277
|
+
|
|
278
|
+
### Backend API
|
|
279
|
+
\`\`\`bash
|
|
280
|
+
# Save API server
|
|
281
|
+
npm start
|
|
282
|
+
aliasmate prev api
|
|
283
|
+
|
|
284
|
+
# Save database migrations
|
|
285
|
+
npm run migrate
|
|
286
|
+
aliasmate prev migrate
|
|
287
|
+
|
|
288
|
+
# Save seed data
|
|
289
|
+
npm run seed
|
|
290
|
+
aliasmate prev seed
|
|
291
|
+
\`\`\`
|
|
292
|
+
|
|
293
|
+
### DevOps
|
|
294
|
+
\`\`\`bash
|
|
295
|
+
# Save deployment scripts
|
|
296
|
+
./scripts/deploy.sh production
|
|
297
|
+
aliasmate prev deploy-prod
|
|
298
|
+
|
|
299
|
+
# Save log viewing
|
|
300
|
+
tail -f /var/log/app.log
|
|
301
|
+
aliasmate prev logs
|
|
302
|
+
|
|
303
|
+
# Save health checks
|
|
304
|
+
curl http://localhost:3000/health
|
|
305
|
+
aliasmate prev health-check
|
|
306
|
+
\`\`\`
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
Generated by AliasMate v${constants_1.APP_VERSION}
|
|
311
|
+
For more information, visit: https://github.com/aliasmate/aliasmate
|
|
312
|
+
`;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Create llm.txt file in the specified directory
|
|
316
|
+
* @param targetDir - The directory where llm.txt should be created
|
|
317
|
+
* @returns The full path to the created file
|
|
318
|
+
*/
|
|
319
|
+
function createLLMFile(targetDir) {
|
|
320
|
+
const content = generateLLMContent();
|
|
321
|
+
const filePath = path.join(targetDir, 'llm.txt');
|
|
322
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
|
323
|
+
return filePath;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Get the default LLM command configuration
|
|
327
|
+
* This command will be auto-created during onboarding
|
|
328
|
+
*/
|
|
329
|
+
function getDefaultLLMCommand() {
|
|
330
|
+
return {
|
|
331
|
+
name: 'llm',
|
|
332
|
+
command: `cat > llm.txt << 'ALIASMATE_LLM_EOF'\n${generateLLMContent()}\nALIASMATE_LLM_EOF\necho "✓ Created llm.txt in $(pwd)"`,
|
|
333
|
+
directory: process.cwd(),
|
|
334
|
+
pathMode: 'current', // Run in current directory so users can create llm.txt anywhere
|
|
335
|
+
};
|
|
336
|
+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,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if this is a first install or upgrade, and show appropriate onboarding
|
|
3
|
+
* @returns true if onboarding was shown, false otherwise
|
|
4
|
+
*/
|
|
5
|
+
export declare function checkAndShowOnboarding(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Check if user has completed onboarding
|
|
8
|
+
*/
|
|
9
|
+
export declare function hasCompletedOnboarding(): boolean;
|
|
10
|
+
//# sourceMappingURL=onboarding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/utils/onboarding.ts"],"names":[],"mappings":"AA6IA;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAoChD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD"}
|