Skip to content

The agent that grows with you

feat(catalog): restore website install links to Desktop

brooklyn!cf59980e2c11
diff --git a/tests/website/test_extract_skills.py b/tests/website/test_extract_skills.py
index 0cb2c202815..cbe13cc16b4 100644
--- a/tests/website/test_extract_skills.py
+++ b/tests/website/test_extract_skills.py
@@ -34,6 +34,21 @@ def mod():
return module
[email protected]("directory,source,prefix", [
+ ("skills", "built-in", "NousResearch/hermes-agent/skills"),
+ ("optional-skills", "optional", "official"),
+])
+def test_local_skills_publish_exact_install_target(mod, tmp_path, monkeypatch, directory, source, prefix):
+ skill = tmp_path / directory / "creative" / "nested" / "example"
+ skill.mkdir(parents=True)
+ (skill / "SKILL.md").write_text("---\nname: Different Display Name\n---\nExample.")
+ monkeypatch.setattr(mod, "REPO_ROOT", str(tmp_path))
+ [entry] = mod.extract_local_skills()
+ expected = f"{prefix}/creative/nested/example"
+ assert entry["installIdentifier"] == expected
+ assert entry["installCmd"] == f"hermes skills install {expected}"
+
+
# --------------------------------------------------------------------------
# _source_url
# --------------------------------------------------------------------------
diff --git a/website/scripts/extract-skills.py b/website/scripts/extract-skills.py
index a463d1e2583..bd554f3798e 100644
--- a/website/scripts/extract-skills.py
+++ b/website/scripts/extract-skills.py
@@ -311,6 +311,11 @@ def extract_local_skills():
elif isinstance(cmds, str) and cmds.strip():
commands = [cmds.strip()]
+ rel_id = rel.replace(os.sep, "/")
+ install_identifier = (
+ f"official/{rel_id}" if source_label == "optional"
+ else f"NousResearch/hermes-agent/skills/{rel_id}"
+ )
skills.append({
"name": fm.get("name", os.path.basename(root)),
"description": fm.get("description", ""),
@@ -326,6 +331,8 @@ def extract_local_skills():
"envVars": env_vars,
"commands": commands,
"docsPath": _docs_page_path(rel, source_label),
+ "installIdentifier": install_identifier,
+ "installCmd": f"hermes skills install {install_identifier}",
})
return skills
@@ -436,6 +443,7 @@ def extract_unified_index_skills():
"docsPath": "",
"identifier": identifier,
"installCmd": install_cmd,
+ "installIdentifier": install_cmd.removeprefix("hermes skills install "),
"sourceUrl": source_url,
})
diff --git a/website/src/pages/plugins/index.tsx b/website/src/pages/plugins/index.tsx
index 6690ff37160..94540b2d899 100644
--- a/website/src/pages/plugins/index.tsx
+++ b/website/src/pages/plugins/index.tsx
@@ -2,6 +2,7 @@ import React, { useState, useMemo, useCallback, useRef, useEffect } from "react"
import Layout from "@theme/Layout";
import Link from "@docusaurus/Link";
import styles from "./styles.module.css";
+import { pluginCatalogInstallUrl } from "../../../../apps/shared/src/catalog-install";
interface PluginCapabilities {
providesTools?: string[];
@@ -186,6 +187,7 @@ function PluginCard({
const hookCount = caps.providesHooks?.length || 0;
const middlewareCount = caps.providesMiddleware?.length || 0;
const pinUrl = `${plugin.repo.replace(/\.git$/, "").replace(/\/$/, "")}/tree/${plugin.sha}`;
+ const installUrl = pluginCatalogInstallUrl(plugin);
return (
<div
@@ -267,7 +269,7 @@ function PluginCard({
))}
</div>
- {onPick && (
+ {onPick ? (
<button
className={styles.pickBtn}
onClick={(e) => {
@@ -277,6 +279,14 @@ function PluginCard({
>
+ Add to this Agent
</button>
+ ) : (
+ <a
+ className={styles.pickBtn}
+ href={installUrl}
+ onClick={(e) => e.stopPropagation()}
+ >
+ Install in Hermes
+ </a>
)}
{expanded && (
@@ -553,7 +563,7 @@ export default function PluginCatalogPage() {
</span>
</nav>
<p className={styles.heroSub}>
- Reviewed, SHA-pinned plugins you can install with one command.
+ Reviewed, SHA-pinned plugins. Open in Hermes Desktop to review and install, or copy the CLI command.
{loadError && (
<span style={{ color: "#f87171", marginLeft: 8 }}>
· failed to load catalog ({loadError})
diff --git a/website/src/pages/plugins/styles.module.css b/website/src/pages/plugins/styles.module.css
index bbd52be0c9c..37e65af6afc 100644
--- a/website/src/pages/plugins/styles.module.css
+++ b/website/src/pages/plugins/styles.module.css
@@ -882,11 +882,19 @@
color: var(--ifm-color-primary);
font-size: 0.85rem;
font-weight: 600;
+ text-align: center;
+ text-decoration: none;
cursor: pointer;
transition: background 0.15s ease, color 0.15s ease;
}
.pickBtn:hover {
background: var(--ifm-color-primary);
- color: #fff;
+ color: var(--ifm-color-emphasis-0);
+ text-decoration: none;
+}
+
+.pickBtn:focus-visible {
+ outline: 2px solid var(--ifm-color-primary);
+ outline-offset: 2px;
}
diff --git a/website/src/pages/skills/index.tsx b/website/src/pages/skills/index.tsx
index 8bc022524df..b143beec771 100644
--- a/website/src/pages/skills/index.tsx
+++ b/website/src/pages/skills/index.tsx
@@ -2,6 +2,7 @@ import React, { useState, useMemo, useCallback, useRef, useEffect } from "react"
import Layout from "@theme/Layout";
import Link from "@docusaurus/Link";
import styles from "./styles.module.css";
+import { skillCatalogInstallIdentifier, skillCatalogInstallUrl } from "../../../../apps/shared/src/catalog-install";
interface Skill {
name: string;
@@ -19,6 +20,7 @@ interface Skill {
commands?: string[];
docsPath?: string;
identifier?: string;
+ installIdentifier?: string;
installCmd?: string;
/** Clickable URL to the skill's origin (repo / detail page). Synthesized
* in extract-skills.py for community skills that have no generated docs
@@ -300,6 +302,7 @@ function SkillCard({
}) {
const src = SOURCE_CONFIG[skill.source] || SOURCE_CONFIG["optional"];
const icon = CATEGORY_ICONS[skill.category] || "\u{1F4E6}";
+ const installUrl = skillCatalogInstallUrl(skill);
return (
<div
@@ -351,6 +354,16 @@ function SkillCard({
))}
</div>
+ {!onPick && installUrl && (
+ <a
+ className={styles.pickBtn}
+ href={installUrl}
+ onClick={(e) => e.stopPropagation()}
+ >
+ Install in Hermes
+ </a>
+ )}
+
{expanded && (
<div className={styles.cardDetail}>
{skill.overview && (
@@ -419,9 +432,9 @@ function SkillCard({
</div>
)}
<div className={styles.installHint}>
- <code>{skill.installCmd || `hermes skills install ${skill.name}`}</code>
+ <code>{skill.installCmd || `hermes skills install ${skillCatalogInstallIdentifier(skill) || skill.name}`}</code>
<CopyButton
- text={skill.installCmd || `hermes skills install ${skill.name}`}
+ text={skill.installCmd || `hermes skills install ${skillCatalogInstallIdentifier(skill) || skill.name}`}
/>
</div>
{onPick ? (
@@ -521,8 +534,8 @@ export default function SkillsDashboard() {
{
type: "hermes-skill-pick",
name: skill.name,
- identifier: skill.identifier || skill.name,
- installCmd: skill.installCmd || `hermes skills install ${skill.name}`,
+ identifier: skillCatalogInstallIdentifier(skill) || skill.name,
+ installCmd: skill.installCmd || `hermes skills install ${skillCatalogInstallIdentifier(skill) || skill.name}`,
source: skill.source,
},
"*"
@@ -700,7 +713,7 @@ export default function SkillsDashboard() {
<strong className={styles.heroAccent}>
{data ? allSkillsLocal.length.toLocaleString() : "…"}
</strong>{" "}
- skills across {sources.length - 1} registries
+ skills across {sources.length - 1} registries. Open in Hermes Desktop to review and install, or copy the CLI command.
{loadError && (
<span style={{ color: "#f87171", marginLeft: 8 }}>
· failed to load catalog ({loadError})
diff --git a/website/src/pages/skills/styles.module.css b/website/src/pages/skills/styles.module.css
index 559089dc278..e0ada5625c1 100644
--- a/website/src/pages/skills/styles.module.css
+++ b/website/src/pages/skills/styles.module.css
@@ -1030,6 +1030,8 @@
color: var(--ifm-color-primary);
font-size: 0.85rem;
font-weight: 600;
+ text-align: center;
+ text-decoration: none;
cursor: pointer;
transition: background 0.15s ease, color 0.15s ease;
}
@@ -1038,4 +1040,10 @@
background: var(--ifm-color-primary);
/* --ifm-background-color is transparent in light mode (#91491). */
color: var(--ifm-color-emphasis-0, #f7f8fa);
+ text-decoration: none;
+}
+
+.pickBtn:focus-visible {
+ outline: 2px solid var(--ifm-color-primary);
+ outline-offset: 2px;
}