Skip to content

docs: add quick-start terminal to homepage hero - #565

Merged
edenreich merged 9 commits into
mainfrom
docs/issue-558-20260817-1628
Aug 17, 2026
Merged

edenreich merged 9 commits into
mainfrom
docs/issue-558-20260817-1628

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Summary

Adds an iTerm2-style terminal window directly under the homepage hero, before the feature grid, with a copy-to-clipboard button.

  • New .vitepress/theme/components/QuickStartTerminal.vue: macOS-style title bar (traffic-light dots), dark body, green prompt, and a Copy button using navigator.clipboard.
  • Mounted via the default theme's home-hero-after slot in .vitepress/theme/index.ts.
  • The snippet is the copy-paste runnable docker run from the getting started guide, and the block links to /getting-started/.

No new dependencies. Verified with bun run format:check, bun run lint:md, and bun run build (component present in the SSR output of index.html).

Closes #558

@inference-gateway inference-gateway deleted a comment from github-actions Bot Aug 17, 2026
@inference-gateway-releaser

inference-gateway-releaser Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

🗑️ Preview environment destroyed.

@edenreich

Copy link
Copy Markdown
Contributor

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @edenreich's task in 29s —— View job


Added space below the terminal

  • Read the component
  • Add spacing to the link paragraph
  • Commit (ac6e558)

VitePress's reset zeroes out p margins, so the caption sat flush against the terminal window. Added an explicit rule in .vitepress/theme/components/QuickStartTerminal.vue:

.quickstart-link {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--vp-c-text-2);
}

The smaller size and muted color also make it read as a caption rather than body text. The preview deployment will rebuild with the new commit.

Not run: bun run build / format:check - no local exec in this environment. CI covers both, and this is a scoped-CSS-only change.
| Branch

@edenreich

Copy link
Copy Markdown
Contributor

@claude

  1. "Read the getting started guide" is changing the cursor as if it's clickable but the the link is not highlighted properly.
  2. When clicking on "Copy" the whole title is shifting left, perhaps we also can just change the text from Copy to a common shadcn icon or whatever icon library we are using.
  3. Please add another terminal also for the the cli quick start - as the cli is also a core component of the ecosystem.

use /ponytail:ponytail

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @edenreich's task in 2m 5s —— View job


All three items done (30ce9a9)

  • Link now looks like a link
  • Copy is an icon, title no longer shifts
  • Second terminal for the CLI quick start

1. Link styling - VitePress's home layout doesn't style bare anchors in custom slots, so it inherited body color. Added an explicit rule:

.quickstart-link a {
  color: var(--vp-c-brand-1);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

2. Copy button - the shift came from Copy -> Copied! changing the button width, which squeezed the flex: 1 centered title. Swapped the label for a fixed 26x26 icon button (inline SVG, lucide-style copy -> check on success). No icon dependency added - it's two paths, and there's no icon library in package.json. The label lives on aria-label/title, so it stays accessible and still shows a "Copied!" tooltip state.

3. CLI terminal - the component now renders from a small array, so both windows share one markup/style block:

$ curl -fsSL https://raw.githubusercontent.com/inference-gateway/cli/main/install.sh | bash
$ infer init
$ infer chat
# Interactive chat, agents, and tools from your terminal

Each command line gets its own $ prompt (continuation lines in the Docker command don't), and copy grabs the whole block. The caption now links to both /getting-started/ and /cli/.

Verified locally: bun run build succeeds and both quickstart-window blocks are in the SSR output of index.html, with line breaks intact inside <pre>; bun run format:check passes.

skipped: an icon library and a <QuickStartTerminal> props API - add when a third caller needs different content.
| Branch

@edenreich

Copy link
Copy Markdown
Contributor

@claude I tried the first command but it failed due to restrictive permissions, you should use the user's home dir and install the binary locally for the user - no system wide. check the examples in the cli. Or use npx which is also supported.

image

use /ponytail:ponytail

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @edenreich's task in 27s —— View job


Switched the CLI terminal to npx (1728fd2)

  • Check how cli.md recommends installing
  • Replace the curl-pipe-bash install with npx
  • Commit

cli.md:27 already lists npm / npx as the recommended install, so the hero now matches the docs instead of piping a script that writes to a system-wide dir:

$ npx @inference-gateway/cli@latest init
$ npx @inference-gateway/cli@latest chat
# Interactive chat, agents, and tools from your terminal

No install step at all - the native binary is downloaded and cached on first use, nothing goes outside the user's home. The caption still links to /cli/ for the install-script and Go options (including --install-dir $HOME/.local/bin, which is the local-install answer for people who want a real binary).

skipped: adding a second "or install locally" line to the hero - /cli/ already covers every method, and the hero should stay one copy-paste.

Not run: bun run build / format:check - no local exec in this environment. CI covers both; this is a two-string change.
| Branch

@edenreich

Copy link
Copy Markdown
Contributor

@claude CI is failing - can you fix this?

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @edenreich's task in 1m 5s —— View job


CI fixed (b733981)

  • Read the failing job log
  • Apply Prettier formatting
  • Commit

Only Lint / Check formatting was red - Build and Docs drift passed. prettier --check . flagged .vitepress/theme/components/QuickStartTerminal.vue: my last commit (1728fd2) shortened the two CLI strings, so the array now fits inside the 100-column print width and Prettier wants it on one line.

-    commands: [
-      'npx @inference-gateway/cli@latest init',
-      'npx @inference-gateway/cli@latest chat',
-    ],
+    commands: ['npx @inference-gateway/cli@latest init', 'npx @inference-gateway/cli@latest chat'],

Verified: bunx prettier --check . now reports "All matched files use Prettier code style!". No behavior change - whitespace only.
| Branch

@edenreich
edenreich merged commit d5c55aa into main Aug 17, 2026
1 check passed
@edenreich
edenreich deleted the docs/issue-558-20260817-1628 branch August 17, 2026 19:28
inference-gateway-releaser Bot added a commit that referenced this pull request Aug 24, 2026
## [0.9.12](0.9.11...0.9.12) (2026-08-24)

### 🐛 Bug Fixes

* auto-generate footer copyright year ([#570](#570)) ([bd7a0ad](bd7a0ad))
* **ci:** install Bun in the preview teardown job ([#567](#567)) ([68aed64](68aed64))
* **ci:** remove preview deployments with the workflow token on close ([527200a](527200a))
* connect app directly to gateway in homepage diagram ([#576](#576)) ([f74823b](f74823b))

### 👷 CI

* move docs deployment and PR previews to Cloudflare Pages ([#566](#566)) ([c369b52](c369b52))
* skip preview environment creation for dependabot PRs ([#583](#583)) ([bd22f31](bd22f31))

### 📚 Documentation

* add animated architecture diagram to homepage hero ([#568](#568)) ([aa85ad4](aa85ad4))
* add computer-use approval and pause/resume IPC ([#579](#579)) ([c4a7d9a](c4a7d9a))
* add quick-start terminal to homepage hero ([#565](#565)) ([d5c55aa](d5c55aa))
* align architecture diagrams with homepage and codebase ([#575](#575)) ([c2d9ffc](c2d9ffc))
* **cli:** update computer use to Computer tool and cgo-free build ([#584](#584)) ([cd670aa](cd670aa))
* de-duplicate provider list on homepage ([#569](#569)) ([a4726ae](a4726ae))
* drop floating window, desktop app for computer use ([#580](#580)) ([85e0a73](85e0a73))
* drop redundant 'How it works' from homepage ([#571](#571)) ([79d203c](79d203c))
* give the homepage a real contribution path ([#573](#573)) ([5ddfc8a](5ddfc8a))
* simplify the homepage ADL section for newcomers ([#572](#572)) ([684a1e2](684a1e2))

### 🔧 Miscellaneous

* **deps-dev:** bump mermaid from 11.16.1 to 11.17.0 in the bun group ([#582](#582)) ([bb85ea9](bb85ea9))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.9.12 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] Add quick-start code block to homepage hero

1 participant