tsc-git-hook
Install the managed Git hook CLI, authenticate through the GitHub hook service, and keep repository-scoped sessions local to your machine.
curl -fsSL https://hook.tsc-security.tools/install.sh | shThe install command is selected automatically for your platform. Installer entry points and pinned archives stay listed below.
Quick start
- Install
tsc-git-hookfor your platform using the command above. - Install the managed hook in the repository you want to protect, or use recursive install for a workspace with many repositories.
- Run
tsc-git-hook auth loginonce to create your GitHub-backed local session. - Run
tsc-git-hook doctorto verify the current checkout, backend reachability, and repository authorization. - Run
tsc-git-hook run dry-run --verbosefor a full repository scan before relying onpre-push.
Requirements
- Windows x64, Linux x64, or macOS Apple Silicon.
- Git available locally.
- PowerShell on Windows or a POSIX shell on Linux and macOS.
- A local browser and loopback callback for the first login flow.
- No admin access should be required for the default install path.
The installer downloads the latest stable release, verifies SHA-256, installs it in the user scope, and updates PATH when needed.
Install hooks
cd /path/to/repository
tsc-git-hook install
Use this when you want to enable the managed pre-push hook for one checkout.
cd /path/to/workspace
tsc-git-hook install --recursive
This discovers Git repositories under the current directory and installs the managed hook in each one. Existing unmanaged hooks are left untouched and reported in the final summary.
tsc-git-hook install --recursive /path/to/workspace
Useful for IT-managed rollouts, bootstrap scripts, and fleet-wide workstation setup.
First-time authentication
cd /path/to/repository
tsc-git-hook auth login
- The CLI opens a browser to complete GitHub sign-in and listens locally for the callback.
- The resulting session is user-scoped, but repository access is still validated for the current checkout.
- If your session is valid but the repository is denied, the backend has not authorized that repository yet.
- Use
tsc-git-hook auth statuslater if you need to inspect the current session and repository authorization state.
Verify the current checkout
tsc-git-hook doctor
tsc-git-hook auth status
doctorchecks repository context, hook location, backend reachability, local session state, and repository authorization.auth statusis the fastest way to answer “am I logged in, and is this repo authorized?”- If your Git remote uses a custom SSH alias, the CLI resolves it before talking to the backend.
These commands are the best first stop before opening a support thread.
Run your first scan
tsc-git-hook run dry-run --verbose
Use this after installation or onboarding. It scans the full working tree and prints detailed progress.
git push
After the managed hook is installed, pre-push scanning runs automatically during push and only scans the push scope.
Documentation
Browse the detectors included in the current release, grouped by provider family. The catalog is generated automatically during release publishing.
.tscignore guide
Learn how .tscignore rules work, what syntax is currently supported, and how that affects local scans.
Understand what stays local, what the backend receives, and how secrets are masked before any reporting.
Installers
- install.sh for macOS and Linux
- install.ps1 for Windows PowerShell
Supported targets are Linux x64, Windows x64, and macOS Apple Silicon. macOS Intel is not supported.
Need help?
- Public release manifest: /releases/releases.json
- If the binary is not found after install, open a new terminal and run
tsc-git-hook version. - If PowerShell blocks execution, rerun the published install command from an interactive PowerShell session.
- If you manage many repositories, prefer
install --recursiveand use the summary output to identify repos with unmanaged hooks. - If login succeeds but the repository is denied, confirm the repository belongs to the expected organization and that backend authorization data is current.
- If your environment uses a proxy or locked-down firewall, use a pinned archive from the stable releases list below.
- Ignore hierarchy and
.tscignoreoperations are managed locally by the CLI. If you still need help, ping us in Slack.