@staff0rd/assist 0.64.2 → 0.65.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 +2 -1
- package/dist/index.js +17 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@ You can install `assist` globally using npm:
|
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
9
|
npm install -g @staff0rd/assist
|
|
10
|
+
assist sync
|
|
10
11
|
```
|
|
11
12
|
|
|
12
13
|
## Local Development
|
|
@@ -61,7 +62,7 @@ After installation, the `assist` command will be available globally.
|
|
|
61
62
|
- `assist backlog done <id>` - Set a backlog item to done
|
|
62
63
|
- `assist roam auth` - Authenticate with Roam via OAuth (opens browser, saves tokens to ~/.assist.yml)
|
|
63
64
|
- `assist run <name>` - Run a configured command from assist.yml
|
|
64
|
-
- `assist run add` - Add a new run configuration to assist.yml
|
|
65
|
+
- `assist run add` - Add a new run configuration to assist.yml and create a Claude command file
|
|
65
66
|
- `assist config set <key> <value>` - Set a config value (e.g. commit.push true)
|
|
66
67
|
- `assist config get <key>` - Get a config value
|
|
67
68
|
- `assist config list` - List all config values
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.65.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -5072,6 +5072,8 @@ function registerRoam(program2) {
|
|
|
5072
5072
|
import { spawn as spawn4 } from "child_process";
|
|
5073
5073
|
|
|
5074
5074
|
// src/commands/run/add.ts
|
|
5075
|
+
import { mkdirSync as mkdirSync7, writeFileSync as writeFileSync17 } from "fs";
|
|
5076
|
+
import { join as join21 } from "path";
|
|
5075
5077
|
function findAddIndex() {
|
|
5076
5078
|
const addIndex = process.argv.indexOf("add");
|
|
5077
5079
|
if (addIndex === -1 || addIndex + 2 >= process.argv.length) return -1;
|
|
@@ -5124,9 +5126,23 @@ function saveNewRunConfig(name, command, args) {
|
|
|
5124
5126
|
runList.push(buildRunEntry(name, command, args));
|
|
5125
5127
|
saveConfig(config);
|
|
5126
5128
|
}
|
|
5129
|
+
function createCommandFile(name) {
|
|
5130
|
+
const dir = join21(".claude", "commands");
|
|
5131
|
+
mkdirSync7(dir, { recursive: true });
|
|
5132
|
+
const content = `---
|
|
5133
|
+
description: Run ${name}
|
|
5134
|
+
---
|
|
5135
|
+
|
|
5136
|
+
Run \`assist run ${name} $ARGUMENTS 2>&1\`.
|
|
5137
|
+
`;
|
|
5138
|
+
const filePath = join21(dir, `${name}.md`);
|
|
5139
|
+
writeFileSync17(filePath, content);
|
|
5140
|
+
console.log(`Created command file: ${filePath}`);
|
|
5141
|
+
}
|
|
5127
5142
|
function add2() {
|
|
5128
5143
|
const { name, command, args } = requireParsedArgs();
|
|
5129
5144
|
saveNewRunConfig(name, command, args);
|
|
5145
|
+
createCommandFile(name);
|
|
5130
5146
|
console.log(
|
|
5131
5147
|
`Added run configuration: ${name} -> ${formatDisplay(command, args)}`
|
|
5132
5148
|
);
|