explaingit

ng-galien/code-moniker

Analysis updated 2026-05-18

0RustAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A tool that parses source code into a queryable symbol graph, available as a CLI linter for architecture rules and as a PostgreSQL extension for SQL queries over code structure.

Mindmap

mindmap
  root((code-moniker))
    What it does
      Builds symbol graphs
      Stable identities per symbol
      Architecture linting
    Tech stack
      Rust
      pgrx
      tree-sitter
      PostgreSQL
    Use cases
      Enforce architecture rules
      SQL queries over code
    Audience
      Developers
      AI coding agents

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

Lint a codebase's architecture rules, like blocking domain code from importing infrastructure code

USE CASE 2

Query a codebase's symbol graph directly with SQL through the PostgreSQL extension

USE CASE 3

Give an AI coding agent structured, accurate knowledge of a codebase instead of raw text search

USE CASE 4

Inspect a file or directory's classes, functions, and their relationships from the command line

What is it built with?

Rustpgrxtree-sitterPostgreSQL

How does it compare?

ng-galien/code-moniker404-agent/codes-minerbakome-hub/bakome-crypto-quant-engine
Stars000
LanguageRustRustRust
Setup difficultymoderatemoderateeasy
Complexity3/53/53/5
Audiencedeveloperdeveloperdeveloper

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

How do you get it running?

Difficulty · moderate Time to first run · 30min

The CLI installs in minutes with cargo, but the PostgreSQL extension requires building with pgrx and a running Postgres instance.

Dual licensed under MIT or Apache 2.0 at your choice, both permissive licenses that allow free use, modification, and distribution including commercially.

In plain English

code-moniker is a tool that analyzes source code and builds a symbol graph, a structured map of every meaningful identifier in a codebase and how those identifiers relate to each other. Rather than treating code as plain text, where a search might match the wrong thing, it parses each file and produces a stable identity for every function, class, variable, and module. These identities are called monikers, URI-like paths that encode not just the name of a symbol but what kind of thing it is and where it lives in the project's folder structure. The tool works in two modes. A command-line interface lets you inspect symbols, filter them by type, and run a linter that enforces architecture rules, for example requiring that code in a domain folder never imports code from an infrastructure folder. These rules can run before a commit, after every file edit, or inside a continuous integration pipeline. The second mode is a PostgreSQL extension: it installs custom data types into a database so you can store and query the same symbol graph using SQL, which makes it easy to join symbol data with other project information. Supported languages include TypeScript, JavaScript, Rust, Java, Python, Go, C#, and SQL. The project itself is written in Rust and uses pgrx to build the database extension, along with tree-sitter for parsing source files. You would reach for code-moniker when text search is too imprecise, such as finding every class that implements a particular interface, checking whether a layered architecture is being respected, or building an AI coding agent that needs accurate, structured knowledge of a codebase rather than raw text. Rule expressions are written in a small DSL and configured in a .code-moniker.toml file that merges on top of built in defaults. The project is dual licensed under MIT or Apache 2.0, at the user's option.

Copy-paste prompts

Prompt 1
Help me install code-moniker and run it against my src/ directory for the first time.
Prompt 2
Write a .code-moniker.toml rule that stops domain code from depending on infrastructure code.
Prompt 3
Explain how code-moniker's moniker URIs encode a symbol's type and location.
Prompt 4
Show me how to query the code_graph PostgreSQL extension for classes implementing a specific interface.

Frequently asked questions

What is code-moniker?

A tool that parses source code into a queryable symbol graph, available as a CLI linter for architecture rules and as a PostgreSQL extension for SQL queries over code structure.

What language is code-moniker written in?

Mainly Rust. The stack also includes Rust, pgrx, tree-sitter.

What license does code-moniker use?

Dual licensed under MIT or Apache 2.0 at your choice, both permissive licenses that allow free use, modification, and distribution including commercially.

How hard is code-moniker to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is code-moniker for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.