Skip to content

Commit 74f6105

Browse files
committed
feat: add download page with platform detection and Homebrew tap automation
- Add /download page with automatic platform detection (macOS/Linux/Windows) - Integrate GitHub Releases API with localStorage caching - Add platform override for manual binary selection - Add Download link to navigation header - Add Homebrew tap auto-update job to release workflow - Bump version to 1.3.0
1 parent 30e86c9 commit 74f6105

File tree

8 files changed

+395
-6
lines changed

8 files changed

+395
-6
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,16 @@ jobs:
9191

9292
- name: Publish to npm with provenance
9393
run: npm publish --provenance --access public
94+
95+
homebrew:
96+
needs: release
97+
runs-on: ubuntu-latest
98+
steps:
99+
- name: Update Homebrew formula
100+
uses: mislav/bump-homebrew-formula-action@v3
101+
with:
102+
formula-name: clarissa
103+
homebrew-tap: cameronrye/homebrew-tap
104+
download-url: https://github.com/cameronrye/clarissa/releases/download/${{ github.ref_name }}/clarissa-macos-arm64
105+
env:
106+
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}

docs/.astro/data-store.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.16.4","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://cameronrye.github.io\",\"compressHTML\":true,\"base\":\"/clarissa/\",\"trailingSlash\":\"always\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_assets\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image/\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true,\"allowedDomains\":[]},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"staticImportMetaEnv\":false,\"chromeDevtoolsWorkspace\":false,\"failOnPrerenderConflict\":false,\"svgo\":false},\"legacy\":{\"collections\":false}}"]
1+
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.16.4","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://clarissa.run\",\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"always\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_assets\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image/\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true,\"allowedDomains\":[]},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"staticImportMetaEnv\":false,\"chromeDevtoolsWorkspace\":false,\"failOnPrerenderConflict\":false,\"svgo\":false},\"legacy\":{\"collections\":false}}"]

docs/.astro/types.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
/// <reference types="astro/client" />
2-
/// <reference path="content.d.ts" />

docs/src/components/Header.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ const currentPath = Astro.url.pathname;
44
55
const navItems = [
66
{ href: `${base}`, label: 'Home' },
7+
{ href: `${base}download/`, label: 'Download' },
78
{ href: `${base}docs/installation/`, label: 'Installation' },
89
{ href: `${base}docs/configuration/`, label: 'Configuration' },
910
{ href: `${base}docs/tools/`, label: 'Tools' },
1011
{ href: `${base}docs/mcp/`, label: 'MCP' },
11-
{ href: `${base}docs/usage/`, label: 'Usage' },
1212
];
1313
---
1414

docs/src/pages/download.astro

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
---
2+
import Base from '../layouts/Base.astro';
3+
import Header from '../components/Header.astro';
4+
import Footer from '../components/Footer.astro';
5+
6+
const base = import.meta.env.BASE_URL;
7+
---
8+
9+
<Base title="Download" description="Download Clarissa for your platform - macOS, Linux, or Windows">
10+
<Header />
11+
<main class="download-page">
12+
<div class="container">
13+
<h1 class="gradient-text">Download Clarissa</h1>
14+
<p class="subtitle">Get the standalone binary for your platform</p>
15+
16+
<div id="download-section" class="download-section">
17+
<div class="loading">Loading latest release...</div>
18+
</div>
19+
20+
<div class="alternative-install">
21+
<h2>Alternative Installation Methods</h2>
22+
<div class="install-options">
23+
<div class="install-option">
24+
<h3>npm / Bun</h3>
25+
<p>Install globally with your preferred package manager:</p>
26+
<div class="install-command">
27+
<code>bun install -g clarissa</code>
28+
<button class="copy-btn" data-copy="bun install -g clarissa" aria-label="Copy">
29+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
30+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
31+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
32+
</svg>
33+
</button>
34+
</div>
35+
<div class="install-command">
36+
<code>npm install -g clarissa</code>
37+
<button class="copy-btn" data-copy="npm install -g clarissa" aria-label="Copy">
38+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
39+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
40+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
41+
</svg>
42+
</button>
43+
</div>
44+
</div>
45+
<div class="install-option">
46+
<h3>Homebrew (macOS)</h3>
47+
<p>Install via Homebrew tap:</p>
48+
<div class="install-command">
49+
<code>brew install cameronrye/tap/clarissa</code>
50+
<button class="copy-btn" data-copy="brew install cameronrye/tap/clarissa" aria-label="Copy">
51+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
52+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
53+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
54+
</svg>
55+
</button>
56+
</div>
57+
</div>
58+
<div class="install-option">
59+
<h3>From Source</h3>
60+
<p>Clone and build from the repository:</p>
61+
<div class="install-command">
62+
<code>git clone https://github.com/cameronrye/clarissa.git && cd clarissa && bun install && bun link</code>
63+
<button class="copy-btn" data-copy="git clone https://github.com/cameronrye/clarissa.git && cd clarissa && bun install && bun link" aria-label="Copy">
64+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
65+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
66+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
67+
</svg>
68+
</button>
69+
</div>
70+
</div>
71+
</div>
72+
</div>
73+
</div>
74+
</main>
75+
<Footer />
76+
</Base>
77+
78+
<script>
79+
import { initDownloadPage } from '../scripts/download.ts';
80+
initDownloadPage();
81+
82+
document.querySelectorAll('.copy-btn').forEach(btn => {
83+
btn.addEventListener('click', async () => {
84+
const text = btn.getAttribute('data-copy');
85+
if (text) {
86+
await navigator.clipboard.writeText(text);
87+
btn.classList.add('copied');
88+
setTimeout(() => btn.classList.remove('copied'), 2000);
89+
}
90+
});
91+
});
92+
</script>
93+
94+
<style>
95+
.download-page {
96+
padding: 4rem 0;
97+
min-height: 70vh;
98+
}
99+
100+
.download-page h1 {
101+
text-align: center;
102+
font-size: 2.5rem;
103+
margin-bottom: 0.5rem;
104+
}
105+
106+
.subtitle {
107+
text-align: center;
108+
color: var(--color-text-muted);
109+
margin-bottom: 3rem;
110+
}
111+
112+
.download-section {
113+
max-width: 800px;
114+
margin: 0 auto 4rem;
115+
}
116+
117+
.loading {
118+
text-align: center;
119+
color: var(--color-text-muted);
120+
padding: 2rem;
121+
}
122+
123+
.alternative-install {
124+
max-width: 900px;
125+
margin: 0 auto;
126+
}
127+
128+
.alternative-install h2 {
129+
text-align: center;
130+
margin-bottom: 2rem;
131+
}
132+
133+
.install-options {
134+
display: grid;
135+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
136+
gap: 1.5rem;
137+
}
138+
139+
.install-option {
140+
background: var(--color-bg-secondary);
141+
border: 1px solid var(--color-border);
142+
border-radius: 12px;
143+
padding: 1.5rem;
144+
}
145+
146+
.install-option h3 {
147+
color: var(--color-cyan);
148+
margin-bottom: 0.5rem;
149+
}
150+
151+
.install-option p {
152+
color: var(--color-text-muted);
153+
font-size: 0.875rem;
154+
margin-bottom: 1rem;
155+
}
156+
157+
.install-command {
158+
display: flex;
159+
align-items: center;
160+
gap: 0.5rem;
161+
background: var(--color-bg-tertiary);
162+
border: 1px solid var(--color-border);
163+
border-radius: 6px;
164+
padding: 0.5rem 0.75rem;
165+
margin-bottom: 0.5rem;
166+
}
167+
168+
.install-command:last-child {
169+
margin-bottom: 0;
170+
}
171+
172+
.install-command code {
173+
flex: 1;
174+
background: none;
175+
color: var(--color-cyan);
176+
font-size: 0.8rem;
177+
white-space: nowrap;
178+
overflow: hidden;
179+
text-overflow: ellipsis;
180+
}
181+
182+
.copy-btn {
183+
background: none;
184+
border: none;
185+
color: var(--color-text-muted);
186+
cursor: pointer;
187+
padding: 4px;
188+
display: flex;
189+
flex-shrink: 0;
190+
transition: color 0.2s;
191+
}
192+
193+
.copy-btn:hover { color: var(--color-text); }
194+
.copy-btn.copied { color: var(--color-cyan); }
195+
</style>
196+

0 commit comments

Comments
 (0)