@truenine/memory-sync-cli 2026.10105.0 → 2026.10106.107
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 +160 -0
- package/dist/globals/index.d.mts +131 -0
- package/dist/globals/index.mjs +1 -0
- package/dist/index.mjs +92 -84
- package/dist/transformer-C6dH3CdE.mjs +1 -0
- package/dist/transformer-DWtwnW2T.mjs +1 -0
- package/package.json +8 -3
package/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# # memory-sync-cli
|
|
2
|
+
|
|
3
|
+
Cross-AI programming tool prompt synchronisation utility. One ruleset, multi-platform adaptation.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @truenine/memory-sync-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Global Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add -g @truenine/memory-sync-cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Update Version
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm update -g @truenine/memory-sync-cli --latest
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
After installation, use the command directly:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
tnmsc
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Available features:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Direct sync
|
|
33
|
+
tnmsc
|
|
34
|
+
|
|
35
|
+
# Get help
|
|
36
|
+
tnmsc help
|
|
37
|
+
tnmsc --help
|
|
38
|
+
tnmsc -h
|
|
39
|
+
|
|
40
|
+
# View version
|
|
41
|
+
tnmsc version
|
|
42
|
+
tnmsc --version
|
|
43
|
+
tnmsc -v
|
|
44
|
+
|
|
45
|
+
# Check for updates
|
|
46
|
+
tnmsc outdated
|
|
47
|
+
|
|
48
|
+
# Initialise directory and file structure based on config file and defaults
|
|
49
|
+
tnmsc init
|
|
50
|
+
|
|
51
|
+
# Preview export
|
|
52
|
+
tnmsc dry-run
|
|
53
|
+
|
|
54
|
+
# Clean all exports
|
|
55
|
+
tnmsc clean
|
|
56
|
+
|
|
57
|
+
# Preview clean targets
|
|
58
|
+
tnmsc clean --dry-run
|
|
59
|
+
tnmsc clean -n
|
|
60
|
+
|
|
61
|
+
# Set config options
|
|
62
|
+
tnmsc set key=value
|
|
63
|
+
tnmsc --set key=value
|
|
64
|
+
|
|
65
|
+
# Set log level
|
|
66
|
+
tnmsc --trace
|
|
67
|
+
tnmsc --debug
|
|
68
|
+
tnmsc --info
|
|
69
|
+
tnmsc --warn
|
|
70
|
+
tnmsc --error
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## CLI Configuration
|
|
74
|
+
|
|
75
|
+
Configuration can be created in two locations. Example below shows default config:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
~/.aindex/.tnmsc.json
|
|
79
|
+
cwd()/.tnmsc.json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
> cwd() represents the current command execution directory.
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"workspaceDir": "~/project",
|
|
87
|
+
"shadowSourceProjectDir": "$WORKSPACE/aindex",
|
|
88
|
+
"shadowSkillSourceDir": "$SHADOW_SOURCE_PROJECT/dist/skills",
|
|
89
|
+
"shadowFastCommandDir": "$SHADOW_SOURCE_PROJECT/dist/commands",
|
|
90
|
+
"shadowSubAgentDir": "$SHADOW_SOURCE_PROJECT/dist/agents",
|
|
91
|
+
"globalMemoryFile": "$SHADOW_SOURCE_PROJECT/dist/global.md",
|
|
92
|
+
"shadowProjectsDir": "$SHADOW_SOURCE_PROJECT/dist/app",
|
|
93
|
+
"externalProjects": [],
|
|
94
|
+
"excludePatterns": {},
|
|
95
|
+
"logLevel": "info"
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### SET Available Config Options
|
|
100
|
+
|
|
101
|
+
- `workspaceDir` - Workspace directory
|
|
102
|
+
- `shadowSourceProjectDir` - Shadow source project directory
|
|
103
|
+
- `shadowSkillSourceDir` - Skill source directory
|
|
104
|
+
- `shadowFastCommandDir` - Fast command directory
|
|
105
|
+
- `shadowSubAgentDir` - Sub-agent directory
|
|
106
|
+
- `globalMemoryFile` - Global memory file
|
|
107
|
+
- `shadowProjectsDir` - Shadow projects directory
|
|
108
|
+
- `logLevel` - Log level (trace/debug/info/warn/error)
|
|
109
|
+
|
|
110
|
+
Example:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
tnmsc --set workspaceDir=~/my-project
|
|
114
|
+
tnmsc --set logLevel=debug
|
|
115
|
+
tnmsc set workspaceDir=~/workspace
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Supported AI Tools
|
|
119
|
+
|
|
120
|
+
**IDE**
|
|
121
|
+
|
|
122
|
+
- Cursor IDE
|
|
123
|
+
- Kiro IDE
|
|
124
|
+
- Windsurf IDE
|
|
125
|
+
- Qoder IDE
|
|
126
|
+
- CodeBuddy IDE
|
|
127
|
+
- Antigravity IDE
|
|
128
|
+
|
|
129
|
+
**CLI Tools**
|
|
130
|
+
|
|
131
|
+
- Claude Code CLI
|
|
132
|
+
- Codex CLI
|
|
133
|
+
- Gemini CLI
|
|
134
|
+
- FactoryDroid CLI
|
|
135
|
+
|
|
136
|
+
**Config Files**
|
|
137
|
+
|
|
138
|
+
- JetBrains IDE
|
|
139
|
+
- VSCode IDE
|
|
140
|
+
|
|
141
|
+
## Plugin System
|
|
142
|
+
|
|
143
|
+
Uses input → transform → output pipeline architecture:
|
|
144
|
+
|
|
145
|
+
- **Input Plugins**: Read source files (Aindex, Ref, WorkspaceGroup)
|
|
146
|
+
- **Transform Plugins**: Process content
|
|
147
|
+
- **Output Plugins**: Write to target formats (various IDE/CLI adapters)
|
|
148
|
+
|
|
149
|
+
## Configuration
|
|
150
|
+
|
|
151
|
+
Config file priority: `cwd()/.tnmsc.json` > `~/.aindex/.tnmsc.json`
|
|
152
|
+
|
|
153
|
+
## Created by
|
|
154
|
+
|
|
155
|
+
- [Truenine](https://github.com/TrueNine)
|
|
156
|
+
- [zjarlin](https://github.com/zjarlin)
|
|
157
|
+
|
|
158
|
+
## License
|
|
159
|
+
|
|
160
|
+
UNLICENSED
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
//#region src/globals/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* User profile information
|
|
4
|
+
* @example {profile.name}, {profile.username}
|
|
5
|
+
*/
|
|
6
|
+
interface UserProfile {
|
|
7
|
+
name?: string;
|
|
8
|
+
username?: string;
|
|
9
|
+
gender?: string;
|
|
10
|
+
birthday?: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Tool references for AI assistants
|
|
15
|
+
* @example {tool.websearch}, {tool.webfetch}, {tool.readFile}
|
|
16
|
+
*/
|
|
17
|
+
interface ToolReferences {
|
|
18
|
+
/** Web search tool name */
|
|
19
|
+
websearch?: string;
|
|
20
|
+
/** Web fetch tool name */
|
|
21
|
+
webfetch?: string;
|
|
22
|
+
/** Read file tool name */
|
|
23
|
+
readFile?: string;
|
|
24
|
+
/** Write file tool name */
|
|
25
|
+
writeFile?: string;
|
|
26
|
+
/** Execute command/shell tool name */
|
|
27
|
+
executeCommand?: string;
|
|
28
|
+
/** Todolist write tool name */
|
|
29
|
+
todolistWrite?: string;
|
|
30
|
+
/** Grep/search tool name */
|
|
31
|
+
grep?: string;
|
|
32
|
+
/** Allow custom tool references */
|
|
33
|
+
[key: string]: string | undefined;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Tool name presets for different AI tools.
|
|
37
|
+
* Each preset provides tool name mappings specific to that AI tool.
|
|
38
|
+
*/
|
|
39
|
+
declare const ToolPresets: {
|
|
40
|
+
/** Default tool names (snake_case) */
|
|
41
|
+
readonly default: {
|
|
42
|
+
readonly websearch: "web_search";
|
|
43
|
+
readonly webfetch: "web_fetch";
|
|
44
|
+
readonly readFile: "read_file";
|
|
45
|
+
readonly writeFile: "write_file";
|
|
46
|
+
readonly executeCommand: "execute_command";
|
|
47
|
+
readonly todolistWrite: "todolist_write";
|
|
48
|
+
readonly grep: "grep";
|
|
49
|
+
};
|
|
50
|
+
/** Claude Code CLI tool names (PascalCase) */
|
|
51
|
+
readonly claudeCode: {
|
|
52
|
+
readonly readFile: "Read";
|
|
53
|
+
readonly writeFile: "Write";
|
|
54
|
+
readonly executeCommand: "Execute";
|
|
55
|
+
readonly todolistWrite: "TodoWrite";
|
|
56
|
+
};
|
|
57
|
+
/** Kiro tool names */
|
|
58
|
+
readonly kiro: {
|
|
59
|
+
readonly websearch: "remote_web_search";
|
|
60
|
+
readonly webfetch: "webFetch";
|
|
61
|
+
readonly readFile: "readFile";
|
|
62
|
+
readonly writeFile: "fsWrite";
|
|
63
|
+
readonly executeCommand: "executeBash";
|
|
64
|
+
readonly todolistWrite: "todolistWrite";
|
|
65
|
+
readonly grep: "grepSearch";
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Environment context
|
|
70
|
+
* @example {env.NODE_ENV}, {env.DEBUG}
|
|
71
|
+
*/
|
|
72
|
+
interface EnvironmentContext {
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Shell kind enumeration
|
|
77
|
+
*/
|
|
78
|
+
declare enum ShellKind {
|
|
79
|
+
Bash = "bash",
|
|
80
|
+
Zsh = "zsh",
|
|
81
|
+
Fish = "fish",
|
|
82
|
+
Sh = "sh",
|
|
83
|
+
PowerShell = "powershell",
|
|
84
|
+
Pwsh = "pwsh",
|
|
85
|
+
Cmd = "cmd",
|
|
86
|
+
Unknown = "unknown",
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Operating system kind enumeration
|
|
90
|
+
* Simplified OS type for conditional logic in templates
|
|
91
|
+
* @example {os.kind === 'mac' ? 'macOS specific' : 'other'}
|
|
92
|
+
*/
|
|
93
|
+
declare enum OsKind {
|
|
94
|
+
Win = "win",
|
|
95
|
+
Mac = "mac",
|
|
96
|
+
Linux = "linux",
|
|
97
|
+
Unknown = "unknown",
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Operating system information
|
|
101
|
+
* @example {os.platform}, {os.arch}, {os.shellKind}, {os.kind}
|
|
102
|
+
*/
|
|
103
|
+
interface OsInfo {
|
|
104
|
+
platform?: string;
|
|
105
|
+
arch?: string;
|
|
106
|
+
hostname?: string;
|
|
107
|
+
homedir?: string;
|
|
108
|
+
tmpdir?: string;
|
|
109
|
+
type?: string;
|
|
110
|
+
release?: string;
|
|
111
|
+
shellKind?: ShellKind;
|
|
112
|
+
kind?: OsKind;
|
|
113
|
+
[key: string]: string | ShellKind | OsKind | undefined;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Global scope available in MDX expressions
|
|
117
|
+
*/
|
|
118
|
+
interface MdxGlobalScope {
|
|
119
|
+
profile: UserProfile;
|
|
120
|
+
tool: ToolReferences;
|
|
121
|
+
env: EnvironmentContext;
|
|
122
|
+
os: OsInfo;
|
|
123
|
+
}
|
|
124
|
+
declare global {
|
|
125
|
+
const profile: UserProfile;
|
|
126
|
+
const tool: ToolReferences;
|
|
127
|
+
const env: EnvironmentContext;
|
|
128
|
+
const os: OsInfo;
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
export { EnvironmentContext, MdxGlobalScope, OsInfo, OsKind, ShellKind, ToolPresets, ToolReferences, UserProfile };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={default:{websearch:`web_search`,webfetch:`web_fetch`,readFile:`read_file`,writeFile:`write_file`,executeCommand:`execute_command`,todolistWrite:`todolist_write`,grep:`grep`},claudeCode:{readFile:`Read`,writeFile:`Write`,executeCommand:`Execute`,todolistWrite:`TodoWrite`},kiro:{websearch:`remote_web_search`,webfetch:`webFetch`,readFile:`readFile`,writeFile:`fsWrite`,executeCommand:`executeBash`,todolistWrite:`todolistWrite`,grep:`grepSearch`}};let t=function(e){return e.Bash=`bash`,e.Zsh=`zsh`,e.Fish=`fish`,e.Sh=`sh`,e.PowerShell=`powershell`,e.Pwsh=`pwsh`,e.Cmd=`cmd`,e.Unknown=`unknown`,e}({}),n=function(e){return e.Win=`win`,e.Mac=`mac`,e.Linux=`linux`,e.Unknown=`unknown`,e}({});export{n as OsKind,t as ShellKind,e as ToolPresets};
|