Skip to content

v0.3.0

Choose a tag to compare

@uehaj uehaj released this 23 Sep 15:38
· 187 commits to main since this release

(first npm release since 0.2.0: also carries 0.2.2, which was tagged but never published)

Added

  • -z / --null-data: the unit of judgement becomes a NUL-terminated record instead of a line, so a
    record may span several lines. Matching records are printed NUL-terminated too, as in grep -z; file
    names and counts stay on newlines. -n numbers records, -A/-B/-C count records, --chunk counts
    records. Pairs directly with git log -z, find -print0 and xargs -0, removing the two tr calls
    previously needed to flatten a record onto one line (#6).
  • Other endpoints: SEMGREP_URL and SEMGREP_MODEL point semgrep at any TypeSafe-compatible /v1/systemone
    (OpenRouter, Vercel AI Gateway, a local server). Based on #4 by @nedzen.
  • The summary line shows cost: the endpoint's usage.cost when reported, else for TypeSafe an estimate marked ~.

Changed

  • The API key is now SEMGREP_API_KEY; TYPESAFE_API_KEY still works when it is not set. The key is sent to
    SEMGREP_URL as is; with SEMGREP_URL set and no key, no Authorization header is sent.
  • Breaking: SEMGREP_ENV is gone. ./.env then ~/.config/semgrep/.env are still read.
  • Network errors name the endpoint's host instead of typesafe.