arsenal-agent 0.2.0 → 0.2.1
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/dist/index.js +8 -0
- package/dist/setup.js +2 -1
- package/package.json +1 -1
- package/src/index.tsx +9 -0
- package/src/setup.ts +2 -1
package/dist/index.js
CHANGED
|
@@ -17,6 +17,14 @@ program
|
|
|
17
17
|
.command("setup")
|
|
18
18
|
.description("instala e configura tudo: brain, opencode, plugins, MCPs, aliases")
|
|
19
19
|
.action(async () => { await setup(); process.exit(0); });
|
|
20
|
+
program
|
|
21
|
+
.command("update")
|
|
22
|
+
.description("atualiza claude-brain (agentes, memórias, CLAUDE.md)")
|
|
23
|
+
.action(async () => {
|
|
24
|
+
const { setupBrain } = await import("./setup.js");
|
|
25
|
+
await setupBrain();
|
|
26
|
+
process.exit(0);
|
|
27
|
+
});
|
|
20
28
|
const profileCmd = program.command("profile").description("gerenciar perfis");
|
|
21
29
|
profileCmd.command("add [name]").description("adicionar perfil").action(async (name) => { await addProfile(name); process.exit(0); });
|
|
22
30
|
profileCmd.command("list").alias("ls").description("listar perfis").action(() => { listProfiles(); process.exit(0); });
|
package/dist/setup.js
CHANGED
|
@@ -15,7 +15,7 @@ function run(cmd, opts = {}) {
|
|
|
15
15
|
return spawnSync(cmd, { shell: true, stdio: "inherit", ...opts });
|
|
16
16
|
}
|
|
17
17
|
// ── 1. claude-brain ──────────────────────────────────────────────────────────
|
|
18
|
-
function setupBrain() {
|
|
18
|
+
export function setupBrain() {
|
|
19
19
|
step("Clonando claude-brain...");
|
|
20
20
|
if (existsSync(BRAIN_DIR)) {
|
|
21
21
|
run(`git -C ${BRAIN_DIR} pull --recurse-submodules`);
|
|
@@ -31,6 +31,7 @@ function setupBrain() {
|
|
|
31
31
|
step("Copiando agentes, commands e memórias...");
|
|
32
32
|
run(`cp ${BRAIN_DIR}/agents/*.md ${CLAUDE_DIR}/agents/ 2>/dev/null || true`);
|
|
33
33
|
run(`cp ${BRAIN_DIR}/agents/*.py ${ARSENAL_DIR}/agents/ 2>/dev/null || true`);
|
|
34
|
+
run(`mkdir -p ${ARSENAL_DIR}/scripts && cp ${BRAIN_DIR}/scripts/claude-picker.sh ${ARSENAL_DIR}/scripts/ 2>/dev/null || true`);
|
|
34
35
|
step("Copiando CLAUDE.md e settings.json...");
|
|
35
36
|
run(`cp ${BRAIN_DIR}/CLAUDE.md ${CLAUDE_DIR}/CLAUDE.md`);
|
|
36
37
|
run(`cp ${BRAIN_DIR}/settings.json ${CLAUDE_DIR}/settings.json`);
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -22,6 +22,15 @@ program
|
|
|
22
22
|
.description("instala e configura tudo: brain, opencode, plugins, MCPs, aliases")
|
|
23
23
|
.action(async () => { await setup(); process.exit(0) })
|
|
24
24
|
|
|
25
|
+
program
|
|
26
|
+
.command("update")
|
|
27
|
+
.description("atualiza claude-brain (agentes, memórias, CLAUDE.md)")
|
|
28
|
+
.action(async () => {
|
|
29
|
+
const { setupBrain } = await import("./setup.js")
|
|
30
|
+
await setupBrain()
|
|
31
|
+
process.exit(0)
|
|
32
|
+
})
|
|
33
|
+
|
|
25
34
|
const profileCmd = program.command("profile").description("gerenciar perfis")
|
|
26
35
|
profileCmd.command("add [name]").description("adicionar perfil").action(async (name) => { await addProfile(name); process.exit(0) })
|
|
27
36
|
profileCmd.command("list").alias("ls").description("listar perfis").action(() => { listProfiles(); process.exit(0) })
|
package/src/setup.ts
CHANGED
|
@@ -18,7 +18,7 @@ function run(cmd: string, opts: object = {}) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
// ── 1. claude-brain ──────────────────────────────────────────────────────────
|
|
21
|
-
function setupBrain() {
|
|
21
|
+
export function setupBrain() {
|
|
22
22
|
step("Clonando claude-brain...")
|
|
23
23
|
if (existsSync(BRAIN_DIR)) {
|
|
24
24
|
run(`git -C ${BRAIN_DIR} pull --recurse-submodules`)
|
|
@@ -35,6 +35,7 @@ function setupBrain() {
|
|
|
35
35
|
step("Copiando agentes, commands e memórias...")
|
|
36
36
|
run(`cp ${BRAIN_DIR}/agents/*.md ${CLAUDE_DIR}/agents/ 2>/dev/null || true`)
|
|
37
37
|
run(`cp ${BRAIN_DIR}/agents/*.py ${ARSENAL_DIR}/agents/ 2>/dev/null || true`)
|
|
38
|
+
run(`mkdir -p ${ARSENAL_DIR}/scripts && cp ${BRAIN_DIR}/scripts/claude-picker.sh ${ARSENAL_DIR}/scripts/ 2>/dev/null || true`)
|
|
38
39
|
|
|
39
40
|
step("Copiando CLAUDE.md e settings.json...")
|
|
40
41
|
run(`cp ${BRAIN_DIR}/CLAUDE.md ${CLAUDE_DIR}/CLAUDE.md`)
|