You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`directory`| Optional path to the project directory (default: ".") |
91
+
|`git-url`| Git repository URL (GitHub, GitLab, Bitbucket, SSH, HTTPS) to clone and analyze |
90
92
91
93
### Options
92
94
@@ -157,6 +159,24 @@ grab [options] [directory]
157
159
grab -g="*.{ts,tsx}" -g="\!*.spec.{ts,tsx}"
158
160
```
159
161
162
+
9. Analyze a remote Git repository:
163
+
164
+
```bash
165
+
grab https://github.com/user/repo.git
166
+
```
167
+
168
+
10. Analyze a remote repository non-interactively with dependencies:
169
+
170
+
```bash
171
+
grab -n --deps https://github.com/user/repo.git
172
+
```
173
+
174
+
11. Clone and analyze using SSH:
175
+
176
+
```bash
177
+
grab git@github.com:user/repo.git
178
+
```
179
+
160
180
## ⌨️ Keyboard Controls
161
181
162
182
### Navigation
@@ -210,6 +230,7 @@ CodeGrab can automatically include dependencies for selected files, making it ea
210
230
- **Supported Languages**:
211
231
- **Go**: Resolves relative imports and project-local module imports (if `go.mod` is present).
212
232
- **JavaScript/TypeScript**: Resolves relative imports/requires for`.js`, `.jsx`, `.ts`, and `.tsx` files, including directory `index` files.
233
+
- **Python**: Resolves relative imports for`.py` files within the project structure.
213
234
- **Enabling**:
214
235
- **Interactive Mode**: Press <kbd>D</kbd> to toggle dependency resolution on/off. A `🔗 Deps` indicator will appear in the footer when active. Files added as dependencies will be marked with `[dep]`.
215
236
- **Non-Interactive Mode**: Use the `--deps` flag.
@@ -220,6 +241,19 @@ CodeGrab can automatically include dependencies for selected files, making it ea
CodeGrab can directly analyze remote Git repositories without requiring manual cloning. Simply pass a Git URL as the directory argument, and CodeGrab will automatically clone the repository to a temporary directory.
247
+
248
+
- **Supported URL Formats**:
249
+
- HTTPS: `https://github.com/user/repo.git` or `https://github.com/user/repo`
250
+
- SSH: `git@github.com:user/repo.git`
251
+
- SSH with protocol: `ssh://git@github.com/user/repo.git`
252
+
- Supports GitHub, GitLab, Bitbucket, and other Git hosting platforms
253
+
- **Efficient Cloning**: Uses shallow cloning (`--depth=1`) to only fetch the latest commit, making it fast and lightweight
254
+
- **Automatic Cleanup**: Temporary directories are automatically cleaned up after processing
255
+
- **Full Feature Support**: All CodeGrab features work with remote repositories (filtering, dependency resolution, secret detection, etc.)
256
+
223
257
## 🛡️ Secret Detection & Redaction
224
258
225
259
CodeGrab automatically scans the content of selected files for potential secrets using [gitleaks](https://github.com/gitleaks/gitleaks) with its default rules. This helps prevent accidental exposure of sensitive credentials like API keys, private tokens, and passwords.
0 commit comments