Skip to content

Turbocharge Claude Code, Cursor, Codex, Gemini & every coding agent: faster, cheaper, with contextual understanding specific to your codebase.

feat: add Hermes Agent host support (#170)

Joseph Williams6a9308e4b380
diff --git a/src/hosts/registry.ts b/src/hosts/registry.ts
index c5019074..1380797e 100644
--- a/src/hosts/registry.ts
+++ b/src/hosts/registry.ts
@@ -62,6 +62,19 @@ export const HOSTS: HostTarget[] = [
content: instructionBody,
detect: (p) => p.dirExists(join(p.home, '.gemini')),
},
+ {
+ id: 'hermes',
+ name: 'Hermes Agent (Nous Research)',
+ kind: 'section',
+ relPath: 'AGENTS.md',
+ content: instructionBody,
+ // Hermes is repo-aware: it reads AGENTS.md at the repo root (and the
+ // Graft-for-Hermes plugin keeps the graph fresh on every session start).
+ detect: (p) =>
+ p.dirExists(join(p.home, '.hermes')) ||
+ p.dirExists(join(p.home, 'AppData', 'Local', 'hermes')) ||
+ p.dirExists(join(p.repo, '.hermes')),
+ },
{
id: 'antigravity',
name: 'Google Antigravity',
diff --git a/test/hosts-init.test.ts b/test/hosts-init.test.ts
index 8b63f3fd..0925bfb4 100644
--- a/test/hosts-init.test.ts
+++ b/test/hosts-init.test.ts
@@ -34,7 +34,7 @@ test('explicit agents list overrides detection and flags unknown ids', () => {
test('all writes every host and re-run converges (idempotent)', () => {
const home = fresh(); const repo = fresh();
const first = runHostsInit(repo, { home, all: true });
- assert.equal(first.written.length, 8);
+ assert.equal(first.written.length, 9);
const second = runHostsInit(repo, { home, all: true });
assert.ok(second.written.every((w) => w.action === 'unchanged'));
// `agents` and `antigravity` share AGENTS.md, but the fenced section is written once
diff --git a/test/hosts-registry.test.ts b/test/hosts-registry.test.ts
index f977f64f..db870853 100644
--- a/test/hosts-registry.test.ts
+++ b/test/hosts-registry.test.ts
@@ -15,7 +15,7 @@ function probeFor(home: string, repo: string): DetectProbe {
function fresh(): string { return mkdtempSync(join(tmpdir(), 'graft-registry-')); }
test('registry exposes the known hosts', () => {
- assert.deepEqual(hostIds().sort(), ['adal', 'agents', 'antigravity', 'copilot', 'cursor', 'gemini', 'kiro', 'windsurf']);
+ assert.deepEqual(hostIds().sort(), ['adal', 'agents', 'antigravity', 'copilot', 'cursor', 'gemini', 'hermes', 'kiro', 'windsurf']);
for (const h of HOSTS) {
assert.ok(h.relPath.length > 0);
assert.ok(h.content().length > 0);
@@ -56,3 +56,11 @@ test('repo-local .adal also lights up the adal host', () => {
const ids = detectHosts(probeFor(home, repo)).map((h) => h.id).sort();
assert.deepEqual(ids, ['adal']);
});
+
+test('~/.hermes or AppData/Local/hermes lights up the hermes host', () => {
+ const home = fresh(); const repo = fresh();
+ mkdirSync(join(home, 'AppData', 'Local', 'hermes'), { recursive: true });
+ const ids = detectHosts(probeFor(home, repo)).map((h) => h.id).sort();
+ assert.deepEqual(ids, ['hermes']);
+ assert.ok(HOSTS.find((h) => h.id === 'hermes')?.relPath === 'AGENTS.md');
+});