shipwithjev

Catalog / Tools & apps

0366GitHub

jev-shell-history

Ranks existing zsh history entries for inline completion; accepting a suggestion does not execute it.

mrnugget/jev-shell-historyREADME ↗
# jev-shell-history

Fish-style autosuggestions for zsh, ranked by [Jev](https://typesafe.ai)
(TypeSafe). As you type, the plugin looks at your last 100 distinct history
entries and asks Jev which one you are most likely completing. The best match is
shown in grey after the cursor, with its score; press → (or `^E` / End) to
accept it.



```
% git st▌atus  [0.970]                        ← prefix mode: literal completion
% last 5 commits▌  ⇢ git log --oneline -5  [1.000]  ← replace mode: no entry starts with the input
```

(The demo runs against a fabricated history; regenerate it with
`demo/make-demo.sh`, which needs `vhs`, `ffmpeg` and `TYPESAFE_API_KEY`.)

## Install

Requirements: zsh 5.9+, Node 22+ (runs the TypeScript directly), a TypeSafe API
key.

```sh
git clone <this repo> ~/.zsh/jev-shell-history
cd ~/.zsh/jev-shell-history && npm install
```

In `~/.zshrc`:

```zsh
export TYPESAFE_API_KEY=...
source ~/.zsh/jev-shell-history/zsh/jev-shell-history.plugin.zsh
```

Suggestions are accepted by `forward-char`, `vi-forward-char`, `end-of-line`
and `vi-end-of-line` when the cursor is at the end of the line, so → and `^E`
work in both emacs and vi keymaps (in vi mode, bind `^E` to `end-of-line` if
you want it there). There is also a standalone widget, `jev-accept-suggestion`,
for a custom binding.

### Configuration

Set before sourcing the plugin:

| Variable            | Default | Meaning                                                             |
| ------------------- | ------- | ------------------------------------------------------------------- |
| `JEV_HISTORY_LIMIT` | `100`   | Recent distinct commands to consider                                |
| `JEV_MIN_CHARS`     | `2`     | Do nothing until this many characters are typed                     |
| `JEV_THR

Also filed under Tools & apps

  1. 0616

    Jevstiller: distill Jev calls into a local model

    A self-hosted proxy that trains a local model on Jev's answers. It served 72% of Banking77 locally at 15 ms, with a 2% audit and a bound on disagreement.

    tomerglick57 · Tools & apps · 15 ms local

  2. 0611

    Scruple: code checks for what linters miss

    Semantic-aware linting with System One models: rules you can state in a sentence, checked against your code by Jev.

    @nalexpeae · Tools & apps

  3. 0606

    Algolia-style Postgres search with a Jev reranker

    Typo tolerance, typeahead, barcodes and facet counts in plain Postgres SQL, plus an optional Jev step that asks one question per top-10 result.

    @alex_forman1 · Tools & apps

  4. 0604

    Virtual Closet: outfits from closet videos

    built a virtual closet & outfit generator from raw closet videos. classification + semantic search thanks to jev 🥰. clueless closet dreams finally coming to life

    @maitreemervana · Tools & apps