dryai 1.0.0 → 2.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
@@ -2,11 +2,11 @@
2
2
 
3
3
  Installs command, rule, and skill sources from `~/.config/dryai` by default into Copilot and Cursor targets.
4
4
 
5
- Pass `--input <path>` to read configs from a different root such as `./config`.
5
+ Pass `--config-root <path>` to read configs from a different root such as `./config`.
6
6
 
7
- Pass `--output <path>` to write generated output somewhere other than your home directory.
7
+ Pass `--output-root <path>` to write generated output somewhere other than your home directory.
8
8
 
9
- `--test` is a shortcut for `--output ./output-test`, and if both are provided, `--output` wins.
9
+ `--test` is a shortcut for `--output-root ./output-test`, and if both are provided, `--output-root` wins.
10
10
 
11
11
  ## Input
12
12
 
@@ -129,6 +129,8 @@ dryai skills update-all Update all managed skills from
129
129
 
130
130
  Imported skills are copied into `config/skills/<name>/` and tracked in `skills.lock.json`.
131
131
 
132
+ When you run `skills` commands, local skill directories and `skills.lock.json` are read from and written to the selected config root.
133
+
132
134
  `skills add` requires at least one `--skill <name>` value. Each requested skill is always resolved from `<repo root>/skills/<name>`.
133
135
 
134
136
  Use `--as <name>` to choose a different local managed skill name when importing exactly one skill.
@@ -172,8 +174,8 @@ pnpm run test:watch
172
174
 
173
175
  pnpm dev:dryai install
174
176
  pnpm dev:dryai --test install
175
- pnpm dev:dryai --output ./tmp/install-root install
176
- pnpm dev:dryai --input ./config install
177
+ pnpm dev:dryai --output-root ./tmp/install-root install
178
+ pnpm dev:dryai --config-root ./config install
177
179
  ```
178
180
 
179
181
  ## CI and Release
@@ -50,6 +50,12 @@ export declare function resolveRequestedOutputRoot(input: {
50
50
  test: boolean;
51
51
  outputRoot?: string;
52
52
  }): string | undefined;
53
+ /**
54
+ * Returns the requested config root derived from CLI-style options.
55
+ */
56
+ export declare function resolveRequestedConfigRoot(input: {
57
+ configRoot?: string;
58
+ }): string | undefined;
53
59
  /**
54
60
  * Returns the filesystem path to use for generated output.
55
61
  */
@@ -57,6 +57,12 @@ export function resolveRequestedOutputRoot(input) {
57
57
  }
58
58
  return input.test ? `./${DEFAULT_TEST_OUTPUT_DIR_NAME}` : undefined;
59
59
  }
60
+ /**
61
+ * Returns the requested config root derived from CLI-style options.
62
+ */
63
+ export function resolveRequestedConfigRoot(input) {
64
+ return input.configRoot;
65
+ }
60
66
  /**
61
67
  * Returns the filesystem path to use for generated output.
62
68
  */
package/dest/main.js CHANGED
@@ -7,11 +7,11 @@ import { z } from 'zod';
7
7
  import { runInstallCommand } from './commands/install.js';
8
8
  import { addSkillsCommand } from './commands/skills/index.js';
9
9
  import { nonEmptyOptionStringSchema, parseOptionValue, parseOptionsObject, } from './lib/command-options.js';
10
- import { createAgentsContext, resolveRequestedOutputRoot, } from './lib/context.js';
10
+ import { createAgentsContext, resolveRequestedConfigRoot, resolveRequestedOutputRoot, } from './lib/context.js';
11
11
  const rootOptionsSchema = z.object({
12
12
  test: z.boolean().optional().default(false),
13
- input: nonEmptyOptionStringSchema.optional(),
14
- output: nonEmptyOptionStringSchema.optional(),
13
+ configRoot: nonEmptyOptionStringSchema.optional(),
14
+ outputRoot: nonEmptyOptionStringSchema.optional(),
15
15
  });
16
16
  const EXECUTABLE_NAME = 'dryai';
17
17
  /**
@@ -43,12 +43,15 @@ function getRootOptions(program) {
43
43
  */
44
44
  function resolveActiveContext(program) {
45
45
  const rootOptions = getRootOptions(program);
46
+ const requestedConfigRoot = resolveRequestedConfigRoot({
47
+ ...(rootOptions.configRoot ? { configRoot: rootOptions.configRoot } : {}),
48
+ });
46
49
  const requestedOutputRoot = resolveRequestedOutputRoot({
47
50
  test: rootOptions.test,
48
- ...(rootOptions.output ? { outputRoot: rootOptions.output } : {}),
51
+ ...(rootOptions.outputRoot ? { outputRoot: rootOptions.outputRoot } : {}),
49
52
  });
50
53
  const context = createAgentsContext({
51
- ...(rootOptions.input ? { inputRoot: rootOptions.input } : {}),
54
+ ...(requestedConfigRoot ? { inputRoot: requestedConfigRoot } : {}),
52
55
  ...(requestedOutputRoot ? { outputRoot: requestedOutputRoot } : {}),
53
56
  });
54
57
  return context;
@@ -64,14 +67,14 @@ async function main() {
64
67
  .usage('[options] <command> [args]')
65
68
  .helpOption('-h, --help', 'Display this message')
66
69
  .version(cliVersion, '-v, --version', 'Display the current version')
67
- .option('--test', 'Shortcut for writing generated output into ./output-test unless --output is also provided')
68
- .option('--input <path>', 'Read input configs from a different root instead of ~/.config/dryai', parseOptionValue({
70
+ .option('--test', 'Shortcut for writing generated output into ./output-test unless --output-root is also provided')
71
+ .option('--config-root <path>', 'Read configs from a different root instead of ~/.config/dryai', parseOptionValue({
69
72
  schema: nonEmptyOptionStringSchema,
70
- optionLabel: '--input',
73
+ optionLabel: '--config-root',
71
74
  }))
72
- .option('--output <path>', 'Write generated output under a different root instead of the default home directory', parseOptionValue({
75
+ .option('--output-root <path>', 'Write generated output under a different root instead of the default home directory', parseOptionValue({
73
76
  schema: nonEmptyOptionStringSchema,
74
- optionLabel: '--output',
77
+ optionLabel: '--output-root',
75
78
  }))
76
79
  .helpCommand(false)
77
80
  .action(() => {
@@ -102,7 +105,7 @@ function requestedOutputRootWasUsed(program) {
102
105
  const rootOptions = getRootOptions(program);
103
106
  return (resolveRequestedOutputRoot({
104
107
  test: rootOptions.test,
105
- ...(rootOptions.output ? { outputRoot: rootOptions.output } : {}),
108
+ ...(rootOptions.outputRoot ? { outputRoot: rootOptions.outputRoot } : {}),
106
109
  }) !== undefined);
107
110
  }
108
111
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dryai",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "CLI for installing shared AI commands, rules, and skills into Copilot and Cursor.",
5
5
  "type": "module",
6
6
  "repository": {