Skip to content

Commit 241a3e7

Browse files
committed
refactor: simplify all install commands to use OpenBoot CLI
Replace all curl commands with simple 'openboot install' format: - Config detail page: openboot install user/slug - Dashboard: openboot install user/slug or openboot install alias - Explore page: openboot install user/slug - Profile page: openboot install user/slug Rationale: Landing page already guides users to install OpenBoot CLI first, so we can assume users have the CLI installed and use the simpler command. Removed dual-command logic and complex conditional rendering. All install commands now use consistent, user-friendly CLI format.
1 parent fc2b0a7 commit 241a3e7

File tree

4 files changed

+16
-92
lines changed

4 files changed

+16
-92
lines changed

src/routes/[username]/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838
3939
function copyCommand(configSlug: string, configId: string) {
40-
const cmd = `curl -fsSL https://openboot.dev/${data.profileUser.username}/${configSlug} | bash`;
40+
const cmd = `openboot install ${data.profileUser.username}/${configSlug}`;
4141
navigator.clipboard.writeText(cmd);
4242
copiedId = configId;
4343
setTimeout(() => copiedId = '', 2000);
@@ -185,7 +185,7 @@
185185
</div>
186186
</a>
187187
<div class="config-install">
188-
<code class="install-command"><span class="prompt">$</span> curl -fsSL openboot.dev/{data.profileUser.username}/{config.slug} | bash</code>
188+
<code class="install-command"><span class="prompt">$</span> openboot install {data.profileUser.username}/{config.slug}</code>
189189
<button class="copy-button" onclick={() => copyCommand(config.slug, config.id)}>
190190
{copiedId === config.id ? 'Copied!' : 'Copy'}
191191
</button>

src/routes/[username]/[slug]/+page.svelte

Lines changed: 8 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@
66
77
let activeTab = $state('overview');
88
let copied = $state(false);
9-
let copiedCli = $state(false);
109
let showShareModal = $state(false);
1110
let shareCopied = $state(false);
1211
let forking = $state(false);
1312
let forkError = $state('');
1413
1514
function getInstallCommand() {
16-
return `curl -fsSL https://openboot.dev/${data.configUser.username}/${data.config.slug} | bash`;
17-
}
18-
19-
function getCliInstallCommand() {
2015
return `openboot install ${data.configUser.username}/${data.config.slug}`;
2116
}
2217
@@ -26,12 +21,6 @@
2621
setTimeout(() => (copied = false), 2000);
2722
}
2823
29-
function copyCliCommand() {
30-
navigator.clipboard.writeText(getCliInstallCommand());
31-
copiedCli = true;
32-
setTimeout(() => (copiedCli = false), 2000);
33-
}
34-
3524
function getShareUrl() {
3625
return `https://openboot.dev/${data.configUser.username}/${data.config.slug}`;
3726
}
@@ -119,8 +108,6 @@
119108
? data.config.packages.map((p: any) => (typeof p === 'string' ? { name: p, type: 'formula' } : p))
120109
: []);
121110
122-
const hasOpenBootPackage = $derived(configPkgs.some((p: any) => p.name === 'openboot'));
123-
124111
const configCli = $derived(configPkgs.filter((p: any) => p.type !== 'cask' && p.type !== 'npm'));
125112
const configApps = $derived(configPkgs.filter((p: any) => p.type === 'cask'));
126113
const configNpm = $derived(configPkgs.filter((p: any) => p.type === 'npm'));
@@ -176,38 +163,12 @@
176163

177164
<div class="install-box">
178165
<div class="install-label">Install with one command</div>
179-
{#if hasOpenBootPackage}
180-
<div class="install-command recommended">
181-
<div class="command-label">
182-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
183-
Recommended (with OpenBoot installed)
184-
</div>
185-
<div class="command-row">
186-
<code>{getCliInstallCommand()}</code>
187-
<button class="copy-btn" onclick={copyCliCommand}>
188-
{copiedCli ? 'Copied!' : 'Copy'}
189-
</button>
190-
</div>
191-
</div>
192-
<div class="install-command">
193-
<div class="command-label">First time installation</div>
194-
<div class="command-row">
195-
<code>{getInstallCommand()}</code>
196-
<button class="copy-btn" onclick={copyCommand}>
197-
{copied ? 'Copied!' : 'Copy'}
198-
</button>
199-
</div>
200-
</div>
201-
{:else}
202-
<div class="install-command single">
203-
<div class="command-row">
204-
<code>{getInstallCommand()}</code>
205-
<button class="copy-btn" onclick={copyCommand}>
206-
{copied ? 'Copied!' : 'Copy'}
207-
</button>
208-
</div>
209-
</div>
210-
{/if}
166+
<div class="install-command">
167+
<code>{getInstallCommand()}</code>
168+
<button class="copy-btn" onclick={copyCommand}>
169+
{copied ? 'Copied!' : 'Copy'}
170+
</button>
171+
</div>
211172
<button class="fork-btn" onclick={forkConfig} disabled={forking}>
212173
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="18" r="3"/><circle cx="6" cy="6" r="3"/><circle cx="18" cy="6" r="3"/><path d="M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9"/><path d="M12 12v3"/></svg>
213174
{forking ? 'Forking...' : 'Fork Config'}
@@ -630,49 +591,12 @@
630591
631592
.install-command {
632593
display: flex;
633-
flex-direction: column;
634-
gap: 8px;
594+
align-items: center;
595+
gap: 12px;
635596
background: var(--bg-tertiary);
636597
border: 1px solid var(--border);
637598
border-radius: 8px;
638599
padding: 12px 16px;
639-
margin-bottom: 12px;
640-
}
641-
642-
.install-command.single {
643-
flex-direction: row;
644-
align-items: center;
645-
gap: 12px;
646-
}
647-
648-
.install-command:last-of-type {
649-
margin-bottom: 16px;
650-
}
651-
652-
.install-command.recommended {
653-
background: color-mix(in srgb, var(--accent) 5%, var(--bg-tertiary));
654-
border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
655-
}
656-
657-
.command-label {
658-
display: flex;
659-
align-items: center;
660-
gap: 6px;
661-
font-size: 0.75rem;
662-
color: var(--text-muted);
663-
font-weight: 500;
664-
text-transform: uppercase;
665-
letter-spacing: 0.05em;
666-
}
667-
668-
.command-label svg {
669-
color: var(--accent);
670-
}
671-
672-
.command-row {
673-
display: flex;
674-
align-items: center;
675-
gap: 12px;
676600
}
677601
678602
.install-command code {

src/routes/dashboard/+page.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,11 @@
426426
return date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });
427427
}
428428
429-
function getInstallUrl(config: Config): string {
429+
function getInstallCommand(config: Config): string {
430430
if (config.alias) {
431-
return `openboot.dev/${config.alias}`;
431+
return `openboot install ${config.alias}`;
432432
}
433-
return `openboot.dev/${$auth.user?.username}/${config.slug}`;
433+
return `openboot install ${$auth.user?.username}/${config.slug}`;
434434
}
435435
436436
async function importBrewfile() {
@@ -606,8 +606,8 @@
606606
{/if}
607607
</div>
608608
<div class="config-url" onclick={(e) => e.stopPropagation()} onkeydown={(e) => e.stopPropagation()} role="presentation">
609-
<code>curl -fsSL {getInstallUrl(config)} | bash</code>
610-
<button class="copy-btn" onclick={() => copyToClipboard(`curl -fsSL https://${getInstallUrl(config)} | bash`, config.id)}>{copiedId === config.id ? 'Copied!' : 'Copy'}</button>
609+
<code>{getInstallCommand(config)}</code>
610+
<button class="copy-btn" onclick={() => copyToClipboard(getInstallCommand(config), config.id)}>{copiedId === config.id ? 'Copied!' : 'Copy'}</button>
611611
</div>
612612
<div class="config-actions" onclick={(e) => e.stopPropagation()} onkeydown={(e) => e.stopPropagation()} role="presentation">
613613
<Button variant="secondary" onclick={() => editConfig(config.slug)}>Edit</Button>

src/routes/explore/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
</div>
221221
</div>
222222
<div class="install-preview">
223-
<code><span class="prompt">$</span> curl -fsSL openboot.dev/{config.username}/{config.slug} | bash</code>
223+
<code><span class="prompt">$</span> openboot install {config.username}/{config.slug}</code>
224224
</div>
225225
</a>
226226
{/each}

0 commit comments

Comments
 (0)