.nh .TH "glab" "1" "Nov 2026" "Auto generated by spf13/cobra" "" .SH NAME glab-minder-setup - Configure this machine to record AI agent sessions. (EXPERIMENTAL) .SH SYNOPSIS \fBglab minder setup [flags]\fP .SH DESCRIPTION Configure the current machine for AI governance session capture. .PP Choose the agents to sync with \fB--agents\fR\&. Without it, setup syncs the agents set up by an earlier run, or Claude Code if there are none. For each agent, setup installs: .IP \(bu 2 Claude Code (\fBclaude-code\fR): a Stop hook in \fB~/.claude/settings.json\fR, which syncs the session after every agent turn, and a SessionEnd hook, which syncs the session and marks it completed. .IP \(bu 2 OpenCode (\fBopencode\fR), version 1.4 or later: a plugin in \fB~/.config/opencode/plugins/glab-govern.js\fR (under \fB$XDG_CONFIG_HOME\fR when it is set), which syncs the session every time it goes idle. OpenCode loads it for all your sessions, in every project. Later setups keep it up to date. .IP \(bu 2 Codex (\fBcodex\fR) and Cursor (\fBcursor\fR): nothing. The fallback periodic sync finds their sessions by scanning their transcripts in \fB~/.codex/sessions\fR and \fB~/.cursor/projects\fR, including sessions from before you enabled them, and uploads those from repositories on GitLab hosts you are logged in to with glab. Their sessions are marked completed once they have been idle for 24 hours. .PP Setup also installs the fallback periodic sync: a launchd agent (\fB~/Library/LaunchAgents/com.gitlab.glab-govern-audit-sync.plist\fR) on macOS, or a systemd user timer (\fB~/.config/systemd/user/glab-govern-audit-sync.timer\fR) on Linux. .PP The fallback periodic sync runs \fBglab minder audit sync --all\fR every 30 minutes, and on Linux also 5 minutes after boot, until you remove it. It uploads anything the hooks missed for sessions they have already recorded (see \fBglab minder audit sync --help\fR for what is uploaded), using your stored glab credentials and the glab configuration directory in use when you run setup. Each session goes to the project and host of the Git repository the agent ran in. It also marks sessions completed once they have been idle for 24 hours. It pauses sessions from agents that use hooks while those hooks are not installed. Pass \fB--no-fallback-sync\fR to install only the hooks and plugin, which Codex and Cursor cannot be synced without. The fallback periodic sync is not available on Windows. .PP Run setup again with \fB--agents\fR to add agents. Agents set up by an earlier run stay set up, so to stop syncing an agent, run \fB--uninstall\fR and then set up the agents you want. Every setup prompt names the agents that are synced. .PP Safe to run multiple times: existing hooks are not duplicated, and an existing fallback periodic sync job is replaced. Run \fBglab minder doctor\fR afterwards to verify the setup. .PP Run \fBglab minder setup --uninstall\fR to remove everything setup installed: the hooks, the OpenCode plugin, the fallback periodic sync job, and Codex and Cursor session syncing. It also forgets the agents you set up, so the next setup starts with Claude Code again. Other hooks and settings in \fB~/.claude/settings.json\fR, and other OpenCode plugins, are left unchanged. .PP This feature is an experiment and is not ready for production use. It might be unstable or removed at any time. For more information, see https://docs.gitlab.com/policy/development_stages_support/. .SH OPTIONS \fB--agents\fP=[] Agents to sync sessions from: claude-code, opencode, codex, cursor. Added to the agents set up by an earlier run. The OpenCode plugin runs for all your OpenCode sessions. Multiple agents can be comma-separated or specified by repeating the flag. .PP \fB--no-fallback-sync\fP[=false] Install only the hooks and plugin, without the fallback periodic sync job. .PP \fB--uninstall\fP[=false] Remove the hooks, the OpenCode plugin, and the fallback periodic sync job, and stop syncing Codex and Cursor sessions. .PP \fB-y\fP, \fB--yes\fP[=false] Skip confirmation prompt. .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB-h\fP, \fB--help\fP[=false] Show help for this command. .SH EXAMPLE .EX # Sync Claude Code sessions, or the agents set up earlier $ glab minder setup # Sync OpenCode sessions $ glab minder setup --agents opencode # Sync Claude Code, OpenCode, and Codex sessions $ glab minder setup --agents claude-code,opencode,codex # Install only the hooks and plugin, without the fallback periodic sync $ glab minder setup --no-fallback-sync # Remove everything setup installed $ glab minder setup --uninstall .EE .SH SEE ALSO \fBglab-minder(1)\fP