-
Notifications
You must be signed in to change notification settings - Fork 0
Comparing changes
Open a pull request
base repository: guysoft/guyide-cli
base: main
head repository: guysoft/guyide-cli
compare: feat/tmux-extras
- 11 commits
- 66 files changed
- 2 contributors
Commits on May 7, 2026
-
M2: installer pipeline (nvim + tmux + opencode) (#1)
* feat(install): M1 data plumbing and welcome scaffolding Lays the groundwork for the guyide installer without yet wiring a cobra subcommand. Pure data + filesystem helpers so M2 can focus on driver implementations. - embed/compat.json: stable-channel pin matrix (v0.2.0 -> nvguy v0.1.0, vscodium.nvim v0.1.0) - embed/support_matrix.yaml: validated (editor, multiplexer, agent) triples; v0.2 ships only (nvim, tmux, opencode); claude-code marked stub for v0.3 - embed/welcome/WELCOME.md: first-launch cheatsheet (Ctrl-a e to enter IDE mode, Ctrl-a d to detach, Ctrl-a Ctrl-r to restore, Ctrl-a ? for help, Space m for nvim menu) - pkg/schema/manifest.go, userconfig.go: on-disk manifest + ~/.guyide/ config.yaml types with json+yaml roundtrip tests - internal/install/{paths,manifest,compat,welcome,prompt}.go: every well-known path under ~/.guyide, atomic manifest writer, embedded matrix loaders, idempotent welcome materialiser, testable y/n prompter - SUPPORT_MATRIX.md: human view of the supported triples - gopkg.in/yaml.v3 promoted from indirect to direct dependency * feat(install): tar.gz backup helper with manifest tracking Adds CreateBackup, AppendBackup, ListBackups under internal/install. Backups are written as gzipped tarballs under ~/.guyide/backups/ with paths normalised relative to $HOME so they restore cleanly across machines. Each backup is recorded as a schema.BackupEntry in the manifest, newest-first, with idempotent appends. Empty backups still produce a non-empty tarball (MANIFEST.txt marker) so the manifest preserves a complete run history. * feat(components): Component interface and slot registry Introduces internal/components/component.go: the Component interface (Plan, Install, Update, Uninstall, Doctor, OwnedPaths) plus a per-slot driver registry. Drivers register via Register() in their package's init() and the install manager looks them up by (slot, driver) pair. Slots are editor, multiplexer, and agent — exactly one driver per slot per install. Context grows a UserConfig field so drivers can read user preferences without re-parsing config.yaml. CLIVersion() lands in embed/ so leaf drivers can resolve compat pins without importing internal/version directly. * feat(components): nvim and tmux drivers with manifest-tracked backups Adds two component drivers that fill the editor and multiplexer slots: * editor/nvim.go: clones NvGuy into ~/.guyide/components/nvim, symlinks ~/.config/nvim, runs a headless lazy.sync drain loop (up to 20 iterations) so first launch is plugin-ready. Honours GUYIDE_DEV_NVGUY for local checkout overrides during development. * multiplexer/tmux.go: writes a canonical guyide.conf (with a '# guyide:managed v1' marker) into ~/.guyide/components/tmux/, then places it at ~/.tmux.conf when own_conf is true (default). Hot- reloads via 'tmux source-file' if a server is running. Drift detection compares marker + body bytes. Both drivers route pre-existing user files through install.CreateBackup, producing tar.gz backups under ~/.guyide/backups/ with manifest entries — no scattered .guyide-bak siblings. registry/ package blank-imports both drivers so cmd/guyide can pull in the full driver set with a single import. * feat(components): opencode agent driver with embedded guyide skill The opencode driver is verify-only for the agent binary (point users at opencode.ai/docs) and manages exactly one shipped skill: 'guyide', which teaches the agent the guyide CLI verbs and the filesystem footprint we own. Foreign skills with the same name are backed up via the manifest-tracked tarball helper before being replaced; user-authored skills with other names are never touched. Uninstall only removes guyide-managed skills (identified by a .guyide-managed marker). * feat(install): guyide install / uninstall / list-backups end-to-end Adds the user-facing install pipeline: - internal/install/config.go: load/save ~/.guyide/config.yaml, with LoadOrInitUserConfig writing the default selection (nvim/tmux/opencode) on first run. - internal/install/run.go: RunPlan / RunInstall / RunUninstall orchestrators that resolve drivers from the user config, drive each Component through Plan + Install (or Uninstall in reverse), and update the manifest with per-slot component entries on success. - internal/cli/install.go: cobra commands for 'guyide install [--dry-run] [--ref <ref>]', 'guyide uninstall [--dry-run]', and 'guyide list-backups'. Renders human or JSON output via the unified output.Writer. - internal/cli/root.go: wires the new commands and blank-imports the components/registry package so every driver registers itself in init(). Smoke tested end-to-end in a fake $HOME with stubbed nvim/tmux/opencode: config.yaml is auto-written, all three drivers install (NvGuy via local override, tmux managed conf written with marker, guyide skill extracted), and uninstall removes only guyide-owned paths. * fix(install): refuse interactive git credential prompts; document install options - nvim driver: pass GIT_TERMINAL_PROMPT=0, GCM_INTERACTIVE=Never, GIT_ASKPASS= to git invocations so a misconfigured credential helper fails loudly instead of hanging the installer (NvGuy is a public repo). - README: document go install with @latest / @main / @<sha>.Configuration menu - View commit details
-
Copy full SHA for 4278fe2 - Browse repository at this point
Copy the full SHA 4278fe2View commit details -
fix(tmux): bootstrap TPM during install so plugin bindings work (#2)
The shipped guyide.conf references TPM (Tmux Plugin Manager) for plugin loading, prefix-r reload, prefix-I install, and several plugins (resurrect, continuum, oasis theme). Previously the installer wrote the conf but never cloned TPM, so tmux exited 127 when sourcing the conf and plugin keybindings did not work. - tmux.Install now clones tmux-plugins/tpm into ~/.tmux/plugins/tpm if missing, then runs TPM's install_plugins script to fetch declared plugins. - Bootstrap is best-effort: a clone or network failure prints a warning but does not fail the install. - Tests opt out via GUYIDE_SKIP_TPM_BOOTSTRAP=1 (set in newCtx).
Configuration menu - View commit details
-
Copy full SHA for 0893819 - Browse repository at this point
Copy the full SHA 0893819View commit details
Commits on May 11, 2026
-
ci: add goreleaser config and release workflow (#3)
Releases on tag push (v*) build linux/darwin amd64+arm64 binaries with ldflags injecting version/commit/build-date. Artifacts are uploaded as raw binaries named guyide-<os>-<arch> (e.g. guyide-linux-x86_64, guyide-darwin-arm64) to match the README curl one-liner. Validated locally via 'goreleaser release --snapshot --skip=publish'; binary smoke test passed (guyide version reports injected vars).
Configuration menu - View commit details
-
Copy full SHA for b33eb6b - Browse repository at this point
Copy the full SHA b33eb6bView commit details
Commits on May 14, 2026
-
feat: promote claude-code agent from stub to supported
- ClaudeCodeConfig gains cli, extra_args, skill_root fields - support_matrix.yaml: claude-code triple status: supported (v0.3.0) - SUPPORT_MATRIX.md: update human-readable view - embed/claude-code/skills/: placeholder for bundled skills - embed.go: expose ClaudeCodeSkillsFS() for installer - welcome: add config.yaml swap hint for Claude Code - Add TestClaudeCodeConfigYAMLRoundTrip
Configuration menu - View commit details
-
Copy full SHA for 0aee8dd - Browse repository at this point
Copy the full SHA 0aee8ddView commit details -
feat(nvim): include socket, buffer, cwd context in exec/eval responses
AI agents driving nvim through guyide could silently operate on the wrong nvim instance when multiple sockets existed. Now every nvim exec and eval response includes the resolved socket path, current buffer, and cwd so the agent can immediately detect a mismatch. Also fixes e2e test infra: Unix socket path exceeded macOS 104-byte limit because pytest tmp_path was too long. Socket now lives under /tmp. Adds e2e test_nvim_context.py with 5 tests to prevent regression.
Configuration menu - View commit details
-
Copy full SHA for 6eca385 - Browse repository at this point
Copy the full SHA 6eca385View commit details -
feat(tmux): spatial pane role aliases for send and watch
Agents and skills no longer need to hardcode absolute pane addresses like 0:1.1 which break when windows are reordered, sessions are restored, or the user splits extra panes. The send and watch commands now accept spatial role aliases — editor, terminal, agent, bottom-left, bottom-right, bottom-middle — that resolve to the correct pane in the caller's current window using actual tmux geometry (pane_left/pane_top). This means a skill that says 'guyide tmux send terminal ./run.sh Enter' always targets the bottom-left pane of whatever window the agent is running in, regardless of window index or pane count. Changes: - Add Left/Top geometry fields to Pane struct and ListPanes output - Add resolve.go: spatial role resolution engine with IsRole/ResolveRole - Update send command to transparently resolve role aliases - Update watch --pane to transparently resolve role aliases - Add PaneInfo.Left/Top to JSON schema output - Add 20 unit tests for role resolution across standard and split layouts - Update embedded guyide skill with role alias documentation - Update README with spatial pane roles section
Configuration menu - View commit details
-
Copy full SHA for 49d9de9 - Browse repository at this point
Copy the full SHA 49d9de9View commit details
Commits on May 25, 2026
-
feat(agent): add
guyide agent switch+ wire up the claude-code driverSwitching the agent slot has historically required coordinated edits to four files (config.yaml, manifest.json, the canonical tmux conf, and ~/.tmux.conf), plus a tmux reload. Doing it by hand is easy to get wrong and easy to forget to back up. This commit ships: * `guyide agent switch <driver>` — one-shot coordinator that snapshots all four files into ~/.guyide/backups/<ts>.tar.gz, rewrites the agent-owned tmux options in lockstep, updates the config + manifest, and `source-file`s any running tmux server. Includes --dry-run, --no-reload, and --force (drift override). * `guyide agent show` — prints the active driver + resolved tmux options (machine-readable with --json). * Real `claude-code` driver. The previous commit promoted the YAML status to `supported`; this commit adds the actual Component implementation under internal/components/agent/claude_code.go. Drives @ide-agent, the resurrect sister-plugin, and @resurrect-processes from the user's claude-code.* config. * `guyide config get|set|show` — typed read/write for ~/.guyide/config.yaml. Coordinated keys (e.g. `components.agent.driver`) are refused by `set` and the user is pointed at `agent switch` instead. * Extends ClaudeCodeConfig with `resurrect_process` and `resurrect_plugin` (alongside the existing `cli`, `extra_args`, `skill_root`) so the tmux options are user-tunable. * Doctor drift classifier — distinguishes agent-only drift (expected steady state after `agent switch`) from foreign drift (genuine user edits) and emits a richer warning message with a `diff` hint only when the latter is detected. Updates the embedded tmux conf to declare `@ide-agent` explicitly so the agent switcher always has a deterministic line to rewrite. Skill, README, and SUPPORT_MATRIX.md updated end-to-end so both humans and the in-tree opencode skill discover `agent switch` as the canonical path. Tests: install (3-way merge regression), agent (options + switch integration), cli (config get/set/show + agent switch dry-run / round-trip / drift-guard / idempotent rerun), multiplexer (foreign vs agent-only drift classifier).
Configuration menu - View commit details
-
Copy full SHA for 2334f92 - Browse repository at this point
Copy the full SHA 2334f92View commit details -
feat(tmux): add capture and run commands
Wire up `guyide tmux capture` and `guyide tmux run` CLI commands with role alias support. The capture command grabs pane output with --tail and --grep filtering. The run command sends a command, waits for a sentinel marker, and returns structured exit code + duration. Fix a race in RunInPane where pipe-pane was installed after sending the command — fast commands could finish before the watcher attached. Now pipe-pane is installed first, then the command is sent. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 66633fc - Browse repository at this point
Copy the full SHA 66633fcView commit details -
test(tmux): e2e tests for panes, send, capture, run, watch
Add a lightweight TmuxStack fixture that spins up an isolated 3-pane tmux layout (editor/terminal/agent) without requiring nvim. 16 tests cover role alias resolution, send+capture round-trip, run with exit codes and timeouts, watch pattern matching, and --grep filtering. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7b707b3 - Browse repository at this point
Copy the full SHA 7b707b3View commit details
Commits on May 31, 2026
-
feat(tmux): layout-preserving hide/show pane bindings
prefix-! breaks the current pane out to a background window, saving the full window_layout string in the window name so the split geometry can be restored exactly. prefix-@ finds the hidden window by name prefix, joins the pane back, and calls select-layout with the saved string to restore orientation and sizes. Uses window index (not $) so it works correctly regardless of which window is active when restoring.
Configuration menu - View commit details
-
Copy full SHA for aa8bfa0 - Browse repository at this point
Copy the full SHA aa8bfa0View commit details
Commits on Aug 18, 2026
-
feat(tmux): user-owned extras block for ~/.tmux.conf
Adds tmux.extras — a path to a user-owned tmux snippet that guyide appends to ~/.tmux.conf on every install/update, wrapped in '# guyide:extras-begin'/'# guyide:extras-end' markers. The block lands after the tpm 'run' line, so its settings win over plugin-set defaults. This fixes the common case where a theme plugin sets an option users need to override — e.g. tmux-oasis wired mode-style to @thm_surface, making copy-mode selection near-invisible against dark flavors. Drift detection (classifyTmuxDrift) strips the marker-wrapped block from the user conf before comparing to the canonical body, so extras content is never flagged as foreign drift and users don't have to choose between customisation and managed-conf updates. Wired end-to-end: - schema: TmuxConfig.Extras (yaml 'extras') - driver: extrasPath (empty ⇒ ~/.guyide/components/tmux/extras.conf, '~/' expands), readExtras (missing/empty ⇒ nil, self-reference to ~/.tmux.conf ⇒ error), composeUserConf, stripExtrasBlock - doctor: informational check ('ok' when appending, 'skip' when absent), never a warning - plan: notes extras source path when a block will be appended - config CLI: get/set 'tmux.extras' - embed comment: point users at the real key/path instead of the earlier aspirational 'add a tmux extras file' phrasing Backwards-compatible: extras absent ⇒ ~/.tmux.conf is byte-identical to the canonical guyide.conf, same as before. Tests: 18 new unit tests covering path resolution, read semantics, compose/strip round-trip, install idempotence, drift stripping, and doctor status transitions.Configuration menu - View commit details
-
Copy full SHA for 2f10e60 - Browse repository at this point
Copy the full SHA 2f10e60View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...feat/tmux-extras