ux-toolkit 0.4.1 → 0.5.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/.claude-plugin/marketplace.json +11 -0
- package/.claude-plugin/plugin.json +23 -0
- package/dist/cli.js +739 -116
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +353 -101
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +117 -6
- package/dist/index.d.ts +117 -6
- package/dist/index.js +342 -102
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,77 @@
|
|
|
1
|
+
declare function getSkillPath(skillName: string): string;
|
|
2
|
+
declare function getAgentPath(agentName: string): string;
|
|
3
|
+
declare function getCommandPath(commandName: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Get the global OpenCode config directory.
|
|
6
|
+
*
|
|
7
|
+
* Priority:
|
|
8
|
+
* 1. UX_TOOLKIT_CONFIG_DIR env var (explicit override)
|
|
9
|
+
* 2. OPENCODE_CONFIG_DIR env var (OpenCode convention)
|
|
10
|
+
* 3. Platform-specific defaults:
|
|
11
|
+
* - Linux: $XDG_CONFIG_HOME/opencode or ~/.config/opencode
|
|
12
|
+
* - macOS: ~/.config/opencode
|
|
13
|
+
* - Windows: ~/.config/opencode (matches OpenCode behavior)
|
|
14
|
+
*/
|
|
15
|
+
declare function getGlobalConfigDir(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Check if the OpenCode config directory exists.
|
|
18
|
+
* Useful for pre-flight checks before installation.
|
|
19
|
+
*/
|
|
20
|
+
declare function isOpenCodeInstalled(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Get the Claude Code config directory.
|
|
23
|
+
* Claude Code always uses ~/.claude/ on all platforms.
|
|
24
|
+
*/
|
|
25
|
+
declare function getClaudeConfigDir(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Check if Claude Code is installed.
|
|
28
|
+
*/
|
|
29
|
+
declare function isClaudeInstalled(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Supported installation targets
|
|
32
|
+
*/
|
|
33
|
+
type InstallTarget = 'opencode' | 'claude';
|
|
34
|
+
/**
|
|
35
|
+
* Get platform information for diagnostics
|
|
36
|
+
*/
|
|
37
|
+
declare function getPlatformInfo(): {
|
|
38
|
+
platform: string;
|
|
39
|
+
opencode: {
|
|
40
|
+
configDir: string;
|
|
41
|
+
exists: boolean;
|
|
42
|
+
};
|
|
43
|
+
claude: {
|
|
44
|
+
configDir: string;
|
|
45
|
+
exists: boolean;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
declare function getProjectConfigDir(projectRoot?: string, target?: InstallTarget): string;
|
|
49
|
+
interface DestinationPathsOptions {
|
|
50
|
+
global?: boolean;
|
|
51
|
+
projectRoot?: string;
|
|
52
|
+
target?: InstallTarget;
|
|
53
|
+
}
|
|
54
|
+
declare function getDestinationPaths(global: boolean, projectRoot?: string, target?: InstallTarget): {
|
|
55
|
+
skills: string;
|
|
56
|
+
agents: string;
|
|
57
|
+
commands: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
1
60
|
interface InstallOptions {
|
|
2
|
-
/** Install globally to
|
|
61
|
+
/** Install globally to config directory */
|
|
3
62
|
global?: boolean;
|
|
4
63
|
/** Project root for local installation */
|
|
5
64
|
projectRoot?: string;
|
|
65
|
+
/** Target platform: 'opencode' or 'claude' */
|
|
66
|
+
target?: InstallTarget;
|
|
6
67
|
/** Only install specific categories */
|
|
7
68
|
categories?: ('skills' | 'agents' | 'commands')[];
|
|
69
|
+
/** Specific skills to install (by name) */
|
|
70
|
+
skills?: string[];
|
|
71
|
+
/** Specific agents to install (by name) */
|
|
72
|
+
agents?: string[];
|
|
73
|
+
/** Specific commands to install (by name) */
|
|
74
|
+
commands?: string[];
|
|
8
75
|
/** Overwrite existing files */
|
|
9
76
|
force?: boolean;
|
|
10
77
|
/** Verbose output */
|
|
@@ -16,10 +83,54 @@ interface InstallResult {
|
|
|
16
83
|
errors: string[];
|
|
17
84
|
}
|
|
18
85
|
declare function install(options?: InstallOptions): Promise<InstallResult>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
86
|
+
interface ComponentStatus {
|
|
87
|
+
name: string;
|
|
88
|
+
installed: boolean;
|
|
89
|
+
path?: string;
|
|
90
|
+
modifiedAt?: Date;
|
|
91
|
+
}
|
|
92
|
+
interface CategoryStatus {
|
|
93
|
+
installed: number;
|
|
94
|
+
total: number;
|
|
95
|
+
components: ComponentStatus[];
|
|
96
|
+
}
|
|
97
|
+
interface TargetStatus {
|
|
98
|
+
target: InstallTarget;
|
|
99
|
+
available: boolean;
|
|
100
|
+
configDir: string;
|
|
101
|
+
skills: CategoryStatus;
|
|
102
|
+
agents: CategoryStatus;
|
|
103
|
+
commands: CategoryStatus;
|
|
104
|
+
}
|
|
105
|
+
interface StatusOptions {
|
|
106
|
+
/** Check global installation */
|
|
107
|
+
global?: boolean;
|
|
108
|
+
/** Project root for local check */
|
|
109
|
+
projectRoot?: string;
|
|
110
|
+
}
|
|
111
|
+
interface StatusResult {
|
|
112
|
+
opencode: TargetStatus;
|
|
113
|
+
claude: TargetStatus;
|
|
114
|
+
}
|
|
115
|
+
declare function getStatus(options?: StatusOptions): Promise<StatusResult>;
|
|
116
|
+
interface UninstallOptions {
|
|
117
|
+
/** Uninstall from global config directory */
|
|
118
|
+
global?: boolean;
|
|
119
|
+
/** Project root for local uninstallation */
|
|
120
|
+
projectRoot?: string;
|
|
121
|
+
/** Target platform: 'opencode' or 'claude' */
|
|
122
|
+
target?: InstallTarget;
|
|
123
|
+
/** Only uninstall specific categories */
|
|
124
|
+
categories?: ('skills' | 'agents' | 'commands')[];
|
|
125
|
+
/** Verbose output */
|
|
126
|
+
verbose?: boolean;
|
|
127
|
+
}
|
|
128
|
+
interface UninstallResult {
|
|
129
|
+
removed: string[];
|
|
130
|
+
notFound: string[];
|
|
131
|
+
errors: string[];
|
|
132
|
+
}
|
|
133
|
+
declare function uninstall(options?: UninstallOptions): Promise<UninstallResult>;
|
|
23
134
|
|
|
24
135
|
declare const SKILLS: readonly [{
|
|
25
136
|
readonly name: "ux-heuristics";
|
|
@@ -209,4 +320,4 @@ declare const COMMANDS: readonly [{
|
|
|
209
320
|
readonly description: "Visual review from screenshot";
|
|
210
321
|
}];
|
|
211
322
|
|
|
212
|
-
export { AGENTS, COMMANDS, type InstallOptions, SKILLS, getAgentPath, getCommandPath, getSkillPath, install };
|
|
323
|
+
export { AGENTS, COMMANDS, type CategoryStatus, type ComponentStatus, type DestinationPathsOptions, type InstallOptions, type InstallResult, type InstallTarget, SKILLS, type StatusOptions, type StatusResult, type TargetStatus, type UninstallOptions, type UninstallResult, getAgentPath, getClaudeConfigDir, getCommandPath, getDestinationPaths, getGlobalConfigDir, getPlatformInfo, getProjectConfigDir, getSkillPath, getStatus, install, isClaudeInstalled, isOpenCodeInstalled, uninstall };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,77 @@
|
|
|
1
|
+
declare function getSkillPath(skillName: string): string;
|
|
2
|
+
declare function getAgentPath(agentName: string): string;
|
|
3
|
+
declare function getCommandPath(commandName: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Get the global OpenCode config directory.
|
|
6
|
+
*
|
|
7
|
+
* Priority:
|
|
8
|
+
* 1. UX_TOOLKIT_CONFIG_DIR env var (explicit override)
|
|
9
|
+
* 2. OPENCODE_CONFIG_DIR env var (OpenCode convention)
|
|
10
|
+
* 3. Platform-specific defaults:
|
|
11
|
+
* - Linux: $XDG_CONFIG_HOME/opencode or ~/.config/opencode
|
|
12
|
+
* - macOS: ~/.config/opencode
|
|
13
|
+
* - Windows: ~/.config/opencode (matches OpenCode behavior)
|
|
14
|
+
*/
|
|
15
|
+
declare function getGlobalConfigDir(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Check if the OpenCode config directory exists.
|
|
18
|
+
* Useful for pre-flight checks before installation.
|
|
19
|
+
*/
|
|
20
|
+
declare function isOpenCodeInstalled(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Get the Claude Code config directory.
|
|
23
|
+
* Claude Code always uses ~/.claude/ on all platforms.
|
|
24
|
+
*/
|
|
25
|
+
declare function getClaudeConfigDir(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Check if Claude Code is installed.
|
|
28
|
+
*/
|
|
29
|
+
declare function isClaudeInstalled(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Supported installation targets
|
|
32
|
+
*/
|
|
33
|
+
type InstallTarget = 'opencode' | 'claude';
|
|
34
|
+
/**
|
|
35
|
+
* Get platform information for diagnostics
|
|
36
|
+
*/
|
|
37
|
+
declare function getPlatformInfo(): {
|
|
38
|
+
platform: string;
|
|
39
|
+
opencode: {
|
|
40
|
+
configDir: string;
|
|
41
|
+
exists: boolean;
|
|
42
|
+
};
|
|
43
|
+
claude: {
|
|
44
|
+
configDir: string;
|
|
45
|
+
exists: boolean;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
declare function getProjectConfigDir(projectRoot?: string, target?: InstallTarget): string;
|
|
49
|
+
interface DestinationPathsOptions {
|
|
50
|
+
global?: boolean;
|
|
51
|
+
projectRoot?: string;
|
|
52
|
+
target?: InstallTarget;
|
|
53
|
+
}
|
|
54
|
+
declare function getDestinationPaths(global: boolean, projectRoot?: string, target?: InstallTarget): {
|
|
55
|
+
skills: string;
|
|
56
|
+
agents: string;
|
|
57
|
+
commands: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
1
60
|
interface InstallOptions {
|
|
2
|
-
/** Install globally to
|
|
61
|
+
/** Install globally to config directory */
|
|
3
62
|
global?: boolean;
|
|
4
63
|
/** Project root for local installation */
|
|
5
64
|
projectRoot?: string;
|
|
65
|
+
/** Target platform: 'opencode' or 'claude' */
|
|
66
|
+
target?: InstallTarget;
|
|
6
67
|
/** Only install specific categories */
|
|
7
68
|
categories?: ('skills' | 'agents' | 'commands')[];
|
|
69
|
+
/** Specific skills to install (by name) */
|
|
70
|
+
skills?: string[];
|
|
71
|
+
/** Specific agents to install (by name) */
|
|
72
|
+
agents?: string[];
|
|
73
|
+
/** Specific commands to install (by name) */
|
|
74
|
+
commands?: string[];
|
|
8
75
|
/** Overwrite existing files */
|
|
9
76
|
force?: boolean;
|
|
10
77
|
/** Verbose output */
|
|
@@ -16,10 +83,54 @@ interface InstallResult {
|
|
|
16
83
|
errors: string[];
|
|
17
84
|
}
|
|
18
85
|
declare function install(options?: InstallOptions): Promise<InstallResult>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
86
|
+
interface ComponentStatus {
|
|
87
|
+
name: string;
|
|
88
|
+
installed: boolean;
|
|
89
|
+
path?: string;
|
|
90
|
+
modifiedAt?: Date;
|
|
91
|
+
}
|
|
92
|
+
interface CategoryStatus {
|
|
93
|
+
installed: number;
|
|
94
|
+
total: number;
|
|
95
|
+
components: ComponentStatus[];
|
|
96
|
+
}
|
|
97
|
+
interface TargetStatus {
|
|
98
|
+
target: InstallTarget;
|
|
99
|
+
available: boolean;
|
|
100
|
+
configDir: string;
|
|
101
|
+
skills: CategoryStatus;
|
|
102
|
+
agents: CategoryStatus;
|
|
103
|
+
commands: CategoryStatus;
|
|
104
|
+
}
|
|
105
|
+
interface StatusOptions {
|
|
106
|
+
/** Check global installation */
|
|
107
|
+
global?: boolean;
|
|
108
|
+
/** Project root for local check */
|
|
109
|
+
projectRoot?: string;
|
|
110
|
+
}
|
|
111
|
+
interface StatusResult {
|
|
112
|
+
opencode: TargetStatus;
|
|
113
|
+
claude: TargetStatus;
|
|
114
|
+
}
|
|
115
|
+
declare function getStatus(options?: StatusOptions): Promise<StatusResult>;
|
|
116
|
+
interface UninstallOptions {
|
|
117
|
+
/** Uninstall from global config directory */
|
|
118
|
+
global?: boolean;
|
|
119
|
+
/** Project root for local uninstallation */
|
|
120
|
+
projectRoot?: string;
|
|
121
|
+
/** Target platform: 'opencode' or 'claude' */
|
|
122
|
+
target?: InstallTarget;
|
|
123
|
+
/** Only uninstall specific categories */
|
|
124
|
+
categories?: ('skills' | 'agents' | 'commands')[];
|
|
125
|
+
/** Verbose output */
|
|
126
|
+
verbose?: boolean;
|
|
127
|
+
}
|
|
128
|
+
interface UninstallResult {
|
|
129
|
+
removed: string[];
|
|
130
|
+
notFound: string[];
|
|
131
|
+
errors: string[];
|
|
132
|
+
}
|
|
133
|
+
declare function uninstall(options?: UninstallOptions): Promise<UninstallResult>;
|
|
23
134
|
|
|
24
135
|
declare const SKILLS: readonly [{
|
|
25
136
|
readonly name: "ux-heuristics";
|
|
@@ -209,4 +320,4 @@ declare const COMMANDS: readonly [{
|
|
|
209
320
|
readonly description: "Visual review from screenshot";
|
|
210
321
|
}];
|
|
211
322
|
|
|
212
|
-
export { AGENTS, COMMANDS, type InstallOptions, SKILLS, getAgentPath, getCommandPath, getSkillPath, install };
|
|
323
|
+
export { AGENTS, COMMANDS, type CategoryStatus, type ComponentStatus, type DestinationPathsOptions, type InstallOptions, type InstallResult, type InstallTarget, SKILLS, type StatusOptions, type StatusResult, type TargetStatus, type UninstallOptions, type UninstallResult, getAgentPath, getClaudeConfigDir, getCommandPath, getDestinationPaths, getGlobalConfigDir, getPlatformInfo, getProjectConfigDir, getSkillPath, getStatus, install, isClaudeInstalled, isOpenCodeInstalled, uninstall };
|