explaingit

friehub/gensense

Analysis updated 2026-05-18

3TypeScriptAudience · developerComplexity · 3/5LicenseSetup · easy

TLDR

A semantic code analysis tool that reads a project's AST to catch deadlocks, leaked secrets, and low-quality AI-generated code that linters miss.

Mindmap

mindmap
  root((repo))
    What it does
      AST semantic analysis
      Deadlock detection
      Secret detection
    Tech stack
      Rust
      TypeScript
      YAML rules
    Use cases
      Pre-deploy scanning
      AI code quality checks
      CI integration
    Audience
      Developers
      Security teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Scan a codebase for deadlocks, leaked secrets, and placeholder code before deploying.

USE CASE 2

Catch low-quality AI-generated code patterns like always-true assertions.

USE CASE 3

Write custom YAML rules to enforce team-specific coding standards without recompiling.

What is it built with?

RustTypeScriptNode.jsYAML

How does it compare?

friehub/gensensearpitbhalla/ts-backendbrijeshmarch16/ai-interview
Stars333
LanguageTypeScriptTypeScriptTypeScript
Last pushed2022-06-09
MaintenanceDormant
Setup difficultyeasymoderatemoderate
Complexity3/53/53/5
Audiencedeveloperdeveloperpm founder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Full Rust library usage requires Cargo, the CLI installs easily via npm or npx.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

GenSense is a code analysis tool that looks deeper than most linters do. Regular linters mainly check code formatting and type rules. GenSense works at a higher level called the Abstract Syntax Tree, or AST, a structured representation of code that lets tools analyze meaning and logic rather than just spelling and grammar. The problems it catches include async code that could deadlock, where a function locks a resource and then waits on something else, causing the program to freeze, placeholder code left in accidentally such as todo! or unimplemented! calls that will crash in production, hardcoded secrets, API keys, or environment URLs committed to the repository, and patterns typical of AI-generated code that passes tests but fails in real use, such as assertions that are always true or error handlers that silently return a default value instead of reporting the problem. GenSense supports Rust and TypeScript/JavaScript, both stable, and Solidity in beta. You can run it as a command-line tool, use it from a Node.js program, or embed it as a Rust library. Custom rules can be written in YAML files, with no Rust knowledge or recompilation required. Results can be exported as JSON or SARIF, a standard format used by security and CI tools. A strict mode exits with an error code so automated pipelines can block a build when findings are detected. Findings can also be suppressed with an inline comment above a flagged line or through a project-level suppression file, and the tool includes commands for filtering by severity, listing the active rule catalog, and generating documentation for the rules in use. This would be useful to developers and teams who want to catch logic bugs, security oversights, or low-quality AI-generated code before it reaches production. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me run GenSense on my project and fix the critical severity findings first.
Prompt 2
Show me how to write a custom GenSense YAML rule that flags a specific code pattern.
Prompt 3
Explain how GenSense's semantic discovery pipeline analyzes async code for deadlocks.
Prompt 4
Walk me through adding GenSense to a CI workflow in strict mode.

Frequently asked questions

What is gensense?

A semantic code analysis tool that reads a project's AST to catch deadlocks, leaked secrets, and low-quality AI-generated code that linters miss.

What language is gensense written in?

Mainly TypeScript. The stack also includes Rust, TypeScript, Node.js.

What license does gensense use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is gensense to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is gensense for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.