Keel

mcp
Security Audit
Fail
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 6 GitHub stars
Code Fail
  • rm -rf — Recursive force deletion command in Scripts/verify-generated.sh
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Understand an iOS or Android codebase you did not write, from the terminal or as MCP tools for coding agents. Architecture, dependency graphs, where a type lives and what a change reaches, with the file and line behind every claim. Swift, SwiftUI, Kotlin, Compose. Works offline; AI optional.

README.md

⚓ Keel

Understand an iOS or Android codebase you did not write — from the terminal.

CI
Swift
Platform
Reads
License

No dependencies · Works offline · AI optional, never automatic


Install

brew install GRimAce11/tap/keel

Try it

Point Keel at any iOS or Android project. It does not need to compile, and nothing
leaves your machine.

cd SomeApp

keel explore     # walk through it, without knowing which flag to type
keel inspect     # what it is made of, and the architecture that implies
keel check       # where it breaks its own rules
keel document    # write all of that down as PROJECT.md
keel context     # the same, cut to one screen for a coding agent
keel inspect --graph and keel check on a project with a feature cycle

Why

Somebody hands you an iOS or Android codebase you have never seen. Keel reads it and
tells you what it is made of — which features depend on which, where the screens
get their data, which boundaries the project keeps and where it breaks its own
rules — with the file and line behind every claim.

Every finding says what it rests on. A type conforming to SwiftUI's View
is a view from the code; a type called ArticleRepository is a repository
because somebody named it one. Keel never reports the second as the first, and
where the evidence settles nothing it says Undetermined rather than offering
the likeliest guess.

That is the part an assistant cannot do: the same question asked twice gets the
same answer, with the same lines behind it.

It also creates projects — keel new writes only the components you ask for,
so a project without networking has no APIClient.swift to delete. But the
reason to reach for Keel is the codebase you have already got.

Commands

Command What it does
keel explore Walk through a project's architecture interactively
keel inspect Structure, dependencies, relationships, architecture
keel context A one-screen brief for a coding agent to read before it edits
keel where Where a type is declared, what it is, and what uses it
keel impact What a change to a type or file can reach
keel mcp Serve context, where, impact and check to a coding agent as MCP tools
keel check Validate against the project's real architecture boundaries
keel diff What this branch changed architecturally, and what it made worse
keel document Write PROJECT.md, diagrams included
keel doctor Diagnose the toolchain and project
keel new Create a new iOS project (iOS only)
keel add feature Generate a feature into an existing iOS project
keel ai Choose which local AI agent Keel may use

Each reads the working directory unless you point it elsewhere: a path as the
first argument, or --path for where, impact and mcp, whose first argument
is the question. --help on any of them.

With a coding agent

An agent starting on an iOS or Android project spends its first tokens finding out what
the project is, and most of the rest searching for types and reading the files
they are in. Keel already knows the answers, with the file and line behind
each, and gives them in a fraction of the space:

Question Keel Without it
What is this project, and what are its rules? keel context 6.1 KB 65 KB PROJECT.md, or 2.5 MB of source
Where is APIClient, and what uses it? keel where APIClient 368 bytes 13.8 KB to read the file
What will changing it reach? keel impact APIClient 1.4 KB 484 KB to read the 33 files that use it

Measured on a 281-file, 61,556-line SwiftUI app.

As MCP tools, so the agent calls them directly and the project stays in
memory between questions:

claude mcp add keel -- keel mcp

keel mcp offers keel_context, keel_where, keel_impact and keel_check.
It rescans only when a source file or the Xcode or Gradle project changes, so the first
question takes a couple of seconds and the rest take as long as the answer.

Or as commands, with one line in CLAUDE.md or AGENTS.md:

Before changing this project, run `keel context` and follow its rules.
Use `keel where <Type>` instead of searching, and `keel impact <Type>` before
changing a type other code uses.

Either way the agent gets what static analysis found and nothing more: every
tool is read-only, and Keel does not run the agent or send it anything. The
agent asks; Keel answers from the files.

Android

Point Keel at an Android project and it reads Kotlin and Gradle instead of
Swift and Xcode. Every reading command works the same: inspect, context,
where, impact, check, diff, document, explore and the MCP tools.

cd MyApp/android     # the folder with settings.gradle(.kts), or the one above it
keel context
keel where CartViewModel
keel impact CartRepository

What it reads, with no Gradle run and no JVM:

Modules settings.gradle(.kts), each module's type, application id and min SDK
Libraries The version catalog, counting only what a build file actually uses
Code Kotlin, parsed with tree-sitter: classes, interfaces, objects, constructor injection, @Composable screens
Layout Folders under the package root are modules; feature/… or top-level feature folders are features
Roles ViewModel, @HiltViewModel, @Composable, Activities and Fragments, @Dao, Hilt @Modules

The findings use Android's words: Compose rather than SwiftUI, StateFlow and
LiveData, coroutines, Room, interfaces, Hilt modules as the composition root.
Rules that only mean something in Swift — @MainActor, @Observable, shared
schemes — are not run on Kotlin; the structural ones are: cycles, layer
inversions, shared code depending on a feature, repositories without an
interface.

A folder with both, as a monorepo with ios/ and android/, is read as
iOS, and Keel says the Android project is there too. Choose with --platform android on any command, or platform on the MCP tools.

In CI

- run: keel diff origin/main..HEAD  # fails when this branch made it worse
- run: keel document --check        # fails when PROJECT.md has drifted

On a codebase you inherited, check --strict fails on everything already
there. Two ways round that, and you can use both:

keel check --write-baseline   # accept what is there, report only what is new
keel diff origin/main..HEAD   # fail only on what this branch made worse

Adding a feature is a change; adding a cycle is a regression.

Add --github to either and the findings land on the changed lines of the pull
request instead of only in the log.

None of them touches the network, needs an account, or invokes an agent.

[!NOTE]
keel diff needs history. CI checkouts default to a shallow clone — set
fetch-depth: 0 on actions/checkout, or it will tell you to.

AI is optional

Keel works with no agent installed, no account, no API key and no network.
Every command above is deterministic. If you never read this section, nothing
about Keel changes.

If you do want an agent's reading of the facts, you permit one explicitly — and
what leaves the machine is the analysis, not your code:

keel ai use claude            # permit one — this does not run it
keel document --show-prompt   # exactly what would be sent, sending nothing
keel document --ai            # add an interpretation to PROJECT.md

Privacy

Network access None, ever, except an agent you selected running under --ai
Telemetry None
Accounts or keys None. Keel has no account and reads no API key
Core commands All of them are fully offline: inspect, context, where, impact, check, diff, document, doctor, new, add
keel mcp Talks only to the agent that started it, over standard input and output. No port, no network

More

REFERENCE.md — how each verdict is reached, what check
calls an error and what it only suspects, what context, where, impact and
the MCP tools return, what an agent is allowed to add, and
what Keel cannot tell you.

CONTRIBUTING.md — including the few things Keel refuses on
principle, so nobody builds something that was never going to land.
SECURITY.md covers reporting a vulnerability.

[!NOTE]
Early development. Every command works. The API is not settled — flags and
output may change, and rules may be added to keel check.

License

MIT — the code Keel generates is yours, with no attribution required.


Built by Chethan Nayak

Reviews (0)

No results found