trailmark
Parse source code into a queryable graph of functions, classes, calls, and semantic annotations
Decision gist · record as of 2026-08-14
Yes, if you need multi-language code-structure analysis for security or code-review workflows. The package is actively maintained, has no known vulnerabilities, and covers multiple languages. The Python 3.12 requirement and early version number (0.5.0) mean it is not yet universally deployable, but the low install friction and permissive license make it a reasonable choice for teams already on modern Python. Verify performance and accuracy for your specific codebase before relying on it for critical security decisions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.12 or later; tree-sitter language packs must be installed for each language you parse.
- Low install friction with a pure-wheel distribution.
- Active maintenance (last commit 2026-07-28) and recent releases.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
last release 2026-07-17 (28 days) · last repo commit 2026-07-28 · 465 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 77,202 downloads/mo, #14,549 on PyPI
Alternatives
Verify before relying
pip install trailmark
from trailmark import parse_directory
graph = parse_directory('/path/to/code', language='python')
engine = graph.query_engine()
callers = engine.callers_of('module:function')- Number of supported languages and their specific coverage beyond what the description excerpt lists.
- Performance characteristics and scalability limits for large codebases.
- Whether the package is production-ready or still in active research/development phase.
- Accuracy and coverage of cross-file call resolution and type inference across all supported languages.
What it is and what it does
Trailmark converts source code into a queryable directed graph of semantic entities—functions, classes, methods, calls, and annotations—across multiple programming languages. It uses tree-sitter for language-agnostic AST parsing and rustworkx for graph storage and traversal, extracting nodes (functions, classes, structs, etc.), edges (calls, inheritance, imports), and metadata (type annotations, cyclomatic complexity, exception types, docstrings). The package operates in three phases: parse (walk directories and extract code structure), index (load into a rustworkx graph with bidirectional mappings), and query (provide a high-level API for graph traversal and analysis).
The QueryEngine exposes methods to find callers, callees, transitive reachability, call paths between functions, complexity hotspots, entrypoint paths, and attack surface. It also supports semantic annotations (adding custom metadata to nodes), structural diffs between graphs, and integration with SARIF and weAudit findings. This makes it useful for security analysis, code review, impact assessment, and identifying gaps between code assumptions and test coverage.
Use it for
- Map call chains from user-controlled entrypoints to sensitive functions for security auditing.
- Identify functions with high cyclomatic complexity and trace which code paths reach them.
- Analyze cross-file dependencies and detect circular imports or unexpected coupling.
- Augment static-analysis findings (SARIF, weAudit) with transitive reachability context.
- Generate attack-surface reports showing which functions are reachable from external inputs.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need multi-language code-structure analysis for security or code-review workflows.
The package is actively maintained, has no known vulnerabilities, and covers multiple languages. The Python 3.12 requirement and early version number (0.5.0) mean it is not yet universally deployable, but the low install friction and permissive license make it a reasonable choice for teams already on modern Python. Verify performance and accuracy for your specific codebase before relying on it for critical security decisions.
Install
trailmark on PyPI
Before you install
Low install friction with a pure-wheel distribution. Active maintenance (last commit 2026-07-28) and recent releases. Requires Python 3.12+, which is current but not yet universal in production environments.
Requires Python 3.12 or later; tree-sitter language packs must be installed for each language you parse.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install trailmark
from trailmark import parse_directory
graph = parse_directory('/path/to/code', language='python')
engine = graph.query_engine()
callers = engine.callers_of('module:function')
Verify before relying
- Number of supported languages and their specific coverage beyond what the description excerpt lists.
- Performance characteristics and scalability limits for large codebases.
- Whether the package is production-ready or still in active research/development phase.
- Accuracy and coverage of cross-file call resolution and type inference across all supported languages.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.12 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesrustworkxtree-sitter-language-packtree-sitter-sqltree-sitter |
| Maintenance | Actively maintained 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,202 / month, #14,549 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: trailmark-0.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “code graph parsing”
- trailmarkParses source code into a queryable graph of functions, classes,…
- pydot-ngpydot-ng provides a Python interface to Graphviz's Dot language,…
- import-linterImport Linter enforces architectural constraints on Python module…
Give your agent the search over MCP, or paste the wish link into any chat.
More Security packages
Provides Python bindings to the FreeDesktop.org Secret Service API for securely storing and retrieving passwords and secrets through GNOME Keyring, KWallet, or KeePassXC.
MSAL for Python handles OAuth2 and OpenID Connect authentication with Microsoft identity services, managing token acquisition, caching, and refresh for applications integrating with Microsoft Entra ID, Microsoft Accounts, and Azure AD B2C.
joserfc implements JOSE standards (JWS, JWE, JWK, JWT, and related RFCs) for signing, encrypting, and managing JSON-based cryptographic tokens in Python.
Authlib provides a complete implementation of OAuth 1.0, OAuth 2.0, and OpenID Connect 1.0 for building both authentication clients and servers, with built-in support for JWS, JWK, JWA, and JWT standards.
Provides low-level CFFI bindings to the official Argon2 password hashing algorithm for use by libraries and applications that need direct access to Argon2 without higher-level abstractions.
ADAL for Python authenticates applications with Azure Active Directory to obtain tokens for accessing Azure AD-protected resources.
Install only if maintaining existing code that already depends on it, and plan a migration.
See also graphifyy · tree-sitter-haskell · code-review-graph · asttokens · beniget · tree-sitter-swift · tree-sitter-java · grep-ast · rustworkx · ast-grep-cli