flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t/apps/web/public/install/claude.sh

23 lines817 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Record your own agent's sessions automatically1#!/bin/sh
2# Connects Claude Code on this machine to g1t, so the sessions of your own
3# agent are recorded onto the pull requests they belong to:
4#
5# curl -fsSL https://g1t.sh/install/claude.sh | sh
6#
7# It downloads two small scripts into ~/.g1t, signs you in through the
8# browser, and adds a hook to ~/.claude/settings.json. Needs Node 18 or
9# later, which Claude Code itself runs on.
10set -eu
11
12BASE="${G1T_SITE:-https://g1t.sh}"
13
14if ! command -v node >/dev/null 2>&1; then
15 echo "g1t: Node 18 or later is needed (Claude Code runs on it too)." >&2
16 exit 1
17fi
18
19mkdir -p "$HOME/.g1t"
20curl -fsSL "$BASE/install/hook.mjs" -o "$HOME/.g1t/hook.mjs"
21curl -fsSL "$BASE/install/setup.mjs" -o "$HOME/.g1t/setup.mjs"
22# Read from the terminal, not from the pipe this script arrived on.
23node "$HOME/.g1t/setup.mjs" < /dev/tty