### Install Hook and Start Daemon Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/agent_baseline/help.txt Quick start example to install the RCH hook and start the local RCH daemon. ```bash rch hook install && rch daemon start ``` -------------------------------- ### Install and Run Soft Serve Git Server Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/infrastructure.md Installs Soft Serve via Homebrew and starts the Git server. Access and clone repositories using SSH. ```bash # Install brew install soft-serve # Start soft serve # Access ssh localhost -p 23231 git clone ssh://localhost:23231/repo ``` -------------------------------- ### 5-Minute TUI Example Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/go-tui.md A basic interactive list for selecting an item. Requires Bubble Tea and Lip Gloss libraries. Run with `go mod init example && go get github.com/charmbracelet/bubbletea github.com/charmbracelet/lipgloss && go run .` ```go package main import ( "fmt" "os" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" ) var ( selected = lipgloss.NewStyle().Foreground(lipgloss.Color("212")).Bold(true) normal = lipgloss.NewStyle().Foreground(lipgloss.Color("252")) title = lipgloss.NewStyle().Bold(true).Padding(0, 1).Background(lipgloss.Color("62")) ) type model struct { items []string cursor int } func (m model) Init() tea.Cmd { return nil } func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyMsg: switch msg.String() { case "q", "ctrl+c": return m, tea.Quit case "up", "k": if m.cursor > 0 { m.cursor-- } case "down", "j": if m.cursor < len(m.items)-1 { m.cursor++ } case "enter": fmt.Printf("\nYou chose: %s\n", m.items[m.cursor]) return m, tea.Quit } } return m, nil } func (m model) View() string { s := title.Render("Select an item") + "\n\n" for i, item := range m.items { cursor := " " style := normal if m.cursor == i { cursor = "▸ " style = selected } s += cursor + style.Render(item) + "\n" } s += "\n" + normal.Render("↑/↓: move • enter: select • q: quit") return s } func main() { m := model{items: []string{"Option A", "Option B", "Option C"}} if _, err := tea.NewProgram(m).Run(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } ``` -------------------------------- ### Initialize RCH with Init Wizard Source: https://context7.com/dicklesworthstone/remote_compilation_helper/llms.txt Starts the interactive setup wizard for RCH. Use --yes to accept all defaults or --skip-test to omit the test compilation step. ```bash # Start interactive setup wizard rch init # Accept all defaults without prompting rch init --yes # Skip the test compilation step rch init --skip-test ``` -------------------------------- ### Run Development Server Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/web/README.md Use these commands to start the Next.js development server. Ensure you have Node.js and a package manager (npm, yarn, pnpm, or bun) installed. ```bash npm run dev # or yarn dev # or pnpm dev # or bun dev ``` -------------------------------- ### Install via Scoop Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/SKILL.md Installs the tool on Windows using the Scoop package manager. First, add the necessary bucket, then install the tool. ```bash scoop bucket add user https://github.com/user/scoop-bucket ``` ```bash scoop install tool ``` -------------------------------- ### Install x/term Package Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/infrastructure.md Install the x/term package for terminal detection capabilities. Use the provided go get command. ```bash go get github.com/charmbracelet/x/term@latest ``` -------------------------------- ### Build Started Event Payload Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/extending/integration-hooks.md Example JSON payload for the 'build.started' event, containing details about the build initiation. ```json { "event": "build.started", "timestamp": "2026-01-17T10:30:00Z", "build_id": "abc123", "project": "my-project", "command": "cargo build --release", "worker": "worker1", "workstation": "dev-machine" } ``` -------------------------------- ### Install teatest Package Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/infrastructure.md Install the teatest package for Bubble Tea TUI testing. Use the provided go get command. ```bash go get github.com/charmbracelet/x/exp/teatest@latest ``` -------------------------------- ### Installation Section Template Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/SKILL.md Template for the Installation section of a README.md, providing quick install via curl and options for further customization. ```markdown ## Installation ### Quick Install (Recommended) ```bash curl -fsSL https://raw.githubusercontent.com/user/repo/main/install.sh | bash ``` **With options:** ```bash # Auto-update PATH curl -fsSL https://... | bash -s -- --easy-mode ``` -------------------------------- ### Quick Example Section Template Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/SKILL.md A template for the Quick Example section in a README.md, demonstrating core workflow with a series of commands. ```markdown ### Quick Example ```bash # Initialize (one-time setup) $ tool init # Core operation $ tool do-thing --flag value # See results $ tool show results # The killer feature $ tool magic --auto ``` ``` -------------------------------- ### Install via Homebrew Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/SKILL.md Installs the tool on macOS or Linux using the Homebrew package manager. Ensure Homebrew is installed and the user repository is added. ```bash brew install user/tap/tool ``` -------------------------------- ### Install rch with Easy Mode Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/README.md Installs `rch` and `rchd`, bootstraps configuration, and optionally starts the background daemon. This command uses a dynamic URL to ensure the latest version is fetched. ```bash curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/remote_compilation_helper/main/install.sh?$(date +%s)" | bash -s -- --easy-mode ``` -------------------------------- ### Install Gum Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/shell-scripts.md Install Gum using Homebrew or Go. This is the first step before using any Gum commands. ```bash # Install brew install gum # or: go install github.com/charmbracelet/gum@latest ``` -------------------------------- ### Install RCH from Source Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/QUICKSTART.md Clone the repository, build the release binary, and copy it to your local bin directory. This is the recommended installation method. ```bash git clone https://github.com/Dicklesworthstone/remote_compilation_helper.git cd remote_compilation_helper cargo build --release cp target/release/rch target/release/rchd ~/.local/bin/ ``` -------------------------------- ### README Checklist Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/SKILL.md A checklist to ensure all essential components are included before publishing a project's README file. Covers hero sections, TL;DR, examples, installation methods, diagrams, comparisons, troubleshooting, limitations, FAQs, and code block readiness. ```markdown □ Hero section with illustration + badges + one-liner + curl install □ TL;DR with Problem/Solution/Feature table □ Quick example (5-10 commands) □ At least 3 installation methods documented □ Every command has usage examples □ Architecture diagram for complex tools □ Comparison table vs at least 2 alternatives □ Troubleshooting section (top 5 errors) □ Honest Limitations section □ FAQ with 5+ questions □ All code blocks are copy-paste ready □ No broken links or badges □ Consistent terminology throughout □ Grammar/spelling checked ``` -------------------------------- ### Unix Socket Request Example Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/adr/001-unix-socket-ipc.md Demonstrates a simple GET request format for querying worker selection via Unix domain socket. ```text GET /select-worker?project=myproject&cores=4&runtime=rust\n ``` -------------------------------- ### Install Shell and Go Tools Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/QUICK-REFERENCE.md Commands to install essential shell tools using Homebrew and Go libraries for Bubble Tea development. Ensure you have Go and Homebrew installed. ```bash # Shell tools (all at once) brew install gum glow vhs freeze mods # Go libraries go get github.com/charmbracelet/bubbletea@latest \ github.com/charmbracelet/bubbles@latest \ github.com/charmbracelet/lipgloss@latest \ github.com/charmbracelet/huh@latest \ github.com/charmbracelet/glamour@latest \ github.com/charmbracelet/wish@latest # v2 track (bleeding edge) go get charm.land/bubbletea/v2@latest go get charm.land/lipgloss/v2@latest ``` -------------------------------- ### Install System-Wide Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/SKILL.md Installs the tool system-wide using curl and bash, requiring sudo privileges. This makes the tool available globally on the system. ```bash curl -fsSL https://... | sudo bash -s -- --system ``` -------------------------------- ### Install Bubble Tea and Lip Gloss for Go Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/SKILL.md Install the necessary Charmbracelet libraries, Bubble Tea for the TUI framework and Lip Gloss for styling, using Go's package manager. ```bash go get github.com/charmbracelet/bubbletea github.com/charmbracelet/lipgloss ``` -------------------------------- ### Install and Send Email with Pop Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/infrastructure.md Installs the Pop CLI tool and demonstrates sending emails with various options, including attachments and reading content from stdin. ```bash # Install brew install pop # Send email pop send \ --from "me@example.com" \ --to "you@example.com" \ --subject "Hello" \ --body "Message body" # With attachment pop send \ --to "team@example.com" \ --subject "Report" \ --attach report.pdf \ --body "See attached" # From stdin cat update.md | pop send \ --to "team@example.com" \ --subject "Weekly Update" # Interactive pop ``` -------------------------------- ### Quick Install Shell Tools Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/shell-scripts.md Install multiple Charm CLI tools including Gum, Glow, VHS, Freeze, and Mods simultaneously using Homebrew. ```bash # All shell tools at once brew install gum glow vhs freeze mods ``` ```bash # Or from Charm tap brew tap charmbracelet/tap brew install charmbracelet/tap/gum \ charmbracelet/tap/glow \ charmbracelet/tap/vhs \ charmbracelet/tap/freeze \ charmbracelet/tap/mods ``` -------------------------------- ### Install Freeze Code Screenshot Tool Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/shell-scripts.md Install the Freeze CLI tool for generating beautiful code screenshots for documentation. Available via Homebrew. ```bash # Install brew install freeze ``` -------------------------------- ### Quick Install Go Libraries Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/infrastructure.md Install essential Charmbracelet Go libraries including wish, teatest, and term. This command fetches the latest versions of these packages. ```bash go get github.com/charmbracelet/wish@latest \ github.com/charmbracelet/x/exp/teatest@latest \ github.com/charmbracelet/x/term@latest ``` -------------------------------- ### Install VHS Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/shell-scripts.md Command to install VHS, a tool for recording terminal sessions as GIFs, using Homebrew. ```bash # Install brew install vhs ``` -------------------------------- ### Install Specific Version Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/SKILL.md Installs a specific version of the tool using curl and bash. Ensure the URL is correct for the desired version. ```bash curl -fsSL https://... | bash -s -- --version v1.0.0 ``` -------------------------------- ### Pre-Build Hook Script Example Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/extending/integration-hooks.md Example script for a pre-build hook that warms the cache. It utilizes environment variables provided by RCH. ```bash #!/bin/bash # warm-cache.sh echo "Warming cache for project: $RCH_PROJECT" echo "Worker: $RCH_WORKER" echo "Command: $RCH_COMMAND" # Custom logic here rsync -a ~/.cache/sccache/ $RCH_WORKER:/tmp/sccache/ ``` -------------------------------- ### Install Build Tools on Worker Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/guides/workers.md Installs essential build tools like `build-essential`, `rsync`, and `zstd` on Debian/Ubuntu-based systems. ```bash # For C/C++ projects sudo apt install -y gcc g++ clang ``` -------------------------------- ### Install Bun and Node.js on Worker Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/guides/workers.md Installs Bun, a fast JavaScript runtime, and Node.js on the worker machine. Useful for projects involving TypeScript or JavaScript. ```bash # For Bun/TypeScript projects curl -fsSL https://bun.sh/install | bash ``` -------------------------------- ### Post-Build Hook Script Example Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/extending/integration-hooks.md Example script for a post-build hook that sends notifications to Slack. It checks the build success status via environment variables. ```bash #!/bin/bash # notify.sh if [ "$RCH_BUILD_SUCCESS" = "true" ]; then curl -X POST "$SLACK_WEBHOOK" -d "{\"text\": \"Build succeeded: $RCH_PROJECT\"}" else curl -X POST "$SLACK_WEBHOOK" -d "{\"text\": \"Build failed: $RCH_PROJECT - $RCH_BUILD_ERROR\"}" fi ``` -------------------------------- ### Install Charm Libraries Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/go-tui.md Installs the latest stable versions of various Charm libraries including Bubble Tea, Bubbles, Lip Gloss, Huh, Glamour, Harmonica, and Log. ```bash go get github.com/charmbracelet/bubbletea@latest \ github.com/charmbracelet/bubbles@latest \ github.com/charmbracelet/lipgloss@latest \ github.com/charmbracelet/huh@latest \ github.com/charmbracelet/glamour@latest \ github.com/charmbracelet/harmonica@latest \ github.com/charmbracelet/log@latest ``` -------------------------------- ### Install v2 Track Charm Libraries Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/go-tui.md Installs the bleeding-edge v2 track versions of Charm libraries for Bubble Tea, Bubbles, and Lip Gloss. ```bash go get charm.land/bubbletea/v2@latest go get charm.land/bubbles/v2@latest go get charm.land/lipgloss/v2@latest ``` -------------------------------- ### Install Glow Markdown Viewer Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/shell-scripts.md Install the Glow CLI tool for viewing Markdown files in the terminal. Supports local files, URLs, and standard input. ```bash # Install brew install glow ``` -------------------------------- ### Initialize and Configure File Picker Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/component-catalog.md Create a new file picker, set allowed file extensions, the starting directory, and visibility options for hidden files and file sizes. Styling can be applied to selected items. ```go import "github.com/charmbracelet/bubbles/filepicker" fp := filepicker.New() fp.AllowedTypes = []string{'.txt', '.md', '.go'} fp.CurrentDirectory, _ = os.UserHomeDir() fp.ShowHidden = false fp.ShowSize = true fp.ShowPermissions = false // Styling fp.Styles.Selected = lipgloss.NewStyle().Foreground(lipgloss.Color("205")) // In Init func (m model) Init() tea.Cmd { return m.filepicker.Init() } ``` -------------------------------- ### RCH Hook Installation Commands Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/adr/005-shell-hooks.md Provides bash commands for installing and verifying the RCH hook. Use 'rch hook install' for auto-detection or '--agent=claude-code' for manual setup. ```bash # Auto-detect and install rch hook install # Manual installation rch hook install --agent=claude-code # Verify rch hook status ``` -------------------------------- ### Start SSH Agent and Add Key Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/TROUBLESHOOTING.md Start the SSH agent and add your SSH key to it. This is necessary if your SSH key is protected by a passphrase and RCH needs to use it. ```bash eval $(ssh-agent) && ssh-add ``` -------------------------------- ### Automated Dependency Installation Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/guides/workers.md Uses the RCH CLI to automatically install necessary dependencies on a specified worker. This simplifies the setup process. ```bash rch fleet deploy --worker my-worker --install-deps ``` -------------------------------- ### Build from Source Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/SKILL.md Installs the tool by cloning the repository, building from source using Cargo, and copying the executable to a local bin directory. This method provides the latest code. ```bash git clone https://github.com/user/repo.git cd repo cargo build --release cp target/release/tool ~/.local/bin/ ``` -------------------------------- ### TOML Worker Configuration Example Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/PLAN_TO_MAKE_REMOTE_COMPILATION_HELPER.md Example TOML file for configuring remote workers, including default settings and specific worker definitions with host, user, identity file, and priority. ```toml # ~/.config/rch/workers.toml [defaults] slots_per_core = 1.0 ssh_timeout_ms = 5000 heartbeat_interval_sec = 30 [[workers]] id = "css" host = "203.0.113.20" user = "ubuntu" identity_file = "~/.ssh/contabo_new_baremetal_superserver_box.pem" total_slots = 32 # Override auto-detection priority = 100 # Higher = preferred [[workers]] id = "csd" host = "198.51.100.20" user = "ubuntu" identity_file = "~/.ssh/contabo_new_baremetal_sense_demo_box.pem" ``` -------------------------------- ### Soft Serve Configuration Example Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/infrastructure.md Basic configuration for Soft Serve, setting the server name, host, port, and initial admin SSH keys. ```yaml # ~/.config/soft-serve/config.yaml name: "My Soft Serve" host: 0.0.0.0 port: 23231 initial_admin_keys: - "ssh-ed25519 AAAA... you@example.com" ``` -------------------------------- ### Multi-Tier Help System Components Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/production-architecture.md Implement a multi-tier help system for users to learn the TUI without leaving it. This includes a quick reference, a full tutorial, and a persistent shortcuts sidebar. ```go // Tier 1: Quick Reference (?) — compact overlay, context-specific func (m model) renderQuickHelp() string { keys := getKeysForFocus(m.focus) return renderKeyTable(keys, 60, 20) // 60 chars wide, 20 lines } ``` ```go // Tier 2: Full Tutorial (`) — multi-page walkthrough with rich content type TutorialPage struct { Title string Content []TutorialComponent Context []focus // Only show when these views are active } type TutorialComponent interface { Render(width int) string } type Section struct{ text string } type KeyTable struct{ keys []KeyDesc } type Tip struct{ text string } type Warning struct{ text string } type CodeBlock struct{ code, lang string } ``` ```go // Tier 3: Shortcuts Sidebar (;) — persistent, always-visible func (m model) renderShortcutsSidebar() string { // Fixed 34-char width on right edge shortcuts := getContextShortcuts(m.focus) sidebar := lipgloss.NewStyle(). Width(34). Height(m.height). Border(lipgloss.NormalBorder(), false, false, false, true). BorderForeground(m.theme.Border). Render(renderShortcutList(shortcuts)) return sidebar } ``` ```go // Sidebar scrollable with Ctrl+J/K func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case tea.KeyMsg: switch msg.String() { case "ctrl+j": if m.showSidebar { m.sidebarScroll++ } case "ctrl+k": if m.showSidebar && m.sidebarScroll > 0 { m.sidebarScroll-- } } } ``` -------------------------------- ### Define and Render Help Menu Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/component-catalog.md Defines key bindings and creates a help model for displaying short or full help menus. Set the Width property to control wrapping. ```go import ( "github.com/charmbracelet/bubbles/help" "github.com/charmbracelet/bubbles/key" ) // Define key bindings type keyMap struct { Up key.Binding Down key.Binding Help key.Binding Quit key.Binding } func (k keyMap) ShortHelp() []key.Binding { return []key.Binding{k.Help, k.Quit} } func (k keyMap) FullHelp() [][]key.Binding { return [][]key.Binding{ {k.Up, k.Down}, {k.Help, k.Quit}, } } var keys = keyMap{ Up: key.NewBinding( key.WithKeys("up", "k"), key.WithHelp("↑/k", "up"), ), Down: key.NewBinding( key.WithKeys("down", "j"), key.WithHelp("↓/j", "down"), ), Help: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "toggle help"), ), Quit: key.NewBinding( key.WithKeys("q", "ctrl+c"), key.WithHelp("q", "quit"), ), } // Create help model h := help.New() h.Width = 80 // Wrap at width // Toggle full/short h.ShowAll = true // Full help h.ShowAll = false // Short help // Render helpView := h.View(keys) ``` ```go h.Styles.ShortKey = lipgloss.NewStyle().Foreground(lipgloss.Color("205")) h.Styles.ShortDesc = lipgloss.NewStyle().Foreground(lipgloss.Color("240")) h.Styles.FullKey = lipgloss.NewStyle().Foreground(lipgloss.Color("205")) h.Styles.FullDesc = lipgloss.NewStyle().Foreground(lipgloss.Color("240")) h.Styles.FullSeparator = lipgloss.NewStyle().Foreground(lipgloss.Color("240")) ``` -------------------------------- ### Idempotent Remote Worker Setup Script Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/PLAN_TO_MAKE_REMOTE_COMPILATION_HELPER.md A bash script to set up the RCH worker environment idempotently. It installs dependencies, the Rust toolchain, sccache, and C/C++ tools, ensuring the worker is ready for compilation. ```bash #!/usr/bin/env bash set -euo pipefail MARKER_FILE="/var/lib/rch/.setup_complete" VERSION_FILE="/var/lib/rch/.version" REQUIRED_VERSION="0.1.0" # Skip if already set up with correct version if [[ -f "$MARKER_FILE" ]] && [[ -f "$VERSION_FILE" ]]; then installed_version=$(cat "$VERSION_FILE") if [[ "$installed_version" == "$REQUIRED_VERSION" ]]; then echo "RCH worker already at version $REQUIRED_VERSION" exit 0 fi fi echo "Setting up RCH worker..." # 1. Create directories sudo mkdir -p /var/lib/rch sudo mkdir -p /tmp/rch sudo chown -R "$USER:$USER" /tmp/rch # 2. Install dependencies sudo apt-get update sudo apt-get install -y \ build-essential \ pkg-config \ libssl-dev \ zstd \ rsync # 3. Install Rust toolchain if ! command -v rustup &> /dev/null; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly fi source ~/.cargo/env rustup default nightly rustup update # 4. Install sccache cargo install sccache || true echo 'export RUSTC_WRAPPER=sccache' >> ~/.bashrc # 5. Install C/C++ tools sudo apt-get install -y gcc g++ clang ccache # 6. Mark complete echo "$REQUIRED_VERSION" | sudo tee "$VERSION_FILE" sudo touch "$MARKER_FILE" echo "RCH worker setup complete!" ``` -------------------------------- ### Basic Command Usage Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/SKILL.md Demonstrates the basic usage of a command and how to use flags with values. Use the --help flag to see all available options. ```bash tool command # Basic usage ``` ```bash tool command --flag value # With options ``` ```bash tool command --help # See all options ``` -------------------------------- ### Horizontal Scaling Configuration Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/diagrams/deployment.md Example TOML configuration for defining multiple RCH workers. Each worker is defined with an ID, host address, and the number of compilation slots it provides. This setup allows for horizontal scaling by adding more workers to increase total capacity. ```toml # ~/.config/rch/workers.toml [[workers]] id = "worker-1" host = "10.0.1.10" total_slots = 16 [[workers]] id = "worker-2" host = "10.0.1.11" total_slots = 32 [[workers]] id = "worker-3" host = "10.0.1.12" total_slots = 16 # Total capacity: 64 slots ``` -------------------------------- ### Go: Bubble Tea Starter Application Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/QUICK-REFERENCE.md A basic Bubble Tea application demonstrating a simple list selection UI. Requires the Bubble Tea library. ```go package main import ( "fmt" "os" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" ) type model struct { cursor int items []string } func (m model) Init() tea.Cmd { return nil } func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyMsg: switch msg.String() { case "q", "ctrl+c": return m, tea.Quit case "up", "k": if m.cursor > 0 { m.cursor-- } case "down", "j": if m.cursor < len(m.items)-1 { m.cursor++ } case "enter": fmt.Println("Selected:", m.items[m.cursor]) return m, tea.Quit } } return m, nil } var selected = lipgloss.NewStyle().Foreground(lipgloss.Color("212")).Bold(true) func (m model) View() string { s := "" for i, item := range m.items { cursor := " " if i == m.cursor { cursor = "▸ " s += selected.Render(cursor+item) + "\n" } else { s += cursor + item + "\n" } } return s + "\n↑/↓: navigate • enter: select • q: quit" } func main() { m := model{items: []string{"Option A", "Option B", "Option C"}} if _, err := tea.NewProgram(m).Run(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } ``` -------------------------------- ### Test Bubble Tea App with teatest Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/infrastructure.md Write tests for Bubble Tea applications using teatest. This example shows how to send keys, type text, wait for specific output, and get the final output. Ensure you have imported the necessary packages. ```go import ( "testing" "time" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/x/exp/teatest" ) func TestApp(t *testing.T) { m := NewModel() tm := teatest.NewTestModel(t, m) // Send keys tm.Send(tea.KeyMsg{Type: tea.KeyDown}) tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) // Type text tm.Type("hello world") // Wait for condition teatest.WaitFor(t, tm, func(bts []byte) bool { return strings.Contains(string(bts), "Expected output") }, teatest.WithDuration(time.Second)) // Get final output out := tm.FinalOutput(t) if !strings.Contains(string(out), "success") { t.Fatal("expected success message") } // Quit tm.Send(tea.KeyMsg{Type: tea.KeyCtrlC}) tm.WaitFinished(t, teatest.WithFinalTimeout(time.Second)) } ``` -------------------------------- ### Cargo Commands for Development Setup Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/references/section-templates.md Outlines essential Cargo commands for setting up a development environment, including cloning the repository, building the project, running tests, and linting. ```bash # Clone git clone https://github.com/user/repo.git cd repo # Install dependencies cargo build # Run tests cargo test # Run lints cargo clippy --all-targets -- -D warnings ``` -------------------------------- ### Install ssh-copy-id on macOS Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/guides/ssh-setup.md If you are on macOS and do not have `ssh-copy-id` installed, you can install it using Homebrew. ```bash brew install ssh-copy-id ``` -------------------------------- ### Install RCH with Cargo Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/QUICKSTART.md Install RCH directly from its Git repository using Cargo. Ensure you have the Rust toolchain installed. ```bash cargo install --git https://github.com/Dicklesworthstone/remote_compilation_helper.git ``` -------------------------------- ### Initialize Project Configuration Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/PLAN_TO_MAKE_REMOTE_COMPILATION_HELPER.md Initializes the '.rch/config.toml' file with default settings for a new project. ```bash # Initialize .rch/config.toml with defaults rch config init ``` -------------------------------- ### RCH Installation Subcommands Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/PLAN_TO_MAKE_REMOTE_COMPILATION_HELPER.md Commands for installing the RCH agent on workers or locally. Options include fleet-wide installation and source builds. ```bash rch install --fleet Install on all workers --worker-only Install worker agent only --easy-mode Non-interactive setup --from-source Build from source ``` -------------------------------- ### Initialize and Configure List Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/component-catalog.md Initializes a new list component with predefined items, a default delegate, and specified dimensions. Demonstrates setting the title, enabling the status bar, and filtering. ```go // Create list items := []list.Item{ item{"First", "Description 1"}, item{"Second", "Description 2"}, } l := list.New(items, list.NewDefaultDelegate(), 40, 20) l.Title = "My List" l.SetShowStatusBar(true) l.SetFilteringEnabled(true) // Styling l.Styles.Title = lipgloss.NewStyle( ).Foreground(lipgloss.Color("205") ).Bold(true) // In Update l, cmd = l.Update(msg) // Get selected item if i, ok := l.SelectedItem().(item); ok { // Use i } // Update items l.SetItems(newItems) ``` -------------------------------- ### Go: Common Bubble Components Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/QUICK-REFERENCE.md Demonstrates the initialization and basic usage of common components from the 'bubbles' library, including spinners, text inputs, progress bars, viewports, and lists. Ensure the item type implements the 'list.Item' interface for list components. ```go import ( "github.com/charmbracelet/bubbles/list" "github.com/charmbracelet/bubbles/spinner" "github.com/charmbracelet/bubbles/textinput" "github.com/charmbracelet/bubbles/viewport" "github.com/charmbracelet/bubbles/progress" ) // Spinner s := spinner.New() s.Spinner = spinner.Dot // In Init: return s.Tick // In Update: s, cmd = s.Update(msg) // Text input ti := textinput.New() ti.Placeholder = "Type here..." ti.Focus() // In Update: ti, cmd = ti.Update(msg) // Get value: ti.Value() // Progress bar p := progress.New(progress.WithDefaultGradient()) // Render: p.ViewAs(0.75) // 75% // Viewport (scrollable content) vp := viewport.New(80, 20) vp.SetContent(longText) // In Update: vp, cmd = vp.Update(msg) // List (requires item type implementing list.Item interface) type item struct{ title, desc string } func (i item) Title() string { return i.title } func (i item) Description() string { return i.desc } func (i item) FilterValue() string { return i.title } items := []list.Item{item{"One", "First"}, item{"Two", "Second"}} l := list.New(items, list.NewDefaultDelegate(), 40, 20) l.Title = "My List" ``` -------------------------------- ### Install Gum for Shell Scripts Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/SKILL.md Install the Gum CLI tool for adding prompts, confirmations, and other interactive elements to shell scripts. This is a one-time installation. ```bash brew install gum # One-time install ``` -------------------------------- ### Install RCH with Installer Script Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/QUICKSTART.md Use a curl command to download and execute the installation script for RCH. This provides a quick alternative to building from source. ```bash curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/remote_compilation_helper/main/install.sh | bash ``` -------------------------------- ### Initialize and Style Viewport Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/component-catalog.md Create a new viewport with specified dimensions and apply custom styling. The content can be set using `SetContent`. ```go import "github.com/charmbracelet/bubbles/viewport" vp := viewport.New(80, 20) vp.SetContent(longContent) // Mouse wheel scrolling vp.MouseWheelEnabled = true vp.MouseWheelDelta = 3 // Styling vp.Style = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(lipgloss.Color("240")) ``` -------------------------------- ### Command Palette Initialization Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/go-tui.md Sets up a command palette with fuzzy search capabilities using the `list` component. Ensure `list.Item` and `item` types are defined, and `titleStyle` is initialized. ```go items := []list.Item{ item{title: "New File", key: "ctrl+n"}, item{title: "Open File", key: "ctrl+o"}, item{title: "Save", key: "ctrl+s"}, } l := list.New(items, list.NewDefaultDelegate(), 40, 14) l.Title = "Commands" l.SetShowStatusBar(false) l.SetFilteringEnabled(true) // Built-in fuzzy search! l.Styles.Title = titleStyle ``` -------------------------------- ### Install Mods CLI Tool Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/shell-scripts.md Install the Mods CLI tool for interacting with AI models directly from your terminal. Supports installation via Homebrew or Go. ```bash # Install brew install mods ``` ```bash # Or with Go go install github.com/charmbracelet/mods@latest ``` -------------------------------- ### Replace fmt.Println with Lip Gloss Styling Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/go-tui.md Demonstrates replacing standard `fmt.Println` with Lip Gloss for styled output, specifically for error messages. Requires importing the `lipgloss` and `fmt` packages. ```go // Before fmt.Println("Error: file not found") // After errStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("196")).Bold(true) fmt.Println(errStyle.Render("Error: file not found")) ``` -------------------------------- ### Start RCH Daemon as a Service (Linux) Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/TROUBLESHOOTING.md Start the RCH daemon as a systemd user service on Linux. This ensures the daemon runs in the background and starts on login. ```bash systemctl --user start rchd ``` -------------------------------- ### Install RCH from Source Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/guides/migration.md Installs RCH by cloning the repository, building the release, and copying the executable to a local bin directory. Ensure your system has Rust and Cargo installed. ```bash # From source git clone https://github.com/Dicklesworthstone/remote_compilation_helper.git cd remote_compilation_helper cargo build --release cp target/release/rch target/release/rchd ~/.local/bin/ ``` ```bash # Or via cargo cargo install --git https://github.com/Dicklesworthstone/remote_compilation_helper.git ``` -------------------------------- ### Main Application Entry Point Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/advanced-patterns.md The main function sets up the TUI application, enabling debug logging if the DEBUG environment variable is set. It initializes the program with a model and configures screen and mouse behavior. ```go func (i item) FilterValue() string { return i.title } // ───────────────────────────────────────────────────────────── // Main // ───────────────────────────────────────────────────────────── func main() { // Enable debug logging to file if os.Getenv("DEBUG") != "" { f, _ := tea.LogToFile("debug.log", "debug") defer f.Close() } p := tea.NewProgram( initialModel(), tea.WithAltScreen(), tea.WithMouseCellMotion(), ) if _, err := p.Run(); err != nil { fmt.Fprintln(os.Stderr, "Error:", err) os.Exit(1) } } ``` -------------------------------- ### Bash Installation Script for Remote Compilation Helper Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/PLAN_TO_MAKE_REMOTE_COMPILATION_HELPER.md Provides a comprehensive bash script for installing the Remote Compilation Helper (rch) and its associated services. Supports interactive, fleet-wide, and worker-only installation modes. ```bash #!/usr/bin/env bash # install.sh - Remote Compilation Helper Installer set -euo pipefail # ============================================================================ # Configuration # ============================================================================ REPO="Dicklesworthstone/remote_compilation_helper" BINARY_NAME="rch" DAEMON_NAME="rchd" WORKER_NAME="rch-wkr" # ============================================================================ # Installation Modes # ============================================================================ # # 1. Local-only: Install rch + rchd on current machine # 2. Fleet: Install on current + all workers # 3. Worker-only: Install just rch-wkr on current machine # # Usage: # bash install.sh # Interactive # bash install.sh --fleet # Full fleet setup # bash install.sh --worker-only # Just worker # bash install.sh --easy-mode # Non-interactive full setup ``` -------------------------------- ### Install RCH Hooks Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/QUICKSTART.md Install the RCH hooks to enable command interception. Use the auto-detect option or specify the agent, such as Claude Code, for manual installation. This step is crucial for RCH to redirect your build commands. ```bash # Auto-detect and install hooks rch hook install # Or manually for Claude Code rch hook install --agent=claude-code ``` -------------------------------- ### Verify RCH Installation on Worker Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/guides/workers.md Checks if the RCH agent has been successfully installed and is running on the specified worker. ```bash rch fleet verify --worker my-first-worker ``` -------------------------------- ### File Watching Setup with fsnotify Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/production-architecture.md Sets up a file watcher using the fsnotify library to monitor a specific file for write events. The onChange function is called when a relevant event occurs. Ensure the directory containing the file is added to the watcher. ```go import "github.com/fsnotify/fsnotify" func watchFile(path string, onChange func()) { watcher, _ := fsnotify.NewWatcher() defer watcher.Close() watcher.Add(filepath.Dir(path)) for { select { case event := <-watcher.Events: if event.Name == path && (event.Op&fsnotify.Write != 0) { onChange() } case err := <-watcher.Errors: log.Printf("watcher error: %v", err) } } } ``` -------------------------------- ### Start RCH Daemon Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/TROUBLESHOOTING.md Start the RCH daemon process. This is required for remote compilation and can resolve 'Connection Refused' errors. ```bash rchd ``` -------------------------------- ### Initialize Bubble Tea App Model Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/advanced-patterns.md Sets up the initial state for the Bubble Tea application, including configuring a spinner and marking the app as loading. ```go func initialModel() model { s := spinner.New() s.Spinner = spinner.Dot s.Style = lipgloss.NewStyle().Foreground(lipgloss.Color("205")) return model{ screen: screenLoading, spinner: s, loading: true, } } ``` -------------------------------- ### Initialize and Configure Paginator Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/component-catalog.md Create a new paginator, set its type (e.g., `paginator.Dots`), items per page, and total pages. Custom styles can be applied to active and inactive dots. ```go import "github.com/charmbracelet/bubbles/paginator" p := paginator.New() p.Type = paginator.Dots // or paginator.Arabic p.PerPage = 10 p.SetTotalPages(len(items) / p.PerPage) // Styling p.ActiveDot = lipgloss.NewStyle(). Foreground(lipgloss.Color("205")), Render("●") p.InactiveDot = lipgloss.NewStyle(). Foreground(lipgloss.Color("240")), Render("○") ``` -------------------------------- ### Install Rust Toolchain on Worker Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/guides/workers.md Installs the Rust toolchain, including the nightly version, on a worker machine. This is essential for Rust development. ```bash # On each worker (run via SSH or directly) # Install Rust (nightly) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh rustup default nightly rustup update ``` -------------------------------- ### Rust API Client Initialization Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/crafting-readme-files/references/section-templates.md Shows how to initialize the main API client in Rust and perform a basic search operation. Requires the `tool_name` crate. ```rust use tool_name::Client; let client = Client::new()?; let results = client.search("query")?; ``` -------------------------------- ### Install RCH Hooks Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/docs/TROUBLESHOOTING.md Install the necessary RCH hooks to enable remote compilation. This is a common fix if builds are running locally. ```bash rch hook install ``` -------------------------------- ### Initialize and Style Text Input Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/component-catalog.md Initializes a new text input component, sets placeholder, focus, character limit, and width. Also demonstrates basic styling and password mode configuration. ```go import "github.com/charmbracelet/bubbles/textinput" ti := textinput.New() ti.Placeholder = "Type here..." ti.Focus() ti.CharLimit = 156 ti.Width = 40 // Styling ti.PromptStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("205")) ti.TextStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("255")) // Password mode ti.EchoMode = textinput.EchoPassword ti.EchoCharacter = '•' // In Update ti, cmd = ti.Update(msg) // Get value value := ti.Value() // Reset ti.SetValue("") ti.Reset() ``` -------------------------------- ### Serve Wishlist Endpoints Source: https://github.com/dicklesworthstone/remote_compilation_helper/blob/main/skills/building-glamorous-tuis/references/infrastructure.md Configure and serve endpoints for the remote compilation helper. Use 'wishlist serve' to start the server and 'ssh myserver.com' to connect and see the available endpoints. ```bash wishlist serve ssh myserver.com # Shows menu: [git] [chat] [todos] ```