Skip to content

Feature #65: Create installation script#67

Merged
RaghavSood merged 1 commit intomainfrom
fix/issue-65-create-installation-script-v2
Mar 11, 2026
Merged

Feature #65: Create installation script#67
RaghavSood merged 1 commit intomainfrom
fix/issue-65-create-installation-script-v2

Conversation

@RaghavSood
Copy link
Contributor

Summary

  • Adds install.sh - a comprehensive bash script that automates Flock installation with one-line setup
  • Updates README with quick install instructions

Changes

install.sh (new file - 538 lines)

A production-ready installation script that:

  1. Detects environment: Automatically detects OS (macOS/Linux), package manager (brew/apt/dnf/yum), and architecture (amd64/arm64)

  2. Installs dependencies:

    • Go 1.24.7 (if not present)
    • GitHub CLI (gh)
    • OpenCode (latest version from GitHub releases)
  3. Builds Flock: Clones the repository and builds the binary from source

  4. Creates configuration files:

    • ~/.flock/flock.toml - Flock server configuration
    • ~/.flock/opencode/config.json - OpenCode server configuration
  5. Sets up system services:

    • Linux: systemd services (flock.service, opencode.service)
    • macOS: launchd agents (com.flock.flock.plist, com.flock.opencode.plist)
  6. Configures auto-updates: Sets up cron job for daily updates at 3 AM

  7. Is idempotent: Safely skips existing configurations

Flags supported:

  • --install-dir: Custom installation directory (default: ~/.flock)
  • --non-interactive: Run without prompts
  • --skip-auth: Skip authentication steps

Usage:

# One-line install
curl -sSL https://raw.githubusercontent.com/nbitslabs/flock/main/install.sh | bash

# With options
curl -sSL https://raw.githubusercontent.com/nbitslabs/flock/main/install.sh | bash -s -- --install-dir /custom/path --non-interactive

README.md updates

Added comprehensive installation section with:

  • Quick install one-liner
  • What the installer does (7 steps)
  • Manual installation instructions
  • Configuration and authentication steps

Related Issue

Closes #65

Add install.sh - a comprehensive bash script that automates the entire
installation process including dependency installation (Go, GitHub CLI,
OpenCode), building Flock from source, creating configuration files,
setting up system services (systemd/launchd), and configuring automatic
daily updates via cron. The script is idempotent and supports --install-dir,
--non-interactive, and --skip-auth flags.

Update README with quick install instructions and the one-liner command.

Fixes #65
@RaghavSood RaghavSood force-pushed the fix/issue-65-create-installation-script-v2 branch from 3a289e4 to b4e3298 Compare March 11, 2026 10:54
@RaghavSood RaghavSood merged commit 2279dc1 into main Mar 11, 2026
1 check passed
@RaghavSood
Copy link
Contributor Author

Good point about the hardcoded paths in CLAUDE.md — that's out of scope for this TCY staking PR since it's a general worktree documentation issue. Created #68 to track it.

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.

Create installation script

1 participant