@g3nomaly/mods 0.1.2 → 0.1.3
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 +8 -14
- package/dist/cli/viewer.js +2 -2
- package/dist/cli/viewer.js.map +1 -1
- package/dist/vscode/g3n-mods-viewer.vsix +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,30 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
`g3n-mods` installs Claude Code mods into a project. A mod adds a pane, a status line, a slash command or a hook to Claude Code. The g3n mods from [`@g3nomaly/g3n-mods`](../g3n-mods) are available by default, and you can register other sources: a git repository, an npm package or a local folder.
|
|
4
4
|
|
|
5
|
-
The Claude Code extension for VS Code does not draw mods itself, so `init` installs a viewer: a button in the editor title bar opens a
|
|
5
|
+
The Claude Code extension for VS Code does not draw mods itself, so `init` installs a viewer: a button in the editor title bar opens a tab that draws the mods of a running session. The mods also work in the terminal.
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
9
|
- [Bun](https://bun.sh)
|
|
10
10
|
- Claude Code for VS Code (`anthropic.claude-code`) 2.1.296 or newer
|
|
11
|
-
- A git repository to install into, unless you install with `--user`
|
|
12
|
-
|
|
13
11
|
## Install the mods
|
|
14
12
|
|
|
15
|
-
Run these from the root of your project:
|
|
16
|
-
|
|
17
13
|
```sh
|
|
18
|
-
bunx @g3nomaly/mods init # creates
|
|
19
|
-
bunx @g3nomaly/mods ls # lists the mods you can install
|
|
20
|
-
bunx @g3nomaly/mods add context-bar # installs one mod
|
|
21
|
-
bunx @g3nomaly/mods add g3n-mods # or every mod from the g3n-mods source
|
|
14
|
+
bunx @g3nomaly/mods init --user # creates ~/.claude/mods.json and installs the viewer
|
|
15
|
+
bunx @g3nomaly/mods ls --user # lists the mods you can install
|
|
16
|
+
bunx @g3nomaly/mods add context-bar --user # installs one mod
|
|
17
|
+
bunx @g3nomaly/mods add g3n-mods --user # or every mod from the g3n-mods source
|
|
22
18
|
```
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Mods are copied to `.claude/skills/<mod>/`, where Claude Code finds them, and recorded in `.claude/mods.json`. Commit both if your team should get the same mods.
|
|
20
|
+
Mods are copied to `~/.claude/skills/<mod>/`, where Claude Code finds them in every project, and recorded in `~/.claude/mods.json`. Start a new Claude Code session, then click the **Mods** button in the editor title bar. Sessions that were already open before `init` do not show in the viewer until you start them again.
|
|
27
21
|
|
|
28
|
-
To install
|
|
22
|
+
To install into one project instead, leave out `--user` and run the commands from the project's git root. Mods then go to `.claude/skills/<mod>/` and `.claude/mods.json`. Claude Code skips them until the workspace is trusted, and the VS Code extension does not ask: run `claude` once in a terminal in the project, accept the trust dialog, then run `/reload-plugins`.
|
|
29
23
|
|
|
30
24
|
## The g3n mods
|
|
31
25
|
|
|
@@ -49,7 +43,7 @@ Each pane opens with its command. For `context-bar`, `tool-timeline`, `agents-pa
|
|
|
49
43
|
`init` sets up three things, once per machine:
|
|
50
44
|
|
|
51
45
|
1. **The relay.** It builds `~/.claude/g3n-mods/bin/g3n-mods-relay` and sets it as `claudeCode.claudeProcessWrapper` in VS Code's machine settings. The Claude Code extension then starts every session through the relay. The relay passes everything through unchanged, and lets the viewer ask that session for its mods' drawings.
|
|
52
|
-
2. **The viewer extension.** It installs *g3n Mods Viewer* with `code --install-extension`. Its button sits next to Split Editor and opens
|
|
46
|
+
2. **The viewer extension.** It installs *g3n Mods Viewer* with `code --install-extension`. Its button sits next to Split Editor and opens the viewer as an editor tab. To open it in a window of its own instead, turn on `g3nMods.viewer.openInNewWindow`.
|
|
53
47
|
3. **The chat view.** In `.vscode/settings.json` it sets `claudeCode.preferredLocation` to `panel` (pass `--location sidebar` to keep the side bar) and `claudeCode.useTerminal` to `false`.
|
|
54
48
|
|
|
55
49
|
The viewer shows every pane that is open in the session it is showing. Pick another session from the list at the top. Turn a mod's pane on or off with its command in the Claude Code chat, or close it with **×** in the viewer.
|
package/dist/cli/viewer.js
CHANGED
|
@@ -36,7 +36,7 @@ async function setUpRelay(replaceWrapper) {
|
|
|
36
36
|
break;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
/** Installs the viewer extension that draws the mods in
|
|
39
|
+
/** Installs the viewer extension that draws the mods in an editor tab. */
|
|
40
40
|
function setUpViewerExtension() {
|
|
41
41
|
const viewer = installViewer();
|
|
42
42
|
switch (viewer.kind) {
|
|
@@ -84,7 +84,7 @@ export async function setUpViewer(project, setup = {}) {
|
|
|
84
84
|
const settings = machineSettingsPath();
|
|
85
85
|
const isSetUp = fs.existsSync(relayBinaryPath()) && fs.existsSync(settings) && fs.readFileSync(settings, "utf8").includes(relayBinaryPath());
|
|
86
86
|
if (!isSetUp)
|
|
87
|
-
console.log(lineInfo(`Run ${c.cmd("g3n-mods init")} once to set up the
|
|
87
|
+
console.log(lineInfo(`Run ${c.cmd("g3n-mods init")} once to set up the viewer the mods are drawn in.`));
|
|
88
88
|
else
|
|
89
89
|
console.log(lineInfo("Mods show in the viewer of sessions started from now on; in a running one, run /reload-plugins."));
|
|
90
90
|
}
|
package/dist/cli/viewer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewer.js","sourceRoot":"","sources":["../../src/cli/viewer.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EACL,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EACzE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,eAAe,EAAE,iBAAiB,GACrF,MAAM,WAAW,CAAC;AAcnB,oFAAoF;AACpF,SAAS,oBAAoB;IAC3B,MAAM,SAAS,GAAG,mBAAmB,EAAE,CAAC;IACxC,IAAI,SAAS,KAAK,IAAI,EAAE,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