@nothumanwork/wit 0.1.16 → 0.1.17
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.
- package/README.md +25 -26
- package/dists/wit-checksums.txt +6 -6
- package/dists/wit-linux-aarch64.tar.gz +0 -0
- package/dists/wit-linux-x86_64.tar.gz +0 -0
- package/dists/wit-macos-aarch64.tar.gz +0 -0
- package/dists/wit-macos-x86_64.tar.gz +0 -0
- package/dists/wit-windows-aarch64.zip +0 -0
- package/dists/wit-windows-x86_64.zip +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,28 +88,28 @@ wit rg 'fn main' ratatui/ratatui --ignore '.git' --ignore '*.lock'
|
|
|
88
88
|
wit cat ratatui/ratatui src/main.rs --ignore 'src/main.rs' # blocked (explicitly ignored)
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
`search`
|
|
91
|
+
`search` ignores `--ignore`, because repository discovery is done through GitHub's repository search API rather than cached file traversal.
|
|
92
92
|
|
|
93
93
|
## Commands
|
|
94
94
|
|
|
95
95
|
### search (alias: s)
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
Discover repositories using **GitHub’s repository search API** only. Results are ordered by **stars** and the table shows **stars**. Use `-p/--pattern` for a repository-name filter, `-l/--lang` for a GitHub `language:` qualifier, and `-q/--query` to pass raw GitHub repository-search terms and qualifiers through unchanged.
|
|
98
|
+
|
|
99
|
+
Set **`GITHUB_TOKEN`** for higher GitHub rate limits. GitHub’s `language:` filter must match [GitHub language names](https://github.com/search?q=language%3ARust&type=repositories). `wit search` fetches only enough GitHub pages to satisfy `--limit` (default: `10`, max: `1000`). GitHub may return at most 1000 repositories per query; if GitHub sets `incomplete_results`, a warning is printed.
|
|
98
100
|
|
|
99
101
|
```bash
|
|
100
|
-
wit search -p 'ratatui' -l 'Rust'
|
|
101
|
-
wit search -
|
|
102
|
-
wit search -p '
|
|
102
|
+
wit search -p 'ratatui' -l 'Rust' --limit 20 # Rust repos named ratatui (by stars)
|
|
103
|
+
wit search -q 'stars:>1000 topic:tui archived:false' # Raw GitHub qualifiers
|
|
104
|
+
wit search -p 'auth' -q 'user:ory language:Go pushed:>2025-01-01'
|
|
103
105
|
```
|
|
104
106
|
|
|
105
107
|
| Flag | Long | Description |
|
|
106
108
|
|------|------|-------------|
|
|
107
|
-
| `-p` | `--pattern` |
|
|
108
|
-
| `-l` | `--lang` |
|
|
109
|
-
| `-q` | `--query` |
|
|
110
|
-
| `-
|
|
111
|
-
| `-w` | `--with-snippets` | Show code snippets with context |
|
|
112
|
-
| `-c` | `--compact` | Show only matching lines (requires `-w`) |
|
|
109
|
+
| `-p` | `--pattern` | Optional repository-name filter (`in:name`) |
|
|
110
|
+
| `-l` | `--lang` | Optional GitHub `language:` qualifier |
|
|
111
|
+
| `-q` | `--query` | Raw GitHub search terms and qualifiers, passed through as-is |
|
|
112
|
+
| `-n` | `--limit` | Maximum repositories to print (default `10`, max `1000`) |
|
|
113
113
|
|
|
114
114
|
### cache (alias: c)
|
|
115
115
|
|
|
@@ -226,32 +226,31 @@ wit tail -p 100 ratatui/ratatui src/lib.rs # From line 100 to end
|
|
|
226
226
|
- Every push to `main` triggers `.github/workflows/auto-tag.yml`, which increments the patch version in `Cargo.toml`, creates a new `vX.Y.Z` tag, and pushes it.
|
|
227
227
|
- Push a semver tag (for example `v0.2.0`) to trigger `.github/workflows/release.yml`.
|
|
228
228
|
- `.github/workflows/release.yml` can also be triggered manually with `workflow_dispatch` (select a `vX.Y.Z` tag ref).
|
|
229
|
-
-
|
|
230
|
-
- `.github/workflows/publish-npm.yml` publishes `@nothumanwork/wit` from the GitHub release assets and can be re-run manually for an existing release tag without rebuilding Rust binaries.
|
|
229
|
+
- `.github/workflows/release.yml` validates the tag ref, builds Linux/macOS/Windows artifacts on GitHub-hosted runners, uploads `wit-<platform>-<arch>` archives plus `wit-checksums.txt`, and then invokes `.github/workflows/publish-npm.yml`.
|
|
230
|
+
- `.github/workflows/publish-npm.yml` publishes `@nothumanwork/wit` from the attached GitHub release assets and can be re-run manually for an existing release tag without rebuilding Rust binaries.
|
|
231
231
|
- `install.sh` downloads the matching archive and verifies it against the checksum manifest when available.
|
|
232
232
|
|
|
233
233
|
## Architecture
|
|
234
234
|
|
|
235
235
|
```
|
|
236
|
-
src/
|
|
237
|
-
├── cli.rs
|
|
238
|
-
├── lib.rs
|
|
239
|
-
├──
|
|
240
|
-
├──
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
├── client.rs # grep.app API client
|
|
246
|
-
└── types.rs # Response types and data structures
|
|
236
|
+
crates/wit/src/
|
|
237
|
+
├── cli.rs # CLI entry point
|
|
238
|
+
├── lib.rs # Library exports (gitops, sed, search, search_run)
|
|
239
|
+
├── search.rs # GitHub repository search, query assembly, limit-aware pagination
|
|
240
|
+
├── search_run.rs # `wit search`: GitHub-only orchestration
|
|
241
|
+
├── sed.rs
|
|
242
|
+
└── gitops/ # Bare-repo cache, tree, ls, cat, rg, head, tail
|
|
243
|
+
|
|
244
|
+
crates/wits/ # grep.app client + `wits` binary; shared result printing
|
|
247
245
|
```
|
|
248
246
|
|
|
249
247
|
## Dependencies
|
|
250
248
|
|
|
251
249
|
- `clap` - CLI argument parsing
|
|
252
250
|
- `gix` (gitoxide) - Bare clone + tree traversal + blob reading
|
|
253
|
-
- `
|
|
254
|
-
- `
|
|
251
|
+
- `octocrab` - GitHub REST API (`wit search`)
|
|
252
|
+
- `reqwest` - HTTP client (grep.app in `wits`; other HTTP in wit)
|
|
253
|
+
- `scraper` - HTML parsing for grep.app snippets (`wits`)
|
|
255
254
|
- `grep-regex` / `grep-searcher` / `grep-matcher` - Ripgrep-style search on blobs
|
|
256
255
|
- `ptree` - Tree display
|
|
257
256
|
- `colored` - Terminal output formatting
|
package/dists/wit-checksums.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
d9d4a5542e4c25ae08626ef229b3d98a517fa68c589c2c84c054ec6d85326fd7 wit-linux-aarch64.tar.gz
|
|
2
|
+
418ecdb63c68aac8b6acb147c26bb5c26de84d1a2f5b9b61132925706facf88e wit-linux-x86_64.tar.gz
|
|
3
|
+
fac9570a652a6f76dcef35bc75275a11600d1f1cbff923d60c5e173d4aeb33ea wit-macos-aarch64.tar.gz
|
|
4
|
+
90aa2a80f6293720d124b24be9cbfccafccb9dcb09da6fc6f630bc5060840179 wit-macos-x86_64.tar.gz
|
|
5
|
+
c9200339d94c94e35ea47d4839bf80f22aecd4832845a233024bfe1c12407284 wit-windows-aarch64.zip
|
|
6
|
+
9c74e5067eae8122ba9cf4b2a90e026b47b160c82b4c30a42081bbf6340e6b4f wit-windows-x86_64.zip
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|