Introduction¶
In DeepSeek Harness (DSH), viewing a GitHub repository, Issue, or Pull Request typically requires switching to a browser or using the GitHub CLI. For terminal-first workflows or scenarios where GitHub information needs to be embedded in an agent context, such context switching breaks the flow.
dsh-gh-view is a DSH plugin that integrates GitHub browsing directly into DSH: through numeric IDs or owner/repo references, it displays repository, Issue, and PR cards and summaries in agent tools, a side panel, and terminal output.
What It Is¶
- Plugin name: dsh-gh-view
- Maintainer: ModiAWA
- Purpose: A GitHub browsing tool for DSH, supporting agent tools, a side panel, and terminal image card output
- Data source: Prefers the
ghCLI; falls back to the GitHub REST API whenghis unavailable (supportsGITHUB_TOKENor anonymous access) - Rendering: Uses locally installed Microsoft Edge or Google Chrome headless mode to generate PNG cards; returns a text summary when no browser is available
Core Features¶
The plugin provides four entry points, all sharing the same data layer:
- Agent tools: Return PNG cards and text summaries; supports
image: falseto disable rendering gh_view: View a single Issue or PRgh_repo: View a repository overviewgh_list: List Issues/PRs or any typegh_search: Search GitHub repositories, Issues, or PRs- Side panel: Opens on the right side of the DSH window; enter
owner/repothen use#123to open an Issue or PR - Image cards: Renders repositories, Issues, PRs, or lists as PNGs for terminals that don’t support HTML
List rows display status, checks rollup, review verdict, assignees, comment count, and linked PRs. Detail pages support rendering Issue/PR titles, lists, code blocks, quotes, tables, images, <details>, and GitHub callouts.
The panel supports workspace and remote switching, filtering (state / labels / title), sorting, and pagination.
Installation & Enablement¶
Requires DeepSeek Harness ^0.2.2-rc.3 (any 0.2.x version below 0.3.0) and Node.js 22+.
Install by package name:
- Plugin manager: Plugins → Add plugin, target
dsh-gh-view - CLI:
dsh plugin --profile <profile> add dsh-gh-view
Install from a local directory:
dsh plugin --profile <profile> add /path/to/dsh-gh-view
After installation, the bundle patch inserts the following line:
- insert:
- id: gh-view
name: dsh-gh-view
config: {}
Typical Usage¶
Agent Tools¶
gh_view¶
gh_view(ref: "#123", repo?: "owner/repo", kind?: "any" | "issue" | "pr", image?: true)
ref accepts #123, 123, or owner/repo#123, and automatically detects whether it’s an Issue or a PR.
gh_view(ref="#11099", repo="AstrBotDevs/AstrBot")
gh_repo¶
gh_repo(repo?: "owner/repo", image?: true)
Repository overview: description, stars, forks, watchers, open Issue/PR count, languages, license, default branch, topics, and latest release.
gh_list¶
gh_list(repo?: "owner/repo", kind?: "issue" | "pr" | "any",
state?: "open" | "closed" | "all", labels?, search?,
sort?: "created" | "updated", limit?, image?: true)
search filters by title; sort defaults to created.
gh_search¶
gh_search(query: "repo:owner/name is:open label:bug", limit?, image?: true)
Default Repository¶
Repository tools accept an explicit repo parameter; when omitted, it’s detected from the git remote of the current session’s working directory:
upstreamtakes priority overorigin;- If only
originexists,originis used; - If neither exists, an error is raised with a hint to pass
owner/repo.
The scope is the current directory, not a global setting.
GitHub Panel¶
Click the GitHub row in the left sidebar (below Plugins and Scheduled tasks) to open it, or use it as a right sidebar tab.
- Close: ×
- Back: ← Back, returns to the source list and preserves filters
- Refresh: ⟳ (client-side cache 30 s, server-side cache 60 s)
- Query area: Auto-collapses after a repository is detected; use ⌄ / ⌃ to expand
- Repository selection: Defaults to the remote of the current session directory; remembers the last selection after switching workspaces
- Pagination: 20 rows per page; shows “Load more” when the page is full
- Filter & sort: state / labels / title; Newest created / Recently updated
- Jump: Type
#123orowner/repo#123, press Jump
HTTP Routes¶
The plugin exposes the following HTTP routes (all support dir= as an alternative to repo=):
| Route | Purpose |
|---|---|
GET /gh-view/health |
{ok, version, build, source, canRender, supportsImageTools, remotes} |
GET /gh-view/remotes?dir= |
GitHub remotes for a directory: {ok, data: {origin, upstream, preferred, remotes}} |
GET /gh-view/repo?repo= |
Repository info (JSON) |
GET /gh-view/readme?repo= |
Repository README markdown, or null |
GET /gh-view/repo-card?repo= |
Repository card (PNG) |
GET /gh-view/view?repo=&ref= |
Single Issue/PR (JSON) |
GET /gh-view/view-card?repo=&ref= |
Single Issue/PR card (PNG) |
GET /gh-view/list?repo=&kind=&state=&labels=&search=&sort=&limit=&offset=&badges=0 |
List (JSON), one page |
GET /gh-view/search?q=&limit= |
Search (JSON) |
Using Outside DSH¶
The data layer and rendering layer are plain ES modules and do not import any DSH content:
import { getRepo, getPull, getAnyRef } from 'dsh-gh-view/lib/github.js'
import { renderCard } from 'dsh-gh-view/lib/render.js'
import { writeFileSync } from 'node:fs'
const pull = await getAnyRef('AstrBotDevs/AstrBot', 11099)
const { png } = await renderCard(pull)
writeFileSync('card.png', png)
When using from a plain checkout, replace the package name with a relative path (e.g., ./lib/github.js).
Use Cases & Notes¶
Suitable for the following scenarios:
- Browsing GitHub repositories, Issues, and PRs directly in the DSH terminal without switching to a browser
- Embedding GitHub information as cards in agent context or terminal output
- Viewing rendered PNG cards in terminal environments without a graphical interface
- Accessing GitHub data outside DSH via HTTP endpoints
Notes:
- The plugin runs with the permissions of the current dsh process; review the source code and license before installing
- Card rendering requires locally installed Microsoft Edge or Google Chrome; falls back to a text summary when no browser is available
- Anonymous REST access is rate-limited to 60 requests/hour; results are cached for 60 seconds
Summary¶
dsh-gh-view brings GitHub browsing directly into the DSH workflow: through numeric IDs or owner/repo references, it uniformly displays repositories, Issues, and PRs in agent tools, a side panel, and terminal output. Whether in a graphical panel context or a headless terminal context, the same set of interfaces provides data and cards.