@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 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` accepts `--ignore`, but applies it only when `--with-snippets` is enabled.
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
- Find GitHub repositories by name and search their code via grep.app.
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' # Find Rust repos named 'ratatui'
101
- wit search -p 'auth' -q 'JWT' -l 'Go' -w # Find Go auth repos using JWT, show code
102
- wit search -p 'ratatui' -q 'impl Widget' -w -c # Matching lines only, no context
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` | Regex pattern to match repository names (required) |
108
- | `-l` | `--lang` | Filter results by language |
109
- | `-q` | `--query` | Code pattern to search within repos (default: `.*`) |
110
- | `-r` | `--regex` | Enable regex search (default: true) |
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
- - The workflow builds and uploads `wit-<platform>-<arch>` archives plus `wit-checksums.txt` to the GitHub release.
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 # CLI entry point and display logic
238
- ├── lib.rs # Library exports
239
- ├── sed.rs # POSIX-style sed engine
240
- ├── gitops/
241
- │ ├── mod.rs
242
- │ └── ops.rs # Bare-repo caching, file access, tree, ls, head/tail, ripgrep
243
- └── grep/
244
- ├── mod.rs
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
- - `reqwest` - HTTP client for grep.app
254
- - `scraper` - HTML parsing for code snippets
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
@@ -1,6 +1,6 @@
1
- 537832c6ed342cefdaae053365d0f2da0f0e5709c66a50b4cd0cf2aca8ca7cff wit-linux-aarch64.tar.gz
2
- 3e426c8e5925f3614f17f609d019801c7cde6d7d4a27a3458da6879ac29013a1 wit-linux-x86_64.tar.gz
3
- 19c0e55a68fabce3ade9d018037df5a2678c92374f5bf6c012f9fdc13f19ff49 wit-macos-aarch64.tar.gz
4
- 6df40e9e9e128db4d47a272a5cdbfd315e7b6479f0f84483a7fe00eb0d5374c5 wit-macos-x86_64.tar.gz
5
- cfe949d7f002547665c713f6d530b8915369651f7c2d7fe43114fd612494b8af wit-windows-aarch64.zip
6
- b9ceeec230d78e0448720781c3c19446a974f3803045d96d41617abab5b77915 wit-windows-x86_64.zip
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nothumanwork/wit",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "GitHub exploration CLI for AI agents",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {