greptile 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +79 -33
  2. package/dist/greptile.js +167 -167
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -1,62 +1,108 @@
1
1
  # greptile
2
2
 
3
- CLI for [Greptile](https://greptile.com) code reviews.
3
+ AI code review in your terminal. Get the same review Greptile runs on your team's pull requests, right inside your editor's shell, before you push.
4
4
 
5
5
  ## Install
6
6
 
7
- ```bash
8
- brew install greptileai/greptile/greptile
7
+ Pick whichever is easiest for you.
8
+
9
+ ```sh
10
+ # macOS, via Homebrew
11
+ brew install greptileai/tap/greptile
12
+
13
+ # Any platform with Node 22 or newer
14
+ npm install -g greptile
15
+
16
+ # Direct install for macOS (also needs Node 22+)
17
+ curl -fsSL https://raw.githubusercontent.com/greptileai/cli/main/install.sh | bash
9
18
  ```
10
19
 
11
- macOS only for now.
20
+ ## Quick start
21
+
22
+ ```sh
23
+ greptile login # opens your browser to sign in
24
+ cd path/to/your/repo
25
+ greptile review # review HEAD against the default branch
26
+ ```
12
27
 
13
- ## Sign in
28
+ That's it. Comments appear in the terminal as they come in.
14
29
 
15
- ```bash
16
- greptile login
30
+ ## Examples
31
+
32
+ **Review against a specific base branch:**
33
+
34
+ ```sh
35
+ greptile review -b main
17
36
  ```
18
37
 
19
- Opens your browser, completes the OAuth flow, and stores credentials at `~/.greptile/auth.json` (mode `0600`). Tokens refresh transparently on every authenticated command. Sign out with `greptile logout`.
38
+ **Show findings next to the actual code lines:**
20
39
 
21
- ## Run a review
40
+ ```sh
41
+ greptile review --diff
42
+ ```
22
43
 
23
- In a git checkout:
44
+ **Pipe to another tool or save the raw results:**
24
45
 
25
- ```bash
26
- greptile review
46
+ ```sh
47
+ greptile review --json > review.json
27
48
  ```
28
49
 
29
- Reviews `HEAD` against your repo's default branch (auto-detected). Override with `--base <branch>`.
50
+ **Re-open a previous review (pick from a list, or pass an ID):**
30
51
 
31
- Resume an in-flight or completed review:
52
+ ```sh
53
+ greptile review show
54
+ greptile review show abc123
55
+ ```
56
+
57
+ **Keep going on a review that stopped halfway:**
32
58
 
33
- ```bash
34
- greptile review view <runId>
59
+ ```sh
60
+ greptile review --resume
35
61
  ```
36
62
 
37
- ## Multi-organization users
63
+ ## More than one Greptile organization?
38
64
 
39
- If you belong to multiple Greptile organizations, set `GREPTILE_TENANT` to the slug shown in your dashboard URL (e.g. `acme-corp` in `app.greptile.com/acme-corp`). List your memberships with `greptile whoami`.
65
+ If you belong to several, tell greptile which one to use:
40
66
 
41
- ```bash
67
+ ```sh
68
+ greptile whoami # lists your organizations
42
69
  export GREPTILE_TENANT=acme-corp
43
70
  greptile review
44
71
  ```
45
72
 
46
- ## Environment variables
73
+ ## Diagrams
74
+
75
+ When a review's summary includes a Mermaid diagram, greptile renders it inline in kitty and Ghostty, and links the SVG file in other terminals. The first time a diagram needs to render, greptile downloads a small renderer ([mmdr](https://github.com/1jehuang/mermaid-rs-renderer)) into `~/.cache/greptile/`. To opt out, set `GREPTILE_NO_AUTO_INSTALL=1`.
76
+
77
+ ## Reference
78
+
79
+ Full command surface:
80
+
81
+ ```sh
82
+ greptile login | logout | whoami
83
+ greptile review [-b BRANCH] [--diff] [--resume] [--json | --text | --agent]
84
+ [--context LINES] [--width COLUMNS] [--no-color]
85
+ greptile review show [ID] # same review flags apply
86
+ ```
87
+
88
+ Environment variables:
89
+
90
+ | Variable | What it does |
91
+ | -------------------------- | -------------------------------------------------------------------------- |
92
+ | `GREPTILE_TENANT` | Which organization to use when you belong to more than one. |
93
+ | `GREPTILE_INLINE_IMAGES` | Force inline kitty diagrams on (`1`, `true`, `kitty`) or off (`0`, `off`). |
94
+ | `GREPTILE_NO_AUTO_INSTALL` | Skip the one-time mmdr download. |
95
+ | `NO_COLOR` | Turn off ANSI color. |
96
+ | `FORCE_COLOR` | Turn on ANSI color even when stdout is not a TTY. |
97
+ | `COLUMNS` | Override the output width. |
47
98
 
48
- | Variable | Required | Purpose |
49
- | ----------------- | -------- | ----------------------------------------- |
50
- | `GREPTILE_TENANT` | no | Tenant externalId for multi-org users. |
51
- | `NO_COLOR` | no | Disable ANSI color. |
52
- | `FORCE_COLOR` | no | Force ANSI color in non-TTY environments. |
53
- | `COLUMNS` | no | Override wrap width (capped at 80). |
99
+ Exit codes (useful for scripting):
54
100
 
55
- ## Exit codes
101
+ | Code | Meaning |
102
+ | ----- | --------------------------------------------------------------------------------- |
103
+ | `0` | Review finished. |
104
+ | `1` | Review couldn't finish (sign-in expired, server error, repo not connected, etc.). |
105
+ | `2` | Wrong invocation (not inside a git repo, invalid flag, etc.). |
106
+ | `130` | You hit Ctrl-C. |
56
107
 
57
- | Code | Meaning |
58
- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
59
- | `0` | Review ran successfully. |
60
- | `1` | Review could not run (auth failure, preflight failure, HTTP error, repo not onboarded, diff too large, timeout, entitlement denied, quota exceeded). |
61
- | `2` | CLI misuse (not in a git repo, invalid run ID, unknown flag, invalid `--base`). |
62
- | `130` | Interrupted via SIGINT. |
108
+ Credentials live at `~/.greptile/auth.json` and refresh themselves automatically.