feat: update Homebrew install to homebrew-core and detect missing UI

- Update Homebrew command from tap (runkids/tap/skillshare) to
  homebrew-core (brew install skillshare) in README, website homepage,
  and getting-started docs
- Add note that Homebrew build is CLI-only (no web dashboard)
- Add IsUIBuilt() detection in embed.go/embed_dev.go to check for
  placeholder UI at startup
- Show CLI warning with install instructions when skillshare ui is
  run on a build without the frontend
- Add Homebrew Note section to commands/ui.md with migration steps
This commit is contained in:
Willie
2026-02-15 16:18:26 +08:00
parent d64e3b18f5
commit d30d90af76
7 changed files with 54 additions and 2 deletions
+3 -1
View File
@@ -142,9 +142,11 @@ irm https://raw.githubusercontent.com/runkids/skillshare/main/install.ps1 | iex
### Homebrew
```bash
brew install runkids/tap/skillshare
brew install skillshare
```
> **Note:** Recommended for CLI-only users. The Homebrew build does not include the [web dashboard](#web-dashboard) — all other commands work identically. For the full experience including `skillshare ui`, use the curl/PowerShell installer above.
### Shorthand (Optional)
Add an alias to your shell config (`~/.zshrc` or `~/.bashrc`):
+14
View File
@@ -88,6 +88,13 @@ func startProjectUI(addr, url string, noOpen bool) error {
Mode: "merge",
}
if !server.IsUIBuilt() {
ui.Warning("Web UI is not included in this build.")
ui.Warning("Install with the full installer to get the web UI:")
fmt.Println(" curl -fsSL https://raw.githubusercontent.com/runkids/skillshare/main/install.sh | sh")
return nil
}
if !noOpen {
ui.Success("Opening %s in your browser... (project mode)", url)
openBrowser(url)
@@ -103,6 +110,13 @@ func startGlobalUI(addr, url string, noOpen bool) error {
return err
}
if !server.IsUIBuilt() {
ui.Warning("Web UI is not included in this build.")
ui.Warning("Install with the full installer to get the web UI:")
fmt.Println(" curl -fsSL https://raw.githubusercontent.com/runkids/skillshare/main/install.sh | sh")
return nil
}
if !noOpen {
ui.Success("Opening %s in your browser...", url)
openBrowser(url)
+10
View File
@@ -10,6 +10,16 @@ import (
"strings"
)
// IsUIBuilt reports whether the embedded dist contains a real frontend build.
// Returns false when the dist only contains a placeholder (e.g. Homebrew or make build without UI).
func IsUIBuilt() bool {
data, err := distFS.ReadFile("dist/index.html")
if err != nil {
return false
}
return !strings.Contains(string(data), "UI not built")
}
//go:embed all:dist
var distFS embed.FS
+6
View File
@@ -6,6 +6,12 @@ import (
"net/http"
)
// IsUIBuilt reports whether the embedded dist contains a real frontend build.
// In dev mode, the frontend is served by Vite, not embedded.
func IsUIBuilt() bool {
return false
}
// spaHandler returns a placeholder handler when building with -tags dev.
// In dev mode, use the Vite dev server on :5173 instead.
func spaHandler() http.Handler {
+11
View File
@@ -139,6 +139,17 @@ Or simply `skillshare ui` if `.skillshare/config.yaml` exists (auto-detected).
The dashboard reads and writes `.skillshare/config.yaml`, syncs to project-local targets, and reconciles remote skill entries after install — just like the CLI.
## Homebrew Note
The Homebrew formula (`brew install skillshare`) is optimized for CLI-only usage and does not include the web UI. If you installed via Homebrew and want the dashboard, reinstall with the full installer:
```bash
brew uninstall skillshare
curl -fsSL https://raw.githubusercontent.com/runkids/skillshare/main/install.sh | sh
```
All other CLI commands work identically regardless of install method.
## Architecture
The web UI is a single-page React application embedded in the Go binary via `go:embed`. No external dependencies are needed at runtime — just the `skillshare` binary.
@@ -15,6 +15,15 @@ Get your skills synced in 5 minutes.
## Step 1: Install skillshare
**Homebrew:**
```bash
brew install skillshare
```
:::note
Recommended for CLI-only users. The Homebrew build does not include the [web dashboard](/docs/commands/ui) — all other commands work identically. For the full experience including `skillshare ui`, use the curl installer below.
:::
**macOS / Linux:**
```bash
curl -fsSL https://raw.githubusercontent.com/runkids/skillshare/main/install.sh | sh
+1 -1
View File
@@ -22,7 +22,7 @@ const INSTALL_COMMANDS: Record<InstallMethod, {command: string; label: string; i
icon: <span style={{fontSize: '12px'}}>PS</span>,
},
homebrew: {
command: 'brew install runkids/tap/skillshare',
command: 'brew install skillshare',
label: 'Homebrew',
icon: <Apple size={14} />,
},