every-cli 0.1.0__py3-none-any.whl
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.
- every/__init__.py +3 -0
- every/cache.py +65 -0
- every/classify.py +23 -0
- every/cli.py +239 -0
- every/discover.py +96 -0
- every/extract.py +137 -0
- every/judge.py +288 -0
- every/neighborhood.py +45 -0
- every/report.py +63 -0
- every/selftest.py +83 -0
- every/symbols.py +109 -0
- every/units.py +34 -0
- every_cli-0.1.0.dist-info/METADATA +118 -0
- every_cli-0.1.0.dist-info/RECORD +18 -0
- every_cli-0.1.0.dist-info/WHEEL +5 -0
- every_cli-0.1.0.dist-info/entry_points.txt +2 -0
- every_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
- every_cli-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: every-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Ask a yes/no question of every function in a codebase. Ranked answers in seconds, for cents.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/sufianetaouil/every
|
|
7
|
+
Project-URL: Issues, https://github.com/sufianetaouil/every/issues
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: tree-sitter>=0.25
|
|
12
|
+
Requires-Dist: tree-sitter-language-pack>=1.15
|
|
13
|
+
Requires-Dist: httpx>=0.27
|
|
14
|
+
Provides-Extra: dev
|
|
15
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# every
|
|
19
|
+
|
|
20
|
+
**Ask a yes/no question of every function in a codebase. Ranked answers in seconds, for cents.**
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
$ every "catches an exception and then ignores it" ./my-api
|
|
24
|
+
|
|
25
|
+
scanned 1,842 functions in 214 files ... 3.1s $0.03 class: body
|
|
26
|
+
|
|
27
|
+
0.93 src/payments/webhook.py:88 handle_stripe_event
|
|
28
|
+
0.88 src/auth/session.py:141 refresh_token
|
|
29
|
+
0.84 src/jobs/retry.py:22 _run_once
|
|
30
|
+
0.79 src/db/pool.py:57 _reconnect
|
|
31
|
+
0.52 src/utils/cache.py:19 get (below 0.75)
|
|
32
|
+
|
|
33
|
+
4 hits >= 0.75 out of 1,842 functions
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`every` is grep whose pattern is a question. It is **not** embedding search: it does not
|
|
37
|
+
find code *similar to* your words. It judges the question against **every function** and
|
|
38
|
+
returns the probability that the answer is yes.
|
|
39
|
+
|
|
40
|
+
It runs on [TypeSafe AI's Jev](https://typesafe.ai), a model that returns typed decisions
|
|
41
|
+
with probabilities instead of generating text. That is what makes judging 5,000 functions
|
|
42
|
+
cost about seven cents and take about fifteen seconds (measured: 1,302 functions of
|
|
43
|
+
`gin-gonic/gin` in 3.7 s for $0.018).
|
|
44
|
+
|
|
45
|
+
## Install
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
pip install every-cli # installs the `every` command
|
|
49
|
+
export TYPESAFE_API_KEY=... # PowerShell: $env:TYPESAFE_API_KEY="..."
|
|
50
|
+
every --selftest # 20 labelled functions, one request; prints recall / false positives / AUROC
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### No Jev access yet?
|
|
54
|
+
|
|
55
|
+
`every` needs a Jev API key. If you don't have one, **join the hosted-tier waitlist:**
|
|
56
|
+
https://github.com/sufianetaouil/every/discussions/1 — enough signups and we build the
|
|
57
|
+
hosted version (no key, no setup). Meanwhile, `examples/recorded/` has real runs you can read.
|
|
58
|
+
|
|
59
|
+
## What leaves your machine
|
|
60
|
+
|
|
61
|
+
The source of every function in the files `every` scans is sent to TypeSafe's API
|
|
62
|
+
(`api.typesafe.ai`) to be judged. Nothing else is sent. The local cache
|
|
63
|
+
`.every/cache.json` stores only `sha256(question, unit text) -> score`, never source.
|
|
64
|
+
Don't point `every` at code you can't send to a third party.
|
|
65
|
+
|
|
66
|
+
## Usage
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
every "<question>" <path> [--above 0.75] [--top 20] [--json] [--yes] [--no-cache]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Questions that work well are about **one function at a time**:
|
|
73
|
+
|
|
74
|
+
- "builds SQL by string concatenation"
|
|
75
|
+
- "reads request data without checking authentication"
|
|
76
|
+
- "returns a user record that still contains the password hash"
|
|
77
|
+
- "is a test that doesn't assert anything"
|
|
78
|
+
- "retries in a loop with no upper bound"
|
|
79
|
+
|
|
80
|
+
`every` classifies your question first. If it needs a function's callers and callees, it
|
|
81
|
+
includes them. If it needs whole-program data flow, results are marked
|
|
82
|
+
`coverage: partial` — it will not pretend.
|
|
83
|
+
|
|
84
|
+
`--json` (automatic when piping) prints `{"results": [...], "meta": {...}}`; `meta` has
|
|
85
|
+
tokens, cost, requests and timing. Scores are cached in `.every/` so a re-run or a
|
|
86
|
+
refined question only pays for what's new.
|
|
87
|
+
|
|
88
|
+
## Languages
|
|
89
|
+
|
|
90
|
+
Function-level: Python, JavaScript, TypeScript/TSX, Go, Java, Rust, C#, Ruby, PHP.
|
|
91
|
+
Other source files (C/C++, Kotlin, Swift, Scala, shell, SQL, …) are judged as 150-line chunks.
|
|
92
|
+
|
|
93
|
+
## How it works
|
|
94
|
+
|
|
95
|
+
1. `tree-sitter` splits the repo into functions.
|
|
96
|
+
2. Each function goes into **its own** Jev question (never a shared list — positional
|
|
97
|
+
lookup degrades past ~16 items; embedding per question is flat to 128+).
|
|
98
|
+
3. ~110 questions per request, 4 requests in flight, ~$0.00001 per function
|
|
99
|
+
(~300 input tokens each, measured on `psf/requests` and `gin-gonic/gin`).
|
|
100
|
+
4. Scores are ranked; anything within ±0.10 of the threshold is asked again and averaged.
|
|
101
|
+
|
|
102
|
+
Measured against the bundled labelled set (`every --selftest`, 10 functions that swallow
|
|
103
|
+
errors, 10 that don't, live `jev-latest` on 2026-09-16): **recall 10/10, AUROC 1.000**;
|
|
104
|
+
positives scored 0.82–0.98, negatives 0.05–0.29 — except one deliberately borderline
|
|
105
|
+
negative (a retry loop that discards every failure but the last) at 0.68. The default
|
|
106
|
+
`--above 0.75` sits in that gap. This is 20 hand-written functions, not a benchmark; it
|
|
107
|
+
shows the model separates the two sets, not how it will score your question.
|
|
108
|
+
|
|
109
|
+
## Limits, honestly
|
|
110
|
+
|
|
111
|
+
- One function at a time. Cross-file questions get callers/callees; whole-program
|
|
112
|
+
data flow is out of scope for v1 and is labelled partial.
|
|
113
|
+
- The ranking is the reliable part; the absolute numbers move with the question. Broad
|
|
114
|
+
questions ("makes a network request") put most of an HTTP library above 0.75; narrow
|
|
115
|
+
ones put a handful. Read the top of the list and set `--above` from that.
|
|
116
|
+
- No explanations. Jev returns a probability, not a sentence.
|
|
117
|
+
|
|
118
|
+
MIT.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
every/__init__.py,sha256=5XJNnCZ1vIAGvHgkVIbPtc4h557b4Hd4XWHqMQ16QuY,92
|
|
2
|
+
every/cache.py,sha256=Y4N-pAe0Ns1eAiOf9ZQZkS-gW0igIuNBR0xaUHpLZIY,2015
|
|
3
|
+
every/classify.py,sha256=0RHRqcD9wuW7YVWK_T8IUy7Ngd5hwTPM9rQKRYl0e1g,938
|
|
4
|
+
every/cli.py,sha256=jZPmQPAxOX3AA45HMEB79ExfRjIxPYqI2A3FdKPt8O4,9666
|
|
5
|
+
every/discover.py,sha256=hJ4y5uF1EvYIF8VntX3w-dhH_eQ-5eijqqjmPhVM6Lo,3248
|
|
6
|
+
every/extract.py,sha256=HzQE6mqDjf73DkuhpPl5JRWd4_ZqWySv4csN8gHZCSE,5340
|
|
7
|
+
every/judge.py,sha256=TyKQFUyGx8T4n1i2g3r_B3E_NILAhdmXBus8G28eX5U,11436
|
|
8
|
+
every/neighborhood.py,sha256=46gOwvD6CNlhiBSwZVvqj3qwTaja6KuzDKOxQoMPnp4,1536
|
|
9
|
+
every/report.py,sha256=9tH_KJfD6q3Wfqhn9Ly_jx5Jk_dsZEF2JJMgb0DrQdc,2263
|
|
10
|
+
every/selftest.py,sha256=j2at4bsgXbZZPbuyI0mHqajDSZx0ky_R6DWAecH33mI,6196
|
|
11
|
+
every/symbols.py,sha256=pxagjUu5zr3lef6NpvBDKzcvKVIzfO0iJrrK84GzxzM,3971
|
|
12
|
+
every/units.py,sha256=xqndBVzrdCEWh0huoMJm3yW8QgrGtf56iB0h7DaefXM,1685
|
|
13
|
+
every_cli-0.1.0.dist-info/licenses/LICENSE,sha256=1eVii3MWensCEL7qkmbSK6O3hhuKltDxuuQcuyXRVRo,1065
|
|
14
|
+
every_cli-0.1.0.dist-info/METADATA,sha256=psG4MBSIAKBj_Rwlb8IR6f5yvy00_LZWVtMxwLvy7fM,5194
|
|
15
|
+
every_cli-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
16
|
+
every_cli-0.1.0.dist-info/entry_points.txt,sha256=EWdr-huP8bnfWPw5l7lfIM2P0Q25L5g-sfPL4NQEvpY,41
|
|
17
|
+
every_cli-0.1.0.dist-info/top_level.txt,sha256=znBtu6By7ozY5pN0ZQu1aMn-nWbXJb91Gu2yzAAF2UM,6
|
|
18
|
+
every_cli-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 soufiane
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
every
|