Skip to content

feat(web): put the one-line install in front of everyone - #113

Merged
ralyodio merged 1 commit into
masterfrom
feat/install-command-cta
Jul 30, 2026
Merged

feat(web): put the one-line install in front of everyone#113
ralyodio merged 1 commit into
masterfrom
feat/install-command-cta

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The CLI is the product and the way you get it was nowhere on the site — you had to already know the URL of a script sitting in public/.

curl -fsSL https://logicsrc.com/install.sh | sh

Two placements, one definition

  • Homepage hero — the loud version, directly under the lede and above the fold: bordered dark panel, command at full size, Copy alongside, with a read the script first link.
  • Every page — a compact version in the rail between the brand and the nav. Present on arrival, never competing with navigation.

Both render from renderInstallCommand() in one module. The homepage builds HTML as a string while the rest of the site is JSX — exactly the shape that lets one copy of a command drift while the other stays correct — so SiteShell renders the shared definition rather than restating it.

The flags are load-bearing

curl -fsSL, not bare curl. Without -f curl prints an HTTP error body and still exits 0, so a 404 gets piped into sh; without -L the install breaks the first time the URL redirects. This is the form install.sh already documents in its own header.

Copy button

One delegated listener on document for any [data-copy] button, mounted site-wide in the layout — the two placements arrive by different rendering paths and a document listener doesn't care which. Falls back to a throwaway textarea + execCommand outside a secure context, where navigator.clipboard is undefined, so the button never silently no-ops.

Verification

  • 13 new contract tests pass; 46 total pass in apps/logicsrc-web.
  • Tests pin the command, both placements, and that the clipboard payload equals the visible text.
  • They also read public/install.sh and assert it is #!/bin/sh and documents this exact command, so | sh can't quietly become a lie.
  • tsc --noEmit clean across the app.
  • Rendered both placements and SiteShell through react-dom/server to confirm real output and ordering (rail sits between brand and nav).

Pre-existing failure, not from this change: contract/ontology-api.contract.test.ts fails to resolve @logicsrc/validators (unbuilt workspace package). Verified it fails identically on a stashed, pristine origin/master. next build trips on the same chain.

🤖 Generated with Claude Code

The CLI is the product, and the way you get it was nowhere on the site. You
had to already know the URL of a script served out of public/.

Two placements, one command:

- The homepage hero gets the loud version, directly under the lede and above
  the fold -- a bordered dark panel, the command at full size, Copy alongside.
- Every page carries a compact version in the rail, between the brand and the
  nav. Present on arrival, never competing with navigation.

Both come from renderInstallCommand() in one module. The homepage builds its
HTML as a string and the rest of the site is JSX, which is precisely the shape
that lets one copy of a command drift while the other stays right -- so there
is one definition and SiteShell renders it rather than restating it.

The command keeps its flags: `curl -fsSL`. Without -f, curl prints an HTTP
error body and still exits 0, so a 404 gets piped into sh; without -L the
install breaks the first time the URL redirects. This is the form install.sh
already documents in its own header.

Copy is one delegated listener on document for any [data-copy] button, mounted
site-wide in the layout. Delegation because the two placements arrive by
different rendering paths and a document listener does not care which; it also
means the next copy button needs the attribute and no wiring. It falls back to
a throwaway textarea + execCommand outside a secure context, where
navigator.clipboard is simply undefined, so the button never no-ops silently.

The contract tests pin the command, both placements, and that the clipboard
payload equals the visible text -- a Copy button that hands over something
other than what is on screen is worse than no button. They also read
public/install.sh and assert it is #!/bin/sh and documents this exact command,
so `| sh` cannot quietly become a lie.

apps/logicsrc-web: 13 new tests pass, 46 total. The ontology-api contract file
fails to resolve @logicsrc/validators, which it also does on a pristine
origin/master -- unbuilt workspace package, unrelated to this change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit f41abbd into master Jul 30, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant