@sysprompthub/cli 0.2.0 → 1.0.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/README.md CHANGED
@@ -12,90 +12,68 @@ npm install -g @sysprompthub/cli
12
12
 
13
13
  ## CLI Usage
14
14
 
15
- ### Sync Command
15
+ ### Init Command
16
16
 
17
- Sync a prompt pack to your project:
17
+ Initialize SysPromptHub configuration for your project:
18
18
 
19
19
  ```bash
20
- # Basic usage
21
- sysprompthub sync user/pack/latest
20
+ sysprompthub init
21
+ ```
22
22
 
23
- # Specify assistants
24
- sysprompthub sync user/pack/123 --copilot --claude
23
+ This interactive command will:
24
+ 1. Prompt for your API key (stored in `~/.sysprompthub/config.json`)
25
+ 2. Let you search and select a prompt pack
26
+ 3. Let you select your AI assistants (Copilot, Claude, or custom path)
27
+ 4. Save workspace configuration to `.sysprompthub.json`
25
28
 
26
- # Output to stdout instead of writing files
27
- sysprompthub sync user/pack/latest --stdout
29
+ ### Sync Command
28
30
 
29
- # Use custom API URL
30
- sysprompthub sync user/pack/latest --api-url https://api.custom.com
31
+ Sync prompts from your configured pack:
31
32
 
32
- # Use custom working directory
33
- sysprompthub sync user/pack/latest --cwd /path/to/project
33
+ ```bash
34
+ sysprompthub sync
34
35
  ```
35
36
 
36
- ### Init Command
37
+ Options:
38
+ - `-e, --environment <ENV>` - API environment to use (local, development, staging, production)
37
39
 
38
- Create a `.sysprompthub.json` configuration file:
40
+ ### Configuration
39
41
 
40
- ```bash
41
- # Interactive setup
42
- sysprompthub init
43
-
44
- # With options
45
- sysprompthub init --pack user/pack/latest --copilot --claude
42
+ #### User-level Config (`~/.sysprompthub/config.json`)
43
+ Stores your API key:
44
+ ```json
45
+ {
46
+ "apiKey": "your-40-character-api-key"
47
+ }
46
48
  ```
47
49
 
48
- ### Configuration File
49
-
50
- Create a `.sysprompthub.json` file in your project root:
51
-
50
+ #### Workspace-level Config (`.sysprompthub.json`)
51
+ Stores project-specific settings:
52
52
  ```json
53
53
  {
54
- "packName": "user/pack/latest",
54
+ "packName": "owner/pack/latest",
55
55
  "assistants": ["copilot", "claude"],
56
- "apiUrl": "https://api-dev.sysprompthub.com"
56
+ "environment": "production"
57
57
  }
58
58
  ```
59
59
 
60
- When a config file exists, you can run `sysprompthub sync` without arguments.
61
-
62
- ## SDK Usage
63
-
64
- For programmatic usage in your Node.js applications, use the [@sysprompthub/sdk](../nodejs_sdk) package:
65
-
66
- ```bash
67
- npm install @sysprompthub/sdk
60
+ You can also use a custom path instead of assistants:
61
+ ```json
62
+ {
63
+ "packName": "owner/pack/latest",
64
+ "path": "prompts/system-prompt.md"
65
+ }
68
66
  ```
69
67
 
70
- See the [SDK documentation](../nodejs_sdk/README.md) for API details.
68
+ ## Workflow
71
69
 
72
- ## Development
70
+ 1. **First time setup**: Run `sysprompthub init` to configure your API key and project
71
+ 2. **Sync prompts**: Run `sysprompthub sync` to download and install prompts
72
+ 3. **Update**: Run `sysprompthub init` again to change configuration
73
73
 
74
- ```bash
75
- # Install dependencies
76
- pnpm install
74
+ ## Contributing
77
75
 
78
- # Build
79
- pnpm run build
80
-
81
- # Type check
82
- pnpm run typecheck
83
-
84
- # Run CLI in development
85
- pnpm run dev -- sync user/pack/latest
86
-
87
- # Run tests
88
- pnpm test
89
-
90
- # Run tests in watch mode
91
- pnpm test:watch
92
-
93
- # Run tests with coverage
94
- pnpm test:coverage
95
-
96
- # Run tests with UI
97
- pnpm test:ui
98
- ```
76
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for development instructions.
99
77
 
100
78
  ## License
101
79
 
@@ -0,0 +1,6 @@
1
+ import { Option } from "commander";
2
+ export class BaseCommand {
3
+ static envOption = new Option('-e, --environment [env]')
4
+ .choices(['production', 'development', 'local'])
5
+ .env('SYSPROMPTHUB_ENVIRONMENT');
6
+ }
@@ -1,56 +1,184 @@
1
+ import { checkbox, confirm, input, search } from '@inquirer/prompts';
1
2
  import { Command } from 'commander';
2
- import { CONFIG_FILE_NAME, VscodeConfigManager, ConfigManager, NodeFileSystem } from '@sysprompthub/sdk';
3
- function getAssistants(copilot, claude) {
4
- const assistants = [];
5
- if (copilot)
6
- assistants.push('copilot');
7
- if (claude)
8
- assistants.push('claude');
9
- return assistants.length > 0 ? assistants : ['copilot'];
10
- }
11
- export function createInitCommand() {
12
- const command = new Command('init');
13
- command
14
- .description('Initialize a .sysprompthub.json config file')
15
- .option('--pack <name>', 'Prompt pack name')
16
- .option('--copilot', 'Enable GitHub Copilot', false)
17
- .option('--claude', 'Enable Claude', false)
18
- .option('--environment <env>', 'Environment (local or development)', 'development')
19
- .option('--vscode', 'Create .vscode/settings.json instead of .sysprompthub.json', false)
20
- .option('--cwd <dir>', 'Working directory', process.cwd())
21
- .action(async (options) => {
22
- try {
23
- const fs = new NodeFileSystem(options.cwd);
24
- const config = {
25
- packName: options.pack,
26
- assistants: getAssistants(options.copilot, options.claude),
27
- environment: options.environment
28
- };
29
- if (options.vscode) {
30
- const vscodeManager = new VscodeConfigManager();
31
- await vscodeManager.update(fs, config);
32
- const serialized = await vscodeManager.serialize(config, fs);
33
- console.log(`✓ Created .vscode/settings.json`);
34
- console.log(serialized);
3
+ import { API_KEY_LENGTH, AssistantManager, DefaultConfigManager, NodeFileSystem, SysPromptHubClient, UserConfigManager } from '@sysprompthub/sdk';
4
+ import { isAbsolute } from 'path';
5
+ import isValidPath from 'is-valid-path';
6
+ import open from 'open';
7
+ import { BaseCommand } from "./base-command.js";
8
+ export class InitCommand extends BaseCommand {
9
+ fs = new NodeFileSystem();
10
+ workspaceConfigManager = new DefaultConfigManager();
11
+ userConfigManager = new UserConfigManager();
12
+ async run({ environment }) {
13
+ console.log('Welcome to SysPromptHub! Let\'s configure your project.\n');
14
+ // Load existing configs
15
+ const existingUserConfig = await this.userConfigManager.load(this.fs);
16
+ const existingWorkspaceConfig = await this.workspaceConfigManager.load(this.fs) || {};
17
+ // Step 1: API Key (user-level)
18
+ const apiKey = await this.promptForApiKey(existingUserConfig?.apiKey);
19
+ await this.userConfigManager.save(this.fs, { apiKey });
20
+ // Environment
21
+ let workspaceConfig = { ...existingWorkspaceConfig };
22
+ if (environment)
23
+ workspaceConfig.environment = environment;
24
+ // console.info('env', environment, 'ws', workspaceConfig);
25
+ // Step 2: Pack Name (workspace-level)
26
+ const client = new SysPromptHubClient(apiKey, workspaceConfig.environment);
27
+ workspaceConfig.packName = await this.promptForPackName(client, workspaceConfig.packName);
28
+ // Step 3: Assistants (workspace-level)
29
+ workspaceConfig.assistants = await this.promptForAssistants(workspaceConfig.assistants);
30
+ // Step 4: Custom Path (workspace-level, if no assistants selected)
31
+ if (!workspaceConfig.assistants || workspaceConfig.assistants.length === 0) {
32
+ workspaceConfig.path = await this.promptForCustomPath(workspaceConfig.path);
33
+ }
34
+ // Save workspace configuration
35
+ await this.workspaceConfigManager.update(this.fs, workspaceConfig);
36
+ console.log('\n✓ User config saved to ~/.sysprompthub/config.json');
37
+ console.log('✓ Project config saved to .sysprompthub.json');
38
+ console.log('Run "sysprompthub sync" to download your prompts.\n');
39
+ }
40
+ async promptForApiKey(existing) {
41
+ const apiKey = await input({
42
+ message: 'Enter your API key (' + (existing ? 'leave blank to keep existing' : 'leave blank to create one') + '):',
43
+ validate: (value) => {
44
+ if (value.length === 0)
45
+ return true;
46
+ if (value.length !== API_KEY_LENGTH)
47
+ return `API key must be ${API_KEY_LENGTH} characters`;
48
+ return true;
35
49
  }
36
- else {
37
- const configManager = new ConfigManager();
38
- await configManager.update(fs, config);
39
- const serialized = await configManager.serialize(config, fs);
40
- console.log(`✓ Created ${CONFIG_FILE_NAME}`);
41
- console.log(serialized);
50
+ });
51
+ if (apiKey.length === 0 && existing) {
52
+ return existing;
53
+ }
54
+ if (apiKey.length === 0) {
55
+ console.log('\nTo create an API key:');
56
+ console.log('1. Visit https://app.sysprompthub.com/api-keys');
57
+ console.log('2. Create a new API key');
58
+ console.log('3. Copy the key and return here\n');
59
+ const shouldOpen = await confirm({
60
+ message: 'Open your browser now?',
61
+ default: true
62
+ });
63
+ if (shouldOpen) {
64
+ await open('https://app.sysprompthub.com/api-keys');
42
65
  }
66
+ return this.promptForApiKey(existing);
43
67
  }
44
- catch (error) {
45
- if (error instanceof Error) {
46
- console.error(`Error: ${error.message}`);
68
+ return apiKey;
69
+ }
70
+ async promptForPackName(client, existing) {
71
+ if (existing) {
72
+ const keepExisting = await confirm({
73
+ message: `Keep existing pack "${existing}"?`,
74
+ default: true
75
+ });
76
+ if (keepExisting) {
77
+ return existing;
47
78
  }
48
- else {
49
- console.error('An unknown error occurred');
79
+ }
80
+ const searchResults = await search({
81
+ message: 'Select a pack:',
82
+ source: async (term) => {
83
+ if (!term || term.length < 2) {
84
+ return [];
85
+ }
86
+ try {
87
+ const results = await client.searchPacks(term);
88
+ const choices = [];
89
+ for (const result of results) {
90
+ console.info(`Found pack "${JSON.stringify(result)}"`);
91
+ const baseDescription = `Current version: ${result.version}`;
92
+ // Option 1: /latest
93
+ choices.push({
94
+ name: `${result.name}/latest`,
95
+ value: `${result.name}/latest`,
96
+ description: `${baseDescription} (always use latest)`
97
+ });
98
+ // Option 2: /current_version
99
+ choices.push({
100
+ name: `${result.name}/${result.version}`,
101
+ value: `${result.name}/${result.version}`,
102
+ description: `${baseDescription} (pin to current)`
103
+ });
104
+ // Option 3: Custom version
105
+ choices.push({
106
+ name: `${result.name}/[custom version]`,
107
+ value: `custom:${result.name}:${result.version}`,
108
+ description: `${baseDescription} (enter specific version)`
109
+ });
110
+ }
111
+ return choices;
112
+ }
113
+ catch (error) {
114
+ console.error('Error searching for packs:', error);
115
+ return [];
116
+ }
50
117
  }
51
- process.exit(1);
118
+ });
119
+ // Handle custom version selection
120
+ if (searchResults.startsWith('custom:')) {
121
+ const [, fullName, maxVersionStr] = searchResults.split(':');
122
+ const maxVersion = parseInt(maxVersionStr, 10);
123
+ const customVersion = await input({
124
+ message: `Enter version number for ${fullName} (1-${maxVersion}):`,
125
+ validate: (value) => {
126
+ if (!value) {
127
+ return 'Version is required';
128
+ }
129
+ if (!SysPromptHubClient.validateVersion(value, maxVersion)) {
130
+ return `Version must be between 1 and ${maxVersion}`;
131
+ }
132
+ return true;
133
+ }
134
+ });
135
+ return `${fullName}/${customVersion}`;
52
136
  }
53
- });
54
- return command;
137
+ return searchResults;
138
+ }
139
+ async promptForAssistants(existing) {
140
+ const am = new AssistantManager();
141
+ const choices = [];
142
+ am.forEach((assistant) => {
143
+ choices.push({
144
+ value: assistant.type,
145
+ name: assistant.type,
146
+ checked: existing?.includes(assistant.type) || assistant.type === 'copilot'
147
+ });
148
+ });
149
+ choices.push({
150
+ value: 'other',
151
+ name: 'Other (custom path)',
152
+ checked: existing?.includes('other')
153
+ });
154
+ const selected = await checkbox({
155
+ message: 'Select your coding assistants:',
156
+ choices
157
+ });
158
+ return selected.filter((s) => s !== 'other');
159
+ }
160
+ async promptForCustomPath(existing) {
161
+ const path = await input({
162
+ message: 'Enter the location where you want to save the prompt:',
163
+ default: existing,
164
+ validate: (value) => {
165
+ if (value.length === 0)
166
+ return true;
167
+ if (isAbsolute(value))
168
+ return 'Path must be relative to the current working directory';
169
+ if (!isValidPath(value))
170
+ return 'Please enter a valid path';
171
+ return true;
172
+ }
173
+ });
174
+ return path.length > 0 ? path : undefined;
175
+ }
176
+ create() {
177
+ const command = new Command('init');
178
+ command
179
+ .description('Initialize project system prompt configuration')
180
+ .addOption(InitCommand.envOption)
181
+ .action(async (env) => await this.run(env));
182
+ return command;
183
+ }
55
184
  }
56
- //# sourceMappingURL=init.js.map
@@ -0,0 +1,161 @@
1
+ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
2
+ import { InitCommand } from './init.js';
3
+ vi.mock('@inquirer/prompts', () => ({
4
+ input: vi.fn(),
5
+ search: vi.fn(),
6
+ checkbox: vi.fn(),
7
+ confirm: vi.fn()
8
+ }));
9
+ vi.mock('open', () => ({
10
+ default: vi.fn()
11
+ }));
12
+ vi.mock('@sysprompthub/sdk', () => {
13
+ const mockFs = {
14
+ exists: vi.fn(),
15
+ read: vi.fn(),
16
+ write: vi.fn(),
17
+ createDir: vi.fn()
18
+ };
19
+ const mockWorkspaceConfig = {
20
+ load: vi.fn(),
21
+ update: vi.fn()
22
+ };
23
+ const mockUserConfig = {
24
+ load: vi.fn(),
25
+ save: vi.fn()
26
+ };
27
+ const mockClient = {
28
+ searchPacks: vi.fn()
29
+ };
30
+ const mockAssistantManager = {
31
+ forEach: vi.fn()
32
+ };
33
+ return {
34
+ NodeFileSystem: class {
35
+ exists = mockFs.exists;
36
+ read = mockFs.read;
37
+ write = mockFs.write;
38
+ createDir = mockFs.createDir;
39
+ },
40
+ DefaultConfigManager: class {
41
+ load = mockWorkspaceConfig.load;
42
+ update = mockWorkspaceConfig.update;
43
+ },
44
+ UserConfigManager: class {
45
+ load = mockUserConfig.load;
46
+ save = mockUserConfig.save;
47
+ },
48
+ SysPromptHubClient: class {
49
+ searchPacks = mockClient.searchPacks;
50
+ },
51
+ AssistantManager: class {
52
+ forEach = mockAssistantManager.forEach;
53
+ },
54
+ API_KEY_LENGTH: 40,
55
+ __mocks: {
56
+ mockFs,
57
+ mockWorkspaceConfig,
58
+ mockUserConfig,
59
+ mockClient,
60
+ mockAssistantManager
61
+ }
62
+ };
63
+ });
64
+ describe('InitCommand', () => {
65
+ let initCommand;
66
+ let consoleLogSpy;
67
+ let mocks;
68
+ let promptMocks;
69
+ let openMock;
70
+ beforeEach(async () => {
71
+ const sdk = await import('@sysprompthub/sdk');
72
+ const prompts = await import('@inquirer/prompts');
73
+ const open = await import('open');
74
+ mocks = sdk.__mocks;
75
+ promptMocks = {
76
+ input: vi.mocked(prompts.input),
77
+ search: vi.mocked(prompts.search),
78
+ checkbox: vi.mocked(prompts.checkbox),
79
+ confirm: vi.mocked(prompts.confirm)
80
+ };
81
+ openMock = vi.mocked(open.default);
82
+ vi.clearAllMocks();
83
+ mocks.mockFs.exists.mockReset().mockResolvedValue(false);
84
+ mocks.mockFs.read.mockReset();
85
+ mocks.mockFs.write.mockReset();
86
+ mocks.mockFs.createDir.mockReset();
87
+ mocks.mockWorkspaceConfig.load.mockReset().mockResolvedValue(null);
88
+ mocks.mockWorkspaceConfig.update.mockReset();
89
+ mocks.mockUserConfig.load.mockReset().mockResolvedValue(null);
90
+ mocks.mockUserConfig.save.mockReset();
91
+ mocks.mockClient.searchPacks.mockReset().mockResolvedValue([]);
92
+ mocks.mockAssistantManager.forEach.mockReset().mockImplementation((cb) => {
93
+ cb({ type: 'copilot' });
94
+ cb({ type: 'claude' });
95
+ });
96
+ promptMocks.input.mockReset();
97
+ promptMocks.search.mockReset();
98
+ promptMocks.checkbox.mockReset();
99
+ promptMocks.confirm.mockReset();
100
+ openMock.mockReset();
101
+ consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
102
+ initCommand = new InitCommand();
103
+ });
104
+ afterEach(() => {
105
+ consoleLogSpy.mockRestore();
106
+ });
107
+ describe('create', () => {
108
+ it('should create a Command with correct configuration', () => {
109
+ const command = initCommand.create();
110
+ expect(command.name()).toBe('init');
111
+ expect(command.description()).toBe('Initialize project system prompt configuration');
112
+ });
113
+ });
114
+ describe('run', () => {
115
+ it('should prompt for API key, pack name, and assistants', async () => {
116
+ promptMocks.input.mockResolvedValue('a'.repeat(40));
117
+ promptMocks.search.mockResolvedValue('owner/pack/latest');
118
+ promptMocks.checkbox.mockResolvedValue(['copilot']);
119
+ await initCommand.run({});
120
+ expect(promptMocks.input).toHaveBeenCalled();
121
+ expect(promptMocks.search).toHaveBeenCalled();
122
+ expect(promptMocks.checkbox).toHaveBeenCalled();
123
+ expect(mocks.mockUserConfig.save).toHaveBeenCalledWith(expect.any(Object), { apiKey: 'a'.repeat(40) });
124
+ expect(mocks.mockWorkspaceConfig.update).toHaveBeenCalledWith(expect.any(Object), expect.objectContaining({
125
+ packName: 'owner/pack/latest',
126
+ assistants: ['copilot']
127
+ }));
128
+ });
129
+ it('should keep existing API key if blank entered', async () => {
130
+ mocks.mockUserConfig.load.mockResolvedValue({ apiKey: 'existing'.padEnd(40, 'x') });
131
+ promptMocks.input.mockResolvedValueOnce(''); // API key blank
132
+ promptMocks.search.mockResolvedValue('owner/pack/latest');
133
+ promptMocks.checkbox.mockResolvedValue(['copilot']);
134
+ await initCommand.run({});
135
+ expect(mocks.mockUserConfig.save).toHaveBeenCalledWith(expect.any(Object), { apiKey: 'existing'.padEnd(40, 'x') });
136
+ });
137
+ it('should prompt for custom path when no assistants selected', async () => {
138
+ promptMocks.input.mockResolvedValueOnce('a'.repeat(40)); // API key
139
+ promptMocks.input.mockResolvedValueOnce('custom/path'); // custom path
140
+ promptMocks.search.mockResolvedValue('owner/pack/latest');
141
+ promptMocks.checkbox.mockResolvedValue([]);
142
+ await initCommand.run({});
143
+ expect(mocks.mockWorkspaceConfig.update).toHaveBeenCalledWith(expect.any(Object), expect.objectContaining({
144
+ path: 'custom/path'
145
+ }));
146
+ });
147
+ it('should not set path when blank entered for custom path', async () => {
148
+ promptMocks.input.mockResolvedValueOnce('a'.repeat(40)); // API key
149
+ promptMocks.input.mockResolvedValueOnce(''); // blank custom path
150
+ promptMocks.search.mockResolvedValue('owner/pack/latest');
151
+ promptMocks.checkbox.mockResolvedValue([]);
152
+ await initCommand.run({});
153
+ expect(mocks.mockWorkspaceConfig.update).toHaveBeenCalledWith(expect.any(Object), expect.objectContaining({
154
+ packName: 'owner/pack/latest',
155
+ assistants: []
156
+ }));
157
+ const updateCall = mocks.mockWorkspaceConfig.update.mock.calls[0][1];
158
+ expect(updateCall.path).toBeUndefined();
159
+ });
160
+ });
161
+ });
@@ -1,67 +1,44 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SyncCommand = void 0;
4
- const commander_1 = require("commander");
5
- const sdk_1 = require("@sysprompthub/sdk");
6
- const path_1 = require("path");
7
- class SyncCommand {
8
- fs = new sdk_1.NodeFileSystem();
9
- defaultConfig = new sdk_1.DefaultConfigManager();
10
- vscodeConfig = new sdk_1.VscodeConfigManager();
11
- configManager = null;
12
- config;
13
- async run(packArg, options) {
14
- await this.updateConfig(packArg, options);
15
- const syncManager = new sdk_1.SyncManager();
16
- await syncManager.sync({ config: this.config, fs: this.fs });
17
- }
18
- async updateConfig(packArg, { copilot, claude, path, vscode, environment }) {
19
- this.configManager = (vscode || await this.useVscode()) ? this.vscodeConfig : this.defaultConfig;
20
- this.config = await this.configManager.load(this.fs) || {};
21
- if (packArg)
22
- this.config.packName = packArg;
23
- if (!this.config.packName) {
24
- console.error('Error: Pack name is required. Provide it as an argument or in .sysprompthub.json');
1
+ import { Command } from 'commander';
2
+ import { DefaultConfigManager, NodeFileSystem, SyncManager, UserConfigManager } from '@sysprompthub/sdk';
3
+ import { BaseCommand } from "./base-command.js";
4
+ export class SyncCommand extends BaseCommand {
5
+ fs = new NodeFileSystem();
6
+ workspaceConfig = new DefaultConfigManager();
7
+ userConfig = new UserConfigManager();
8
+ async run(_options) {
9
+ // Load user-level config (API key)
10
+ const userCfg = await this.userConfig.load(this.fs);
11
+ if (!userCfg?.apiKey) {
12
+ console.error('Error: API key not configured. Run "sysprompthub init" to configure.');
25
13
  process.exit(1);
14
+ return;
26
15
  }
27
- if (!sdk_1.SysPromptHubClient.validatePackName(this.config.packName)) {
28
- console.error('Error: Invalid pack name format. Expected: user/pack/version (e.g., example-user/example-pack/latest)');
16
+ // Load workspace-level config (pack name, assistants, path)
17
+ const workspaceCfg = await this.workspaceConfig.load(this.fs);
18
+ if (!workspaceCfg) {
19
+ console.error('Error: No workspace configuration found. Run "sysprompthub init" first.');
29
20
  process.exit(1);
21
+ return;
30
22
  }
31
- if (copilot || claude) {
32
- this.config.assistants = [];
33
- if (copilot)
34
- this.config.assistants.push('copilot');
35
- if (claude)
36
- this.config.assistants.push('claude');
37
- }
38
- if (path)
39
- this.config.path = path;
40
- if (this.config.path && (0, path_1.isAbsolute)(this.config.path)) {
41
- console.error('Error: Path must be relative to the current working directory');
23
+ if (!workspaceCfg.packName) {
24
+ console.error('Error: Pack name not configured. Run "sysprompthub init" to configure.');
42
25
  process.exit(1);
26
+ return;
43
27
  }
44
- if (environment)
45
- this.config.environment = environment;
46
- if (packArg || copilot || claude || path || environment) {
47
- this.configManager.update(this.fs, this.config);
48
- }
49
- }
50
- async useVscode() {
51
- return await this.vscodeConfig.exists(this.fs);
28
+ // Combine configs
29
+ const config = {
30
+ ...workspaceCfg,
31
+ apiKey: userCfg.apiKey
32
+ };
33
+ const syncManager = new SyncManager();
34
+ await syncManager.sync({ config, fs: this.fs });
35
+ console.log('✓ Sync complete');
52
36
  }
53
37
  create() {
54
- const command = new commander_1.Command('sync');
38
+ const command = new Command('sync');
55
39
  command
56
40
  .description('Sync system prompts from SysPromptHub')
57
- .argument('[pack]', 'Prompt pack name in format user/pack/version')
58
- .option('--copilot', 'Enable GitHub Copilot')
59
- .option('--claude', 'Enable Claude')
60
- .option('--path <PATH>', 'Output to a custom path')
61
- .option('--vscode', 'Use .vscode/settings.json instead of .sysprompthub.json', false)
62
- .option('-e, --environment <ENV>', '')
63
- .action(async (pack, options) => await this.run(pack, options));
41
+ .action(async (options) => await this.run(options));
64
42
  return command;
65
43
  }
66
44
  }
67
- exports.SyncCommand = SyncCommand;
@@ -1,58 +1,21 @@
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
- const vitest_1 = require("vitest");
37
- const sync_js_1 = require("./sync.js");
38
- vitest_1.vi.mock('@sysprompthub/sdk', () => {
1
+ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
2
+ import { SyncCommand } from './sync.js';
3
+ vi.mock('@sysprompthub/sdk', () => {
39
4
  const mockFs = {
40
- readFile: vitest_1.vi.fn(),
41
- writeFile: vitest_1.vi.fn(),
42
- exists: vitest_1.vi.fn()
5
+ readFile: vi.fn(),
6
+ writeFile: vi.fn(),
7
+ exists: vi.fn()
43
8
  };
44
- const mockDefaultConfig = {
45
- load: vitest_1.vi.fn(),
46
- update: vitest_1.vi.fn(),
47
- exists: vitest_1.vi.fn()
9
+ const mockWorkspaceConfig = {
10
+ load: vi.fn(),
11
+ update: vi.fn()
48
12
  };
49
- const mockVscodeConfig = {
50
- load: vitest_1.vi.fn(),
51
- update: vitest_1.vi.fn(),
52
- exists: vitest_1.vi.fn()
13
+ const mockUserConfig = {
14
+ load: vi.fn(),
15
+ save: vi.fn()
53
16
  };
54
17
  const mockSyncManager = {
55
- sync: vitest_1.vi.fn()
18
+ sync: vi.fn()
56
19
  };
57
20
  return {
58
21
  SyncManager: class {
@@ -64,202 +27,108 @@ vitest_1.vi.mock('@sysprompthub/sdk', () => {
64
27
  exists = mockFs.exists;
65
28
  },
66
29
  DefaultConfigManager: class {
67
- load = mockDefaultConfig.load;
68
- update = mockDefaultConfig.update;
69
- exists = mockDefaultConfig.exists;
30
+ load = mockWorkspaceConfig.load;
31
+ update = mockWorkspaceConfig.update;
70
32
  },
71
- VscodeConfigManager: class {
72
- load = mockVscodeConfig.load;
73
- update = mockVscodeConfig.update;
74
- exists = mockVscodeConfig.exists;
75
- },
76
- SysPromptHubClient: {
77
- validatePackName: vitest_1.vi.fn()
33
+ UserConfigManager: class {
34
+ load = mockUserConfig.load;
35
+ save = mockUserConfig.save;
78
36
  },
79
37
  // Export mocks so tests can access them
80
38
  __mocks: {
81
39
  mockFs,
82
- mockDefaultConfig,
83
- mockVscodeConfig,
40
+ mockWorkspaceConfig,
41
+ mockUserConfig,
84
42
  mockSyncManager
85
43
  }
86
44
  };
87
45
  });
88
- (0, vitest_1.describe)('SyncCommand', () => {
46
+ describe('SyncCommand', () => {
89
47
  let syncCommand;
90
48
  let consoleErrorSpy;
49
+ let consoleLogSpy;
91
50
  let processExitSpy;
92
51
  let mocks;
93
- (0, vitest_1.beforeEach)(async () => {
94
- const sdk = await Promise.resolve().then(() => __importStar(require('@sysprompthub/sdk')));
52
+ beforeEach(async () => {
53
+ const sdk = await import('@sysprompthub/sdk');
95
54
  mocks = sdk.__mocks;
96
- vitest_1.vi.clearAllMocks();
55
+ vi.clearAllMocks();
97
56
  mocks.mockFs.readFile.mockReset();
98
57
  mocks.mockFs.writeFile.mockReset();
99
58
  mocks.mockFs.exists.mockReset();
100
- mocks.mockDefaultConfig.load.mockReset().mockResolvedValue({});
101
- mocks.mockDefaultConfig.update.mockReset();
102
- mocks.mockDefaultConfig.exists.mockReset();
103
- mocks.mockVscodeConfig.load.mockReset().mockResolvedValue({});
104
- mocks.mockVscodeConfig.update.mockReset();
105
- mocks.mockVscodeConfig.exists.mockReset().mockResolvedValue(false);
59
+ mocks.mockWorkspaceConfig.load.mockReset().mockResolvedValue({
60
+ packName: 'user/pack/latest',
61
+ assistants: ['copilot']
62
+ });
63
+ mocks.mockWorkspaceConfig.update.mockReset();
64
+ mocks.mockUserConfig.load.mockReset().mockResolvedValue({
65
+ apiKey: 'a'.repeat(40)
66
+ });
67
+ mocks.mockUserConfig.save.mockReset();
106
68
  mocks.mockSyncManager.sync.mockReset().mockResolvedValue(undefined);
107
- vitest_1.vi.mocked(sdk.SysPromptHubClient.validatePackName).mockReset().mockReturnValue(true);
108
- consoleErrorSpy = vitest_1.vi.spyOn(console, 'error').mockImplementation(() => { });
109
- processExitSpy = vitest_1.vi.spyOn(process, 'exit').mockImplementation(() => undefined);
110
- syncCommand = new sync_js_1.SyncCommand();
69
+ consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => { });
70
+ consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
71
+ processExitSpy = vi.spyOn(process, 'exit').mockImplementation(() => undefined);
72
+ syncCommand = new SyncCommand();
111
73
  });
112
- (0, vitest_1.afterEach)(() => {
74
+ afterEach(() => {
113
75
  consoleErrorSpy.mockRestore();
76
+ consoleLogSpy.mockRestore();
114
77
  processExitSpy.mockRestore();
115
78
  });
116
- (0, vitest_1.describe)('create', () => {
117
- (0, vitest_1.it)('should create a Command with correct configuration', () => {
79
+ describe('create', () => {
80
+ it('should create a Command with correct configuration', () => {
118
81
  const command = syncCommand.create();
119
- (0, vitest_1.expect)(command.name()).toBe('sync');
120
- (0, vitest_1.expect)(command.description()).toBe('Sync system prompts from SysPromptHub');
82
+ expect(command.name()).toBe('sync');
83
+ expect(command.description()).toBe('Sync system prompts from SysPromptHub');
121
84
  });
122
85
  });
123
- (0, vitest_1.describe)('run', () => {
124
- (0, vitest_1.beforeEach)(async () => {
125
- const sdk = await Promise.resolve().then(() => __importStar(require('@sysprompthub/sdk')));
126
- mocks.mockDefaultConfig.load.mockResolvedValue({
127
- packName: 'user/pack/latest'
128
- });
129
- vitest_1.vi.mocked(sdk.SysPromptHubClient.validatePackName).mockReturnValue(true);
130
- });
131
- (0, vitest_1.it)('should sync with pack name from argument', async () => {
132
- await syncCommand.run('user/pack/v1', { vscode: false });
133
- (0, vitest_1.expect)(mocks.mockSyncManager.sync).toHaveBeenCalledWith({
134
- config: vitest_1.expect.objectContaining({ packName: 'user/pack/v1' }),
135
- fs: vitest_1.expect.any(Object)
86
+ describe('run', () => {
87
+ it('should sync with valid configs', async () => {
88
+ await syncCommand.run({});
89
+ expect(mocks.mockUserConfig.load).toHaveBeenCalled();
90
+ expect(mocks.mockWorkspaceConfig.load).toHaveBeenCalled();
91
+ expect(mocks.mockSyncManager.sync).toHaveBeenCalledWith({
92
+ config: expect.objectContaining({
93
+ packName: 'user/pack/latest',
94
+ apiKey: 'a'.repeat(40)
95
+ }),
96
+ fs: expect.any(Object)
136
97
  });
137
- });
138
- (0, vitest_1.it)('should sync with pack name from config', async () => {
139
- mocks.mockDefaultConfig.load.mockResolvedValue({
140
- packName: 'user/pack/latest'
141
- });
142
- await syncCommand.run(undefined, { vscode: false });
143
- (0, vitest_1.expect)(mocks.mockSyncManager.sync).toHaveBeenCalledWith({
144
- config: vitest_1.expect.objectContaining({ packName: 'user/pack/latest' }),
145
- fs: vitest_1.expect.any(Object)
146
- });
147
- });
148
- (0, vitest_1.it)('should exit with error if no pack name provided', async () => {
149
- mocks.mockDefaultConfig.load.mockResolvedValue({});
150
- await syncCommand.run(undefined, { vscode: false });
151
- (0, vitest_1.expect)(consoleErrorSpy).toHaveBeenCalledWith('Error: Pack name is required. Provide it as an argument or in .sysprompthub.json');
152
- (0, vitest_1.expect)(processExitSpy).toHaveBeenCalledWith(1);
153
- });
154
- (0, vitest_1.it)('should exit with error if pack name is invalid', async () => {
155
- const sdk = await Promise.resolve().then(() => __importStar(require('@sysprompthub/sdk')));
156
- vitest_1.vi.mocked(sdk.SysPromptHubClient.validatePackName).mockReturnValue(false);
157
- await syncCommand.run('invalid-pack', { vscode: false });
158
- (0, vitest_1.expect)(consoleErrorSpy).toHaveBeenCalledWith('Error: Invalid pack name format. Expected: user/pack/version (e.g., example-user/example-pack/latest)');
159
- (0, vitest_1.expect)(processExitSpy).toHaveBeenCalledWith(1);
160
- });
161
- (0, vitest_1.it)('should update assistants when copilot option is provided', async () => {
162
- mocks.mockDefaultConfig.load.mockResolvedValue({
163
- packName: 'user/pack/latest'
164
- });
165
- await syncCommand.run(undefined, { copilot: true, vscode: false });
166
- (0, vitest_1.expect)(mocks.mockDefaultConfig.update).toHaveBeenCalledWith(vitest_1.expect.any(Object), vitest_1.expect.objectContaining({
98
+ expect(consoleLogSpy).toHaveBeenCalledWith('✓ Sync complete');
99
+ });
100
+ it('should exit with error if API key not configured', async () => {
101
+ mocks.mockUserConfig.load.mockResolvedValue(null);
102
+ await syncCommand.run({});
103
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error: API key not configured. Run "sysprompthub init" to configure.');
104
+ expect(processExitSpy).toHaveBeenCalledWith(1);
105
+ });
106
+ it('should exit with error if no workspace configuration found', async () => {
107
+ mocks.mockWorkspaceConfig.load.mockResolvedValue(null);
108
+ await syncCommand.run({});
109
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error: No workspace configuration found. Run "sysprompthub init" first.');
110
+ expect(processExitSpy).toHaveBeenCalledWith(1);
111
+ });
112
+ it('should exit with error if pack name not configured', async () => {
113
+ mocks.mockWorkspaceConfig.load.mockResolvedValue({
167
114
  assistants: ['copilot']
168
- }));
169
- });
170
- (0, vitest_1.it)('should update assistants when claude option is provided', async () => {
171
- mocks.mockDefaultConfig.load.mockResolvedValue({
172
- packName: 'user/pack/latest'
173
- });
174
- await syncCommand.run(undefined, { claude: true, vscode: false });
175
- (0, vitest_1.expect)(mocks.mockDefaultConfig.update).toHaveBeenCalledWith(vitest_1.expect.any(Object), vitest_1.expect.objectContaining({
176
- assistants: ['claude']
177
- }));
178
- });
179
- (0, vitest_1.it)('should update assistants when both copilot and claude options are provided', async () => {
180
- mocks.mockDefaultConfig.load.mockResolvedValue({
181
- packName: 'user/pack/latest'
182
115
  });
183
- await syncCommand.run(undefined, { copilot: true, claude: true, vscode: false });
184
- (0, vitest_1.expect)(mocks.mockDefaultConfig.update).toHaveBeenCalledWith(vitest_1.expect.any(Object), vitest_1.expect.objectContaining({
185
- assistants: ['copilot', 'claude']
186
- }));
187
- });
188
- (0, vitest_1.it)('should update path when path option is provided', async () => {
189
- mocks.mockDefaultConfig.load.mockResolvedValue({
190
- packName: 'user/pack/latest'
116
+ await syncCommand.run({});
117
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error: Pack name not configured. Run "sysprompthub init" to configure.');
118
+ expect(processExitSpy).toHaveBeenCalledWith(1);
119
+ });
120
+ it('should use workspace environment when option not provided', async () => {
121
+ mocks.mockWorkspaceConfig.load.mockResolvedValue({
122
+ packName: 'user/pack/latest',
123
+ environment: 'staging'
191
124
  });
192
- await syncCommand.run(undefined, { path: 'custom/path', vscode: false });
193
- (0, vitest_1.expect)(mocks.mockDefaultConfig.update).toHaveBeenCalledWith(vitest_1.expect.any(Object), vitest_1.expect.objectContaining({
194
- path: 'custom/path'
195
- }));
196
- });
197
- (0, vitest_1.it)('should exit with error if absolute path is provided', async () => {
198
- mocks.mockDefaultConfig.load.mockResolvedValue({
199
- packName: 'user/pack/latest'
200
- });
201
- await syncCommand.run(undefined, { path: '/absolute/path', vscode: false });
202
- (0, vitest_1.expect)(consoleErrorSpy).toHaveBeenCalledWith('Error: Path must be relative to the current working directory');
203
- (0, vitest_1.expect)(processExitSpy).toHaveBeenCalledWith(1);
204
- });
205
- (0, vitest_1.it)('should update environment when environment option is provided', async () => {
206
- mocks.mockDefaultConfig.load.mockResolvedValue({
207
- packName: 'user/pack/latest'
125
+ await syncCommand.run({});
126
+ expect(mocks.mockSyncManager.sync).toHaveBeenCalledWith({
127
+ config: expect.objectContaining({
128
+ environment: 'staging'
129
+ }),
130
+ fs: expect.any(Object)
208
131
  });
209
- await syncCommand.run(undefined, { environment: 'production', vscode: false });
210
- (0, vitest_1.expect)(mocks.mockDefaultConfig.update).toHaveBeenCalledWith(vitest_1.expect.any(Object), vitest_1.expect.objectContaining({
211
- environment: 'production'
212
- }));
213
- });
214
- (0, vitest_1.it)('should use vscode config when vscode option is true', async () => {
215
- mocks.mockVscodeConfig.load.mockResolvedValue({
216
- packName: 'user/pack/latest'
217
- });
218
- await syncCommand.run(undefined, { vscode: true });
219
- (0, vitest_1.expect)(mocks.mockVscodeConfig.load).toHaveBeenCalled();
220
- (0, vitest_1.expect)(mocks.mockSyncManager.sync).toHaveBeenCalledWith({
221
- config: vitest_1.expect.objectContaining({ packName: 'user/pack/latest' }),
222
- fs: vitest_1.expect.any(Object)
223
- });
224
- });
225
- (0, vitest_1.it)('should use vscode config when .vscode/settings.json exists', async () => {
226
- mocks.mockVscodeConfig.exists.mockResolvedValue(true);
227
- mocks.mockVscodeConfig.load.mockResolvedValue({
228
- packName: 'user/pack/latest'
229
- });
230
- await syncCommand.run(undefined, { vscode: false });
231
- (0, vitest_1.expect)(mocks.mockVscodeConfig.load).toHaveBeenCalled();
232
- (0, vitest_1.expect)(mocks.mockSyncManager.sync).toHaveBeenCalled();
233
- });
234
- (0, vitest_1.it)('should use default config when vscode option is false and no .vscode/settings.json', async () => {
235
- mocks.mockVscodeConfig.exists.mockResolvedValue(false);
236
- mocks.mockDefaultConfig.load.mockResolvedValue({
237
- packName: 'user/pack/latest'
238
- });
239
- await syncCommand.run(undefined, { vscode: false });
240
- (0, vitest_1.expect)(mocks.mockDefaultConfig.load).toHaveBeenCalled();
241
- (0, vitest_1.expect)(mocks.mockSyncManager.sync).toHaveBeenCalled();
242
- });
243
- (0, vitest_1.it)('should not update config when no options change values', async () => {
244
- mocks.mockDefaultConfig.load.mockResolvedValue({
245
- packName: 'user/pack/latest'
246
- });
247
- await syncCommand.run(undefined, { vscode: false });
248
- (0, vitest_1.expect)(mocks.mockDefaultConfig.update).not.toHaveBeenCalled();
249
- });
250
- });
251
- (0, vitest_1.describe)('useVscode', () => {
252
- (0, vitest_1.it)('should return true when vscode config exists', async () => {
253
- mocks.mockVscodeConfig.exists.mockResolvedValue(true);
254
- const result = await syncCommand.useVscode();
255
- (0, vitest_1.expect)(result).toBe(true);
256
- (0, vitest_1.expect)(mocks.mockVscodeConfig.exists).toHaveBeenCalled();
257
- });
258
- (0, vitest_1.it)('should return false when vscode config does not exist', async () => {
259
- mocks.mockVscodeConfig.exists.mockResolvedValue(false);
260
- const result = await syncCommand.useVscode();
261
- (0, vitest_1.expect)(result).toBe(false);
262
- (0, vitest_1.expect)(mocks.mockVscodeConfig.exists).toHaveBeenCalled();
263
132
  });
264
133
  });
265
134
  });
package/dist/index.js CHANGED
@@ -1,12 +1,14 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- const commander_1 = require("commander");
5
- const sync_js_1 = require("./commands/sync.js");
6
- const program = new commander_1.Command();
2
+ import { Command } from 'commander';
3
+ import { InitCommand } from './commands/init.js';
4
+ import { SyncCommand } from './commands/sync.js';
5
+ const program = new Command();
7
6
  program
8
7
  .name('sysprompthub')
9
- .description('CLI for syncing system prompts from SysPromptHub')
10
- .version('0.2.0');
11
- program.addCommand(new sync_js_1.SyncCommand().create());
8
+ .description('SysPromptHub CLI - Manage system prompts for AI assistants')
9
+ .version('1.0.0');
10
+ const initCmd = new InitCommand();
11
+ const syncCmd = new SyncCommand();
12
+ program.addCommand(initCmd.create());
13
+ program.addCommand(syncCmd.create());
12
14
  program.parse();
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@sysprompthub/cli",
3
- "version": "0.2.0",
3
+ "version": "1.0.0",
4
4
  "description": "CLI for syncing system prompts from SysPromptHub",
5
- "type": "commonjs",
5
+ "authorEmail": "info@sysprompthub.com",
6
+ "authorName": "SysPromptHub",
7
+ "type": "module",
6
8
  "main": "dist/index.js",
7
9
  "bin": {
8
- "sysprompthub": "dist/index.js"
10
+ "sysprompthub": "dist/index.js",
11
+ "sysprompthub-cli": "dist/index.js"
9
12
  },
10
13
  "files": [
11
14
  "dist",
@@ -23,13 +26,18 @@
23
26
  "author": "",
24
27
  "license": "ISC",
25
28
  "engines": {
26
- "node": ">=18.0.0"
29
+ "node": ">=18.0.0",
30
+ "pnpm": ">=10.27.0"
27
31
  },
28
32
  "dependencies": {
29
- "@sysprompthub/sdk": "^0.2.2",
30
- "commander": "^14.0.2"
33
+ "@inquirer/prompts": "^8.1.0",
34
+ "@sysprompthub/sdk": "1.0.0",
35
+ "commander": "^14.0.2",
36
+ "is-valid-path": "^0.1.1",
37
+ "open": "^11.0.0"
31
38
  },
32
39
  "devDependencies": {
40
+ "@types/is-valid-path": "^0.1.2",
33
41
  "@types/node": "^25.0.3",
34
42
  "@vitest/coverage-v8": "^4.0.16",
35
43
  "@vitest/ui": "^4.0.16",
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function createInitCommand(): Command;
3
- //# sourceMappingURL=init.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC,wBAAgB,iBAAiB,IAAI,OAAO,CAmD3C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EAGb,cAAc,EACf,MAAM,mBAAmB,CAAC;AAE3B,SAAS,aAAa,CAAC,OAAgB,EAAE,MAAe;IACtD,MAAM,UAAU,GAAoB,EAAE,CAAC;IACvC,IAAI,OAAO;QAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,MAAM;QAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,iB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aAAa,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;gBACvC,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;gBAC7D,OAAO,CAAC,GAAG,CAAC,aAAa,gBAAgB,EAAE,CAAC,CAAC;gBAC7C,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;YAC7C,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,22 +0,0 @@
1
- import { Command } from 'commander';
2
- import { Environment } from '@sysprompthub/sdk';
3
- interface SyncOptions {
4
- copilot?: boolean;
5
- claude?: boolean;
6
- path?: string;
7
- vscode: boolean;
8
- environment?: Environment;
9
- }
10
- export declare class SyncCommand {
11
- private readonly fs;
12
- private readonly defaultConfig;
13
- private readonly vscodeConfig;
14
- private configManager;
15
- private config;
16
- run(packArg: string | undefined, options: SyncOptions): Promise<void>;
17
- private updateConfig;
18
- useVscode(): Promise<boolean>;
19
- create(): Command;
20
- }
21
- export {};
22
- //# sourceMappingURL=sync.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAGL,WAAW,EAKZ,MAAM,mBAAmB,CAAC;AAI3B,UAAU,WAAW;IACnB,OAAO,CA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CACF"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=sync.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync.test.d.ts","sourceRoot":"","sources":["../../src/commands/sync.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync.test.js","sourceRoot":"","sources":["../../src/commands/sync.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,QAAQ,CAAC;AACvE,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAEtC,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAChC,MAAM,MAAM,GAAG;QACb,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE;QACjB,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE;QAClB,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE;KAChB,CAAC;IAEF,MAAM,iBAAiB,GAAG;QACxB,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE;QACb,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE;QACf,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE;KAChB,CAAC;IAEF,MAAM,gBAAgB,GAAG;QACvB,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE;QACb,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE;QACf,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE;KAChB,CAAC;IAEF,MAAM,eAAe,GAAG;QACtB,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE;KACd,CAAC;IAEF,OAAO;QACL,WAAW,EAAE;YACX,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;SAC7B;QACD,cAAc,EAAE;YACd,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;YAC3B,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;YAC7B,MAAM,GAAG,M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AAC,CAAC;YAEtD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,SAAS,EAAE,CAAC;YAE7C,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1B,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,CAAC;QAC3D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;YACrE,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAEvD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,SAAS,EAAE,CAAC;YAE7C,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3B,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,cAAc,CAAC;KACpB,WAAW,CAAC,kDAAkD,CAAC;KAC/D,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO,CAAC,UAAU,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;AAE/C,OAAO,CAAC,KAAK,EAAE,CAAC"}