No description
  • Go 65.4%
  • JavaScript 25%
  • HTML 4.4%
  • Shell 4.2%
  • CSS 0.8%
  • Other 0.2%
Find a file
Raghav Sood 1c0d778674 fix: worktree removal fails with 'is not a working tree'
Two bugs:
1. RemoveWorktree ran git worktree remove without setting cmd.Dir to
   the source repo, so git couldn't find the worktree in its tracking.
2. When git doesn't recognize a path as a worktree (stale tracking),
   the code retried the same failing command. Now falls back to
   os.RemoveAll + git worktree prune.

Also removed the retry loop — the fallback handles the failure case
directly instead of retrying the same broken command.
2026-03-21 14:52:43 +08:00
.github/workflows Add GitHub action to build, test, fmt, and vet Go code 2026-03-07 03:07:41 +08:00
agents feat: add history analyzer agent specification 2026-03-21 14:25:21 +08:00
cmd/flock feat: add basic username/password authentication 2026-03-08 12:31:38 +08:00
internal fix: worktree removal fails with 'is not a working tree' 2026-03-21 14:52:43 +08:00
migrations feat: add repository manifest configuration and dependency graph (WO-23) 2026-03-21 05:46:09 +08:00
web feat: add repository synchronization dashboard with dependency graph 2026-03-21 06:01:31 +08:00
.gitignore git: ignore mcp 2026-03-21 04:44:23 +08:00
AGENTS.md docs: update AGENTS.md with OpenCode API reference and lessons learned 2026-03-05 14:05:33 +08:00
flake.lock flake: init 2026-03-05 11:20:10 +08:00
flake.nix flake: init 2026-03-05 11:20:10 +08:00
flock.example.toml feat: add basic username/password authentication 2026-03-08 12:31:38 +08:00
go.mod feat: add basic username/password authentication 2026-03-08 12:31:38 +08:00
go.sum feat: add basic username/password authentication 2026-03-08 12:31:38 +08:00
install.sh fix: install git explicitly and refresh apt after adding gh repo 2026-03-12 04:18:09 +08:00
Makefile fix: tailwindcss build was missing config path, producing empty CSS 2026-03-05 12:17:22 +08:00
PLAN.md docs: add MVP implementation plan 2026-03-05 11:57:56 +08:00
README.md feat: add installation script for one-line Flock setup 2026-03-11 18:54:01 +08:00
sqlc.yaml feat: add agent harness for autonomous issue resolution 2026-03-07 02:18:15 +08:00

flock

Agent orchestration system that proxies and manages OpenCode instances.

Installation

Quick Install (One-Liner)

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

This will:

  1. Install Go (if not present)
  2. Install GitHub CLI (gh)
  3. Install OpenCode
  4. Build Flock from source
  5. Create configuration files
  6. Set up system services (systemd on Linux, launchd on macOS)
  7. Configure auto-updates via cron

Manual Installation

# Clone the repository
git clone https://github.com/nbitslabs/flock.git
cd flock

# Build the binary
go build -o flock ./cmd/flock

# Run
./flock

Configuration

After installation, configure your environment:

# Authenticate with GitHub
gh auth login

# Authenticate with OpenCode
opencode auth login

Run

go run ./cmd/flock

Architecture

  • Proxy/Orchestrator: Routes requests to child OpenCode instances
  • Instance Management: Spawns/manages OpenCode processes, tracks state in SQLite
  • Real-time Events: SSE pipeline from OpenCode -> Manager -> Browser
  • Database: SQLite (modernc.org/sqlite) for instance/session metadata
  • Frontend: Vanilla JS with TailwindCSS

Tech Stack

  • Go 1.22+
  • SQLite (pure Go)
  • TailwindCSS
  • Server-Sent Events (SSE)