Sidekick setup ============== This page is for the person setting up their computer. It works on macOS, Linux and Windows, and takes three steps. Before you start: have curl, Python 3 with pip, and Git installed (on Linux, install your distribution's python3-pip package if pip is missing). You will sign in with your company Google account — any of: @balancehero.com, @truecredits.in, @truebalance.io, @afinit.com, @afinit.dev. Using the Claude app? Each command block there has a ▶ button that runs it in Claude's built-in terminal. 1) Run the one command macOS / Linux — in a terminal: curl -fsSL https://onboarding.afinit.dev/bootstrap/init-cli.sh -o init-cli.sh && bash init-cli.sh Windows — Windows has no Bash by default (the `bash` on PATH is the WSL stub and does not work), so use the launcher. First install Git for Windows — https://git-scm.com/download/win — which bundles Bash and curl, and Python 3 with pip — https://www.python.org/downloads/ — ticking "Add python.exe to PATH". Then, in Windows PowerShell: cd $env:USERPROFILE curl.exe -fsSL https://onboarding.afinit.dev/bootstrap/init-cli.ps1 -o init-cli.ps1 powershell -ExecutionPolicy Bypass -File .\init-cli.ps1 The launcher finds Git Bash, downloads init-cli.sh into %USERPROFILE%\.sidekick, checks its sha256 and hands off to it. If Git Bash is missing it prints what to install and stops without running anything. Letting Claude Code run it? Give it the same line — there is no separate one. Inside Claude Code the script moves itself to the background and returns in a few seconds, then a browser window opens for you to sign in. To wait for the result (it returns at least every 100 s — "still running" means run it again; exit 0 complete, 1 failed, 2 paused for you): bash ~/.sidekick/init-cli.sh --status --wait Just a look at how far it has got: bash ~/.sidekick/init-cli.sh --status On Windows, Claude Code's own shell is Git Bash, so there it uses the macOS / Linux line above; in PowerShell you use the launcher. 2) Sign in and approve in the browser The script opens your browser twice: first to sign in with your work Google account, and at the very end to review and approve the requested Google permissions. Keep the terminal running while you do. Tokens are saved on this computer; there is nothing to copy anywhere. If the browser wait runs out, the script prints a "PAUSED" block. Close the old sign-in tabs and continue with: bash ~/.sidekick/init-cli.sh --resume A new browser tab opens; finish there while the terminal is running. On Windows, in PowerShell: cd $env:USERPROFILE curl.exe -fsSL https://onboarding.afinit.dev/bootstrap/init-cli.ps1 -o init-cli.ps1 powershell -ExecutionPolicy Bypass -File .\init-cli.ps1 --resume 3) Done The script ends with "Sidekick setup complete" and a table of what it set up. Just before that it saves a snapshot of your setup by itself: the file ~/.sidekick/local-ready.json, with a copy in your room repo that TFS can read if something needs looking at later. There is nothing to type for it; it is saved the same way when a run fails or pauses, and the next --resume tries the room copy again if it could not be saved. Setup also clones the sidekick repo to ~/sidekick (once). From then on it keeps itself up to date when you open a Claude session: your own changes and commits stay, only the shared hook files (.claude/hooks, .claude/settings.json) are brought to the company version, with a copy of yours kept. If the folder is on another branch, or your changes are in the way, nothing of yours is touched and the next session says so once. That folder is where you work: open Claude there, not in your home folder — the platform instructions, skills and session hooks only load inside it. The last lines of the run print the folder you ran it in and where ~/sidekick is. To keep the download small (about 130 MB), that copy holds the shared folders (.claude, _knowledge, _platform, tfs …) and your own folder, without images, PDFs, archives or app bundles. Someone else's folder: cd ~/sidekick && git sparse-checkout add // Everything: cd ~/sidekick && git sparse-checkout disable Claude app: Code → choose folder → sidekick Terminal: cd ~/sidekick && claude If something goes wrong The script runs every step it can (only a failed sign-in ends it early), then prints a summary, the error code, where its state file and log are and — for the errors it knows — the fix to do. For any other error it prints a short block between ---8<--- and --->8--- to paste into #sidekick_helpdesk or Claude Code. When the cause is fixed, continue with: bash ~/.sidekick/init-cli.sh --resume The log masks known credentials. Check any excerpt before sharing it and never paste token values into a chat. If you want to check it yourself You do not need to — the script checks itself before it runs. To check by hand before running, download it and print its sha256: curl -fsSL https://onboarding.afinit.dev/bootstrap/init-cli.sh -o init-cli.sh python3 -c "import hashlib; print(hashlib.sha256(open('init-cli.sh', 'rb').read()).hexdigest())" It must be exactly: 3ab317d5b71ee673a1817e93a168c2642d7e921873e6c07797c91af2aa294d1c — the same value listed at https://onboarding.afinit.dev/bootstrap/SHA256SUMS. If it differs, do not run it; tell the onboarding channel. What the script checks on its own: init-cli.sh checks itself, and the files it downloads from https://onboarding.afinit.dev — provision_tokens.py, setup_git_credential.py, sync_skills.sh — against https://onboarding.afinit.dev/bootstrap/SHA256SUMS before running them. A mismatch stops that step with error HASH_MISMATCH and the file is not run. If the server is being updated just then, the script waits and looks once more by itself before it calls anything a mismatch. tp_login.py comes from https://token-provider.afinit.dev over TLS and is not hash-checked; it is recorded as unverified. More you can re-check, no sign-in needed: curl -s https://onboarding.afinit.dev/health # the deployed revision curl -s https://onboarding.afinit.dev/bootstrap/SHA256SUMS # the list above curl -sI https://onboarding.afinit.dev/init # X-Request-Id: quote it when reporting a problem Every JSON error from https://onboarding.afinit.dev has one shape — {code, message, requestId, at, diagnostics} — and requestId equals the X-Request-Id header. The full contract is https://onboarding.afinit.dev/openapi.json. Sidekick 셋업 ============= 이 페이지는 컴퓨터를 셋업하는 사람을 위한 안내입니다. macOS, Linux, Windows 모두 지원하고, 세 단계면 끝납니다. 시작 전에: curl, pip 포함 Python 3, Git 을 설치해 두세요(Linux 에서 pip 이 없으면 배포판의 python3-pip 패키지). 로그인은 회사 Google 계정으로 합니다 — 다음 중 하나: @balancehero.com, @truecredits.in, @truebalance.io, @afinit.com, @afinit.dev. Claude 앱에서는 명령 블록의 ▶ 버튼을 누르면 Claude 의 내장 터미널에서 바로 실행됩니다. 1) 명령 하나를 실행합니다 macOS / Linux — 터미널에서: curl -fsSL https://onboarding.afinit.dev/bootstrap/init-cli.sh -o init-cli.sh && bash init-cli.sh Windows — 기본 Bash 가 없습니다(PATH 의 `bash` 는 WSL 스텁이라 동작하지 않음). 그래서 런처를 씁니다. 먼저 Git for Windows(https://git-scm.com/download/win — Bash 와 curl 포함)와 pip 포함 Python 3(https://www.python.org/downloads/ — "Add python.exe to PATH" 체크)를 설치하고, Windows PowerShell 에서: cd $env:USERPROFILE curl.exe -fsSL https://onboarding.afinit.dev/bootstrap/init-cli.ps1 -o init-cli.ps1 powershell -ExecutionPolicy Bypass -File .\init-cli.ps1 런처가 Git Bash 를 찾아 init-cli.sh 를 %USERPROFILE%\.sidekick 폴더로 받고, sha256 을 확인한 뒤 실행합니다. Git Bash 가 없으면 무엇을 설치해야 하는지 출력하고 아무것도 실행하지 않고 멈춥니다. Claude Code 에게 맡겨도 같은 줄입니다 — 따로 쓰는 줄은 없습니다. Claude Code 안에서는 스크립트가 스스로 백그라운드로 옮겨 가 몇 초 만에 돌아오고, 그다음 로그인할 브라우저 창이 열립니다. 끝날 때까지 기다렸다가 결과를 받으려면(최대 100초마다 돌아옵니다 — "still running" 이면 같은 명령을 다시; 종료코드 0 완료, 1 실패, 2 사람 대기): bash ~/.sidekick/init-cli.sh --status --wait 어디까지 왔는지만 볼 때는: bash ~/.sidekick/init-cli.sh --status Windows 에서 Claude Code 의 셸은 Git Bash 라서 위의 macOS / Linux 줄을 그대로 씁니다. PowerShell 에서 직접 할 때는 런처를 씁니다. 2) 브라우저에서 로그인하고 승인합니다 스크립트가 브라우저를 두 번 엽니다. 처음엔 회사 Google 계정 로그인, 맨 끝엔 요청된 Google 권한 검토·승인입니다. 그동안 터미널은 켜 두세요. 토큰은 이 컴퓨터에 저장되고, 어디에도 복사할 값은 없습니다. 제한 시간 안에 못 끝내 "PAUSED" 가 나오면 이전 로그인 탭을 닫고: bash ~/.sidekick/init-cli.sh --resume 새 브라우저 탭이 열리면 터미널이 켜진 동안 거기서 마치세요. Windows 는 PowerShell 에서: cd $env:USERPROFILE curl.exe -fsSL https://onboarding.afinit.dev/bootstrap/init-cli.ps1 -o init-cli.ps1 powershell -ExecutionPolicy Bypass -File .\init-cli.ps1 --resume 3) 끝 스크립트가 "Sidekick setup complete" 와 셋업 결과 표를 보여 주면 끝입니다. 그 직전에 스크립트가 셋업 상태 스냅샷을 스스로 남깁니다 — ~/.sidekick/local-ready.json 과, 나중에 문제가 생기면 TFS 가 볼 수 있는 룸 레포 사본입니다. 따로 칠 명령은 없습니다. 실행이 실패하거나 멈춰도 똑같이 남고, 룸 레포에 못 올렸으면 다음 --resume 때 다시 올립니다. 셋업은 sidekick 레포도 ~/sidekick 에 받아 둡니다(한 번). 그 뒤로는 Claude 세션을 열 때 스스로 최신으로 맞춥니다 — 내 수정과 커밋은 그대로 두고, 공용 훅 파일(.claude/hooks · .claude/settings.json)만 회사 것으로 맞추며 내 것은 사본을 남깁니다. 다른 브랜치에 있거나 내 수정과 겹치면 내 것은 건드리지 않고 한 번 알려 줍니다. 앞으로 일하는 폴더가 여기입니다 — Claude 는 홈 폴더가 아니라 이 폴더에서 여세요. 플랫폼 안내·스킬·세션 훅이 이 폴더 안에서만 붙습니다. 실행 맨 끝 줄에 지금 실행한 폴더와 ~/sidekick 위치가 찍힙니다. 받는 양을 줄이려고(약 130 MB) 공용 폴더(.claude · _knowledge · _platform · tfs …)와 내 폴더만, 그림·PDF·압축파일·앱 묶음은 빼고 받습니다. 다른 사람 폴더는: cd ~/sidekick && git sparse-checkout add // 전부 받으려면: cd ~/sidekick && git sparse-checkout disable Claude 앱: Code → 폴더 선택 → sidekick 터미널: cd ~/sidekick && claude 문제가 생기면 스크립트는 할 수 있는 단계를 끝까지 돌고(로그인 실패만 일찍 끝남), 요약·에러코드· 상태 파일과 로그 위치, 그리고 아는 오류면 할 일(fix)을 바로 출력합니다. 그 밖의 오류에만 ---8<--- 와 --->8--- 사이의 짧은 문장이 나오니, #sidekick_helpdesk 나 Claude Code 에 붙여넣으세요. 원인을 고친 뒤에는 이어서 실행합니다: bash ~/.sidekick/init-cli.sh --resume 로그는 알려진 자격증명을 가립니다. 공유할 부분을 먼저 확인하고 토큰 값은 붙여넣지 마세요. 직접 확인하고 싶다면 하지 않아도 됩니다 — 스크립트가 실행 전에 스스로를 확인합니다. 실행 전에 손으로 확인하려면 받아서 sha256 을 출력해 보세요: curl -fsSL https://onboarding.afinit.dev/bootstrap/init-cli.sh -o init-cli.sh python3 -c "import hashlib; print(hashlib.sha256(open('init-cli.sh', 'rb').read()).hexdigest())" 값이 정확히 3ab317d5b71ee673a1817e93a168c2642d7e921873e6c07797c91af2aa294d1c 이어야 합니다 — https://onboarding.afinit.dev/bootstrap/SHA256SUMS 에 적힌 값과 같습니다. 다르면 실행하지 말고 온보딩 채널에 알려 주세요. 스크립트가 스스로 하는 확인: init-cli.sh 는 자기 자신과, https://onboarding.afinit.dev 에서 받는 파일 provision_tokens.py, setup_git_credential.py, sync_skills.sh 를 실행 전에 https://onboarding.afinit.dev/bootstrap/SHA256SUMS 와 대조합니다. 다르면 그 단계가 HASH_MISMATCH 로 멈추고 파일은 실행되지 않습니다. 마침 서버가 갱신되는 중이면 스스로 기다렸다가 한 번 더 보고 나서 판단합니다. tp_login.py 는 https://token-provider.afinit.dev 에서 TLS 로 받으며 해시 대조를 하지 않고, unverified 로 기록됩니다. 로그인 없이 더 확인할 수 있는 것: curl -s https://onboarding.afinit.dev/health # 배포된 리비전 curl -s https://onboarding.afinit.dev/bootstrap/SHA256SUMS # 위 목록 curl -sI https://onboarding.afinit.dev/init # X-Request-Id: 문제를 알릴 때 인용 https://onboarding.afinit.dev 의 JSON 오류는 모두 같은 모양 — {code, message, requestId, at, diagnostics} — 이고 requestId 는 X-Request-Id 헤더와 같습니다. 전체 계약은 https://onboarding.afinit.dev/openapi.json 입니다.