@rendotdev/rig 0.0.6 → 0.0.8
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 +5 -1
- package/dist/rig.js +25 -3
- package/dist/{sync-75s2nmed.js → sync-7fq61sj7.js} +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,8 +68,12 @@ The `rig` CLI is installed on this machine. It allows you to write, run, and own
|
|
|
68
68
|
- To create a new tool, run `rig create <tool>`.
|
|
69
69
|
- To edit an existing tool, run `rig edit <tool>` and open the printed file path.
|
|
70
70
|
- To remove an existing tool, run `rig remove <tool>`.
|
|
71
|
+
- To list tool registries, run `rig registry list`.
|
|
72
|
+
- To add a registry, run `rig registry add [path]` (defaults to current directory).
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
> > source: ./src/agents/instructions.ts
|
|
75
|
+
|
|
76
|
+
When rig runs, it keeps detected `AGENTS.md` and `CLAUDE.md` files updated with these instructions and the current `rig list` output.
|
|
73
77
|
|
|
74
78
|
## Feedback?
|
|
75
79
|
|
package/dist/rig.js
CHANGED
|
@@ -86,6 +86,7 @@ class CliApplication {
|
|
|
86
86
|
this.configureRunCommand();
|
|
87
87
|
this.configureTypecheckCommand();
|
|
88
88
|
this.configureDevCommands();
|
|
89
|
+
this.configureUpdateCommand();
|
|
89
90
|
this.program.command("help").argument("<target>", "Tool name or command id (<tool>.<command>.)").description("Print tool docs.").action(async (target) => {
|
|
90
91
|
this.requestGeneratedSync();
|
|
91
92
|
const { ToolHelpService } = await import("./help-dz0f9jjb.js");
|
|
@@ -130,10 +131,10 @@ class CliApplication {
|
|
|
130
131
|
const { RegistryConfigService } = await import("./registry-gng9br0x.js");
|
|
131
132
|
this.printJson(await new RegistryConfigService(this.pathOptions()).list());
|
|
132
133
|
});
|
|
133
|
-
registryCommand.command("add").argument("
|
|
134
|
+
registryCommand.command("add").argument("[path]").description("Add a custom registry. Defaults to the current directory.").action(async (pathValue) => {
|
|
134
135
|
this.requestGeneratedSync();
|
|
135
136
|
const { RegistryConfigService } = await import("./registry-gng9br0x.js");
|
|
136
|
-
this.printJson(await new RegistryConfigService(this.pathOptions()).add(pathValue));
|
|
137
|
+
this.printJson(await new RegistryConfigService(this.pathOptions()).add(pathValue ?? process.cwd()));
|
|
137
138
|
});
|
|
138
139
|
registryCommand.command("remove").argument("<path>").description("Remove a custom registry.").action(async (pathValue) => {
|
|
139
140
|
this.requestGeneratedSync();
|
|
@@ -198,6 +199,27 @@ class CliApplication {
|
|
|
198
199
|
process.exitCode = result.exitCode;
|
|
199
200
|
});
|
|
200
201
|
}
|
|
202
|
+
configureUpdateCommand() {
|
|
203
|
+
this.program.command("update").description("Update rig to the latest published version.").action(async () => {
|
|
204
|
+
const currentVersion = this.version();
|
|
205
|
+
console.log(`Current version: ${currentVersion}`);
|
|
206
|
+
console.log("Checking for updates...");
|
|
207
|
+
const result = spawnSync("npm", ["install", "-g", "@rendotdev/rig@latest", "--force"], {
|
|
208
|
+
stdio: "inherit"
|
|
209
|
+
});
|
|
210
|
+
if (result.status !== 0) {
|
|
211
|
+
console.error("Update failed.");
|
|
212
|
+
process.exit(1);
|
|
213
|
+
}
|
|
214
|
+
const check = spawnSync("rig", ["--version"], { encoding: "utf8", stdio: "pipe" });
|
|
215
|
+
const newVersion = check.stdout?.trim() ?? "unknown";
|
|
216
|
+
if (newVersion === currentVersion) {
|
|
217
|
+
console.log(`Already on the latest version (${currentVersion}).`);
|
|
218
|
+
} else {
|
|
219
|
+
console.log(`Updated: ${currentVersion} -> ${newVersion}`);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
201
223
|
configureDevCommands() {
|
|
202
224
|
const devCommand = this.program.command("dev").description("Local development helpers.");
|
|
203
225
|
devCommand.command("link").description("Link this checkout as the local rig command for development.").option("--bin-dir <path>", "Directory where the rig shim should be written.").option("--force", "Overwrite an existing non-Rig shim.").action(async (commandOptions) => {
|
|
@@ -324,7 +346,7 @@ ${notice.message}`);
|
|
|
324
346
|
if (process.env.RIG_AGENT_SYNC === "0")
|
|
325
347
|
return;
|
|
326
348
|
await this.ignoreSyncErrors(async () => {
|
|
327
|
-
const { AgentInstructionSyncService } = await import("./sync-
|
|
349
|
+
const { AgentInstructionSyncService } = await import("./sync-7fq61sj7.js");
|
|
328
350
|
await new AgentInstructionSyncService(this.pathOptions()).sync();
|
|
329
351
|
});
|
|
330
352
|
}
|
|
@@ -26,6 +26,8 @@ var RigAgentInstructions = `The \`rig\` CLI is installed on this machine. It all
|
|
|
26
26
|
- To create a new tool, run \`rig create <tool>\`.
|
|
27
27
|
- To edit an existing tool, run \`rig edit <tool>\` and open the printed file path.
|
|
28
28
|
- To remove an existing tool, run \`rig remove <tool>\`.
|
|
29
|
+
- To list tool registries, run \`rig registry list\`.
|
|
30
|
+
- To add a registry, run \`rig registry add [path]\` (defaults to current directory).
|
|
29
31
|
`;
|
|
30
32
|
|
|
31
33
|
// src/agents/sync.ts
|