whatisgithub

What is hakana?

slackhq/hakana — explained in plain English

Analysis updated 2026-08-07 · repo last pushed 2026-08-06

108RustAudience · developerComplexity · 4/5ActiveSetup · hard

In one sentence

Hakana is a code quality tool by Slack for Hack codebases. It finds security bugs, logic errors, and dead code by deeply analyzing data types, complementing Hack's built-in typechecker for periodic thorough analysis.

Mindmap

mindmap
  root((repo))
    What it does
      Catches security vulnerabilities
      Finds dead code
      Spots logic bugs
      Type-aware migrations
    Tech stack
      Rust
      Hack language
      HHVM parser
    Use cases
      Secure code review
      Remove unused code
      Large codebase health
    Audience
      Hack engineering teams
      Large-scale codebases
    How it works
      Deep type inference
      Periodic analysis
      Language server integration

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

Flag insecure handling of user input before it ships to production.

USE CASE 2

Identify and remove dead files and methods no longer called anywhere in the codebase.

USE CASE 3

Run periodic deep analysis to keep large Hack codebases lean and maintainable.

USE CASE 4

Use type-aware migrations to safely restructure large amounts of interconnected code.

What is it built with?

RustHackHHVM

How does it compare?

slackhq/hakanapolarityinc/zenithxqnode/codex-helper
Stars108109110
LanguageRustRustRust
Last pushed2026-08-06
MaintenanceActive
Setup difficultyhardmoderateeasy
Complexity4/54/52/5
Audiencedeveloperdeveloperdeveloper

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

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires an existing Hack codebase and HHVM runtime environment, which is non-trivial to set up outside of companies already using Hack at scale.

The license is not specified in the available documentation, so terms of use are unknown.

So what is it?

Hakana is a code quality tool built by Slack for projects written in Hack, a programming language used heavily at Slack and Facebook. It runs alongside the standard Hack typechecker to catch deeper problems that the built-in tool misses, things like security vulnerabilities, logic bugs, and dead code that serves no purpose. At its core, the tool focuses on figuring out precise types for everything in your codebase. "Types" here mean understanding what kind of data each variable, function, and class works with. By reasoning carefully about these types, the tool can spot mismatches and risky patterns that might lead to runtime errors or security holes. It also enables type-aware migrations, meaning it can help you safely restructure large amounts of code while understanding how different pieces connect. Who benefits from this? Teams with substantial Hack codebases, think of a company like Slack itself, where engineers need automated help keeping millions of lines of code healthy. For example, if someone introduces a function that handles user input insecurely, this tool can flag it before it ships. If there are entire files or methods no longer called anywhere, the tool identifies them so they can be removed. This keeps large codebases lean and maintainable over time. One notable tradeoff: the tool is not designed for instant, real-time feedback as you type. Instead, it's meant for periodic analysis or on-save checks via its language server integration. This slower, more thorough approach allows for deeper analysis than a tool optimized for speed alone. It also borrows HHVM's parser, the core engine that reads Hack code, rather than building one from scratch, which keeps it closely aligned with how Hack actually works.

Copy-paste prompts

Prompt 1
Help me understand what code quality issues Hakana can catch in a Hack codebase that the standard Hack typechecker would miss, and how to interpret its analysis results.
Prompt 2
I have a large Hack codebase and want to find dead code. Walk me through how to run Hakana to identify unused files and methods that can be safely removed.
Prompt 3
Explain how Hakana uses type inference to detect security vulnerabilities in Hack code, and help me set up its language server integration for on-save checks.
Prompt 4
I need to do a type-aware migration across a large Hack codebase. How can I use Hakana to safely restructure interconnected code while understanding type relationships?

Frequently asked questions

What is hakana?

Hakana is a code quality tool by Slack for Hack codebases. It finds security bugs, logic errors, and dead code by deeply analyzing data types, complementing Hack's built-in typechecker for periodic thorough analysis.

What language is hakana written in?

Mainly Rust. The stack also includes Rust, Hack, HHVM.

Is hakana actively maintained?

Active — commit in last 30 days (last push 2026-08-06).

What license does hakana use?

The license is not specified in the available documentation, so terms of use are unknown.

How hard is hakana to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is hakana for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.