Skip to content

Find code by asking what it does. A CLI for coding agents that uses Jev to discover relevant files and source context.

feat: install skill from GitHub main

David Zhang9899ce286947
diff --git a/README.md b/README.md
index c462850..0700706 100644
--- a/README.md
+++ b/README.md
@@ -45,11 +45,11 @@ It leaves research and implementation decisions to the calling agent. The curren
checks for `jg` and installs the CLI if it is missing; authentication still needs
your selected provider’s key. The skill installer itself does not configure credentials.
-`jg skill` installs the skill bundled with this release using a pinned
-[skills CLI](https://github.com/vercel-labs/skills), with npm lifecycle scripts
-disabled. Skill installation needs Node 22.20+ and npm/npx plus network access
-for the installer; it does not fetch skill instructions from GitHub. Use `jg skill`
-so the installed instructions match your CLI release.
+`jg skill` installs the `jevgrep` skill from the repository's `main` branch using
+a pinned [skills CLI](https://github.com/vercel-labs/skills), with npm lifecycle
+scripts disabled. Skill installation needs Node 22.20+ and npm/npx plus network
+access for the installer. Rerun `jg skill` to get the current skill without
+waiting for a new npm release.
### Upgrade
@@ -60,11 +60,11 @@ npm install -g @dzhng/jevgrep@latest
jg --version
```
-After updating the CLI, refresh the installed skill by rerunning `jg skill`. Updating the npm package does not
-overwrite skill files in your projects. The installer records a machine-specific local
-path in `skills-lock.json`; `skills update` skips this entry. Rerun `jg skill` on
-another machine or after changing your Node installation. See the [package guide](apps/cli/README.md)
-for authentication details.
+After updating the CLI, refresh the installed skill by rerunning `jg skill`.
+Updating the npm package does not overwrite skill files in your projects. The
+installer records the GitHub source and skill path in `skills-lock.json`; rerun
+`jg skill` on another machine or after changing your Node installation. See the
+[package guide](apps/cli/README.md) for authentication details.
## Start with a question, leave with source
diff --git a/apps/cli/README.md b/apps/cli/README.md
index 0b55cb7..77745e7 100644
--- a/apps/cli/README.md
+++ b/apps/cli/README.md
@@ -118,10 +118,11 @@ The installer detects your coding agents (Claude Code, Codex, OpenCode and
others) and asks where to install. `jg skill` also accepts `--agent NAME`
(repeatable), `--global`, and `--yes`; these options come from the
[skills CLI](https://github.com/vercel-labs/skills#install-a-skill), which it
-delegates to. Use `jg skill` so the installed instructions match your CLI release;
-it installs the bundled skill with npm lifecycle scripts disabled and requires
-Node 22.20+ and npm/npx with network access for the pinned installer. Installer
-transitive dependencies remain an external trust boundary.
+delegates to. `jg skill` installs the `jevgrep` skill from this repository's
+`main` branch with npm lifecycle scripts disabled and requires Node 22.20+ and
+npm/npx with network access for the pinned installer. Rerun `jg skill` to refresh
+the skill without waiting for a new npm release. Installer transitive
+dependencies remain an external trust boundary.
Installing the skill does not configure the provider key.
@@ -131,10 +132,9 @@ to read returned excerpts before further discovery, skip redundant searches when
the needed context is already known, and handle incomplete results honestly.
There is no built-in upgrade command. Use `npm install --global @dzhng/jevgrep@latest`
-to upgrade the CLI, then rerun `jg skill` to update
-the agent's copy too. The installer records a machine-specific local path in
-`skills-lock.json`; `skills update` skips this entry. Rerun `jg skill` on another
-machine or after changing your Node installation.
+to upgrade the CLI, then rerun `jg skill` to update the agent's copy too. The
+installer records the GitHub source and skill path in `skills-lock.json`. Rerun
+`jg skill` on another machine or after changing your Node installation.
See the [repository](https://github.com/dzhng/jevgrep) for architecture, official
benchmark evidence and development. Jevgrep is MIT licensed.
diff --git a/apps/cli/src/skill.ts b/apps/cli/src/skill.ts
index d3122bd..7107147 100644
--- a/apps/cli/src/skill.ts
+++ b/apps/cli/src/skill.ts
@@ -1,10 +1,7 @@
-import { fileURLToPath } from "node:url";
import { spawn } from "node:child_process";
import type { Command } from "./args";
import { CliError } from "./errors";
-declare const JEVGREP_BUNDLED: boolean;
-
const windowsCommandMetaCharacters = /([()[\]{}%!^"`<>&|;, *?])/g;
function escapeWindowsCommand(command: string): string {
@@ -35,13 +32,15 @@ export async function installSkill(
const [major, minor] = process.versions.node.split(".").map(Number);
if (major! < 22 || (major === 22 && minor! < 20))
throw new CliError("jg skill requires Node 22.20 or newer ([email protected]).");
- const source = fileURLToPath(
- new URL(
- typeof JEVGREP_BUNDLED !== "undefined" ? "../skills/jevgrep" : "../../../skills/jevgrep",
- import.meta.url,
- ),
- );
- const args = ["--yes", "--ignore-scripts", "[email protected]", "add", source, "--skill", "jevgrep"];
+ const args = [
+ "--yes",
+ "--ignore-scripts",
+ "add",
+ "dzhng/jevgrep@main",
+ "--skill",
+ "jevgrep",
+ ];
for (const agent of command.agents) args.push("--agent", agent);
if (command.global) args.push("--global");
if (command.yes) args.push("--yes");
diff --git a/test/installed.test.mjs b/test/installed.test.mjs
index 22a7a7f..221f2e4 100644
--- a/test/installed.test.mjs
+++ b/test/installed.test.mjs
@@ -467,7 +467,7 @@ test("skill command delegates installation to npx without credentials", async (t
"--ignore-scripts",
"add",
- join(packageDirectory, "dist/skills/jevgrep"),
+ "dzhng/jevgrep@main",
"--skill",
"jevgrep",
"--agent",
@@ -488,7 +488,7 @@ test("skill command delegates installation to npx without credentials", async (t
"--ignore-scripts",
"add",
- join(packageDirectory, "dist/skills/jevgrep"),
+ "dzhng/jevgrep@main",
"--skill",
"jevgrep",
]);
diff --git a/test/skill.test.mjs b/test/skill.test.mjs
index 8048180..064ea1a 100644
--- a/test/skill.test.mjs
+++ b/test/skill.test.mjs
@@ -1,23 +1,15 @@
import assert from "node:assert/strict";
import { execFile } from "node:child_process";
-import { cp, mkdir, mkdtemp, readFile, realpath, rm, symlink, writeFile } from "node:fs/promises";
+import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { delimiter, dirname, join } from "node:path";
import { test } from "node:test";
import { fileURLToPath } from "node:url";
import { promisify } from "node:util";
-test("skill installer preserves local source arguments through the platform launcher", async (t) => {
+test("skill installer uses the GitHub main skill source through the platform launcher", async (t) => {
const home = await mkdtemp(join(tmpdir(), "jevgrep-skill-"));
t.after(() => rm(home, { recursive: true, force: true }));
- const checkoutRoot = fileURLToPath(new URL("../", import.meta.url));
- const checkoutScratch = await mkdtemp(join(tmpdir(), ".tmp-skill-"));
- t.after(() => rm(checkoutScratch, { recursive: true, force: true }));
- await symlink(
- join(checkoutRoot, "node_modules"),
- join(checkoutScratch, "node_modules"),
- "junction",
- );
const bin = join(home, "installer with spaces");
await mkdir(bin);
const fixture = fileURLToPath(new URL("./fixtures/skill-installer.mjs", import.meta.url));
@@ -30,18 +22,9 @@ test("skill installer preserves local source arguments through the platform laun
{ mode: 0o755 },
);
- let cli = process.env.JEVGREP_TEST_CLI;
- let packageDist;
- if (cli) {
- packageDist = dirname(dirname(cli));
- } else {
- packageDist = join(checkoutScratch, "cli bundle & with spaces", "dist");
- await cp(fileURLToPath(new URL("../apps/cli/dist", import.meta.url)), packageDist, {
- recursive: true,
- });
- cli = join(packageDist, "bin", "index.js");
- }
- const source = await realpath(join(packageDist, "skills", "jevgrep"));
+ const cli =
+ process.env.JEVGREP_TEST_CLI ??
+ fileURLToPath(new URL("../apps/cli/dist/bin/index.js", import.meta.url));
const result = await promisify(execFile)(
process.execPath,
[cli, "skill", "--agent", "claude-code", "--agent", "codex", "--global", "--yes"],
@@ -69,7 +52,7 @@ test("skill installer preserves local source arguments through the platform laun
"--ignore-scripts",
"add",
- source,
+ "dzhng/jevgrep@main",
"--skill",
"jevgrep",
"--agent",