greptile onboard creates your organization, connects GitHub or GitLab, enables repositories, and imports your existing AI rules files — the same setup the dashboard does.
This page is written to be handed to a coding agent. Paste the prompt below into Claude Code, Cursor, Codex, or any agent that can read a URL and run shell commands, and it will do the setup for you.
onboard command does not exist in earlier versions — if you see Unknown command onboard, you are on an old build. See Upgrade.Onboard with your coding agent
Copy this prompt into your agent:Onboard yourself
If you would rather do it by hand, it is three commands:Prerequisites
- Node 22+ — check with
node --version - A local git repository with at least one commit, and a remote on GitHub or GitLab
- Permission to install a GitHub App on your organization (or, for GitLab, to create an access token and a webhook)
greptile login creates one.
Install
- npm
- Homebrew
- Install script
Upgrade
onboard shipped in v3.2.0. Confirm your version:
3.2.0, upgrade with the same method you installed with:
Run the wizard
Run it from your repository root
Create your organization
Connect your code provider
- GitHub — authorize Greptile and complete the App install, choosing which repositories it can access.
- GitLab — paste a service account personal access token (recommended), group access token, or project access token. The account must have the Developer role and the token must have the
apiscope. Set up the webhook, then click Done, I’ve set up the webhook.
Enable repositories
AI rules are imported automatically
CLAUDE.mdand.claude/rules/**/*.mdAGENTS.md.cursorrulesand.cursor/rules/**/*.mdc
Verify
Agent playbook
What you can and cannot automate
Two steps are interactive by design and cannot be driven by an agent:- Approving the browser sign-in — a human must click Approve.
- The
greptile onboardwizard itself — it refuses to run when it detects an agent environment (CLAUDECODE,CLAUDE_CODE,CURSOR_AGENT,CODEX_*) or a non-TTY stdout. Run non-interactively, it prints setup status and exits0instead.
greptile onboard’s non-interactive output as a read-only state probe, do every other step yourself, and hand off cleanly for the two that need a human.
Steps
Preflight
npm i -g greptile@latest and re-check. If greptile onboard --help reports Unknown command, the upgrade did not take effect — stop and report it.Check for a conflicting API key
API key invalid or revoked on every command. Ask them to unset GREPTILE_API_KEY and remove it from their shell rc. Do not proceed while a failing key is set.Locate the repository
Check sign-in
Signed in as <email>with an org listed → already set up. Skip to Run the first review.Signed in as <email>with no organizations → signed in, not onboarded. Go to Hand off the wizard.Not signed in→ continue below.
greptile login. It prints a URL and waits. Surface that URL to the user and stop. Do not proceed until greptile whoami reports a signed-in account.Probe onboarding state
0:| Output | Meaning | Do this |
|---|---|---|
Greptile onboarding: complete. | Fully set up | Skip to Run the first review |
Greptile onboarding: in progress. | Started, unfinished | Hand off the wizard |
Greptile onboarding: dismissed. | Skipped earlier | Hand off the wizard |
error: not signed in. | No credentials | Go back to Check sign-in |
Hand off the wizard
Run this in your own terminal — I can’t drive an interactive wizard:Then poll until it completes:You’ll be asked for: your name, an organization name, a URL handle (blank is fine), company website (optional), and company size. Then pick GitHub or GitLab, finish the connection in the browser that opens, and choose which repositories to enable. Tell me when it says “Greptile is ready to review your first PR!”
Greptile onboarding: complete. If the user reports an error, match it against Troubleshooting and tell them the fix — do not attempt to work around it yourself.Run the first review
--agent (plain text) or --json (structured). Summarize the findings for the user.Exit codes: 0 finished · 1 could not finish (or signed out) · 2 invalid invocation (not a git repo) · 130 interrupted.If it fails with a billing error, report it and stop — see Troubleshooting.Rules
- Never invent answers to the wizard. The organization name and handle are the user’s to choose.
- Every command is safe to re-run. Each step is gated on server state, so a repeated
greptile onboardskips what is already done. If you are unsure of the state, probe again. - Do not create a second organization. If the user is already onboarded,
greptile onboardoffers “Create a new organization” — that is not a retry, and it is not what they want.
Troubleshooting
Unknown command onboard
Unknown command onboard
greptile --version, then upgrade with npm i -g greptile@latest (or brew upgrade greptile).If you installed via npm but greptile resolves through Homebrew’s Node, brew upgrade will not help — use npm.API key invalid or revoked
API key invalid or revoked
GREPTILE_API_KEY overrides browser sign-in, and API keys cannot create an organization.~/.zshrc, ~/.zprofile, or ~/.bashrc too, or it returns in your next shell.We didn't detect a completed GitHub connection
We didn't detect a completed GitHub connection
greptile onboard and complete the GitHub App install — authorizing Greptile is not enough. You must finish the install and grant repository access.Every organization is already linked to another workspace
Every organization is already linked to another workspace
Greptile needs at least one repository to finish onboarding
Greptile needs at least one repository to finish onboarding
greptile onboard and choose Add repositories.The review fails with a billing or trial error
The review fails with a billing or trial error
I'm on SSH, a container, or a remote dev box
I'm on SSH, a container, or a remote dev box
greptile onboard somewhere with a browser first.Command reference
| Command | What it does |
|---|---|
greptile onboard | Interactive setup wizard. Prints setup status when output is not a terminal. |
greptile login | Sign in through your browser |
greptile whoami | Show your account and organizations |
greptile review | Review the current branch against its base |
greptile settings | Change review settings, members, and team config |
greptile update | Update the CLI |
greptile settings, or in the dashboard.