Skip to content

Releases: ramdhavepreetam/NervaPack

NervaPack v0.7.6 — visualize --scope/--hops

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 05 Aug 17:19

Focused subgraph views: visualize --scope

Navigate a large estate by program instead of trying to render the whole graph.

Added

  • nervapack visualize --scope <target> [--hops N] renders just the N-hop neighborhood around a matched program, copybook, file, or node.
    • Follows both callers and callees, so you see what a program calls and who calls it.
    • Default depth is 2 hops.
    • Scoped views are small, so physics stays enabled for a proper interactive layout.
    • Output defaults to .nervapack/scope_<target>.html — never clobbers the full-graph file.
# PAYROLL, its callers, and its callees (2 hops)
nervapack visualize --scope PAYROLL --hops 2

# Immediate neighbors of a copybook
nervapack visualize --scope EMPREC --hops 1

Upgrade

pip install -U nervapack   # 0.7.6

Docs: https://github.com/ramdhavepreetam/NervaPack/blob/master/docs/user-guide/commands/visualize.md
PyPI: https://pypi.org/project/nervapack/0.7.6/

NervaPack v0.7.5 — large-graph visualize fix

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 05 Aug 17:11

visualize now handles large graphs

Fixes visualize hanging on large knowledge graphs (e.g. a 21k-node / 400k-edge IBM i estate).

Fixed

  • Interactive force-directed physics never stabilises at that scale and pins the browser CPU indefinitely. visualize now:
    • Disables physics above ~2,000 nodes — renders a static layout instantly instead of simulating live.
    • Caps the view to the most-connected core (default top ~3,000 nodes / ~8,000 edges), keeping structurally important hubs (heavily-called programs, shared copybooks) and reporting how much of the total was shown.
  • The full graph is untouched in .nervapack/graph.graphml. Use nervapack explore <target> or nervapack query / MCP tools to navigate the whole graph at scale.

Internal

  • Test suite is now hermetic with respect to NERVAPACK_EBCDIC.

Upgrade

pip install -U nervapack   # 0.7.5

PyPI: https://pypi.org/project/nervapack/0.7.5/

NervaPack v0.7.4 — cp273 EBCDIC auto-detection

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 05 Aug 16:44

cp273 (Germany/Austria) EBCDIC auto-detection

Extends v0.7.2/0.7.3 EBCDIC support so German mainframe COBOL/RPG members are handled automatically.

Changed

  • Auto-detection candidate set is now cp037, cp500, cp1140, cp273.
  • Code-page selection is smarter: it rewards coherent runs of letters/digits and penalises stray symbols wedged inside words. A German member with umlauts (ä ö ü Ä Ö Ü ß) is detected as cp273, a member using [ ] | ! operators as cp500, and US members stay cp037 — automatically, even on codebases that do not set NERVAPACK_EBCDIC.
  • Genuinely indistinguishable plain source still falls back to cp037. NERVAPACK_EBCDIC=<codec> still forces a specific page (recommended for a single-page shop).

Upgrade

pip install -U nervapack   # 0.7.4
# single-page shop: force it, e.g.
NERVAPACK_EBCDIC=cp273 nervapack ingest /path/to/members

Docs: https://github.com/ramdhavepreetam/NervaPack/blob/master/docs/user-guide/concepts/ibm-i-languages.md#ebcdic-encoded-members
PyPI: https://pypi.org/project/nervapack/0.7.4/

NervaPack v0.7.3 — multi-codepage EBCDIC detection

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 05 Aug 16:30

Smarter EBCDIC auto-detection

Follow-up to v0.7.2's EBCDIC support: auto-detection now tries multiple code pages instead of always assuming cp037.

Changed

  • When EBCDIC is detected, NervaPack decodes with cp037, cp500, and cp1140 and keeps the result that looks most like program source (scored by letters/digits/punctuation).
  • This correctly handles members using the [ ] | ! operators, which are ASCII in cp500 but non-ASCII symbols in cp037.
  • The pages are identical for A-Z/0-9/common punctuation, so plain source ties and falls back to cp037 — the default is unchanged.
  • NERVAPACK_EBCDIC=<codec> still forces a specific page (e.g. cp273), and off disables EBCDIC.

Upgrade

pip install -U nervapack   # 0.7.3

Docs: https://github.com/ramdhavepreetam/NervaPack/blob/master/docs/user-guide/concepts/ibm-i-languages.md#ebcdic-encoded-members
PyPI: https://pypi.org/project/nervapack/0.7.3/

NervaPack v0.7.2 — EBCDIC support for mainframe COBOL/RPG

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 05 Aug 16:25

EBCDIC support for mainframe COBOL/RPG

Real IBM i / z/OS source members are usually stored in EBCDIC, not ASCII/UTF-8 — so before this release they decoded to garbage. NervaPack now auto-detects EBCDIC and decodes it with the correct code page before parsing.

Added

  • Automatic EBCDIC detection & decoding. Uses a robust EBCDIC-space (0x40) vs. ASCII-space (0x20) signal; EBCDIC line endings (0x25, NEL 0x15) are normalized to \n. Default code page is cp037 (US/Canada).
  • NERVAPACK_EBCDIC override:
    • auto (default) — heuristic detection
    • cp037 / cp500 / cp1140 / cp273 / … — force a code page
    • off — always read as UTF-8
    • Unknown/mismatched codecs fall back to UTF-8 rather than failing the ingest.
  • New module nervapack.parser.encoding.

Upgrade

pip install -U nervapack        # 0.7.2
# or, for a known-EBCDIC repo:
NERVAPACK_EBCDIC=cp037 nervapack ingest /path/to/members

Docs: https://github.com/ramdhavepreetam/NervaPack/blob/master/docs/user-guide/concepts/ibm-i-languages.md#ebcdic-encoded-members
PyPI: https://pypi.org/project/nervapack/0.7.2/

NervaPack v0.7.1 — GraphML control-char fix

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 05 Aug 16:17

Patch release — GraphML control-character fix

Fixes a crash when ingesting legacy fixed-form COBOL/RPG source and copybooks.

Fixed

Fixed-form source and copybooks routinely contain NUL bytes, form-feed page-ejects (0x0C), and other C0 control characters. These flowed into entity data and made nervapack ingest fail at graph-write time with:

All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

Now:

  • Entity names and content are sanitized of XML-illegal control characters (tab, LF, and CR are preserved).
  • GraphBuilder.save_graph scrubs all node/edge string attributes before writing GraphML — a safety net that protects every language, not just IBM i.

Ingest of legacy COBOL/RPG now completes and the graph round-trips as valid GraphML.

Upgrade

pip install -U nervapack   # 0.7.1

PyPI: https://pypi.org/project/nervapack/0.7.1/
Full changelog: https://github.com/ramdhavepreetam/NervaPack/blob/master/docs/changelog.md

NervaPack v0.7.0 — RPG/CL/COBOL (IBM i) support

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 05 Aug 15:34

RPG, CL, and COBOL support for IBM i / mainframe codebases

NervaPack v0.7.0 makes the IBM i / mainframe stack first-class in the knowledge graph. Previously, RPG, CL, and COBOL files were skipped silently — they have no tree-sitter grammar on PyPI, so they never reached the parser. This release adds a dedicated pure-Python extractor path for them, alongside the existing tree-sitter path.

Bundled and always on — no extra to install, no grammar to compile. Works offline and in air-gapped / corporate networks, consistent with NervaPack's privacy-first design.

Extensions indexed

Language Extensions
RPG .rpgle, .rpg, .sqlrpgle
CL .clle, .clp, .cl
COBOL .cbl, .cob, .cobol, .cpy

Both fixed-form and free-form source are handled.

What you get

  • Symbol nodes — RPG procedures, CL programs/subroutines, COBOL programs, divisions, sections, and paragraphs.
  • Typed dependency edges — so the call graph and copybook-usage graph are separately queryable:
    • CALL / CALLP / CALLPRCCALLS
    • /copy / COPYCOPIES
    • CL DCLF FILE(...)DECLARES_FILE
  • Cross-file and cross-language resolution — an RPG program that calls a COBOL program produces a real CALLS edge between them. Each edge carries the source line.
  • Short-name linking — IBM i names are frequently ≤ 4 chars (ORD, TAX, AR100); these now link correctly (the old length floor no longer drops them).
  • Copybook resolution — a bare copybook (.cpy with only data items) becomes a module node so COPY MEMBER resolves to it.
  • No fabricated edges — a CALL/DCLF to a target that isn't in the indexed tree produces no edge.

Example

CALLS   RUN (CL)   → ORD (RPG)    — cross-language, 3-char names
CALLS   ORD (RPG)  → TAX (COBOL)  — cross-language
COPIES  TAX (COBOL)→ EMPREC.cpy   — copybook dependency

This turns a sprawling green-screen program inventory into a navigable, connected map — for onboarding, "what breaks if I change this," and feeding an LLM during modernization at a fraction of the tokens of raw source.

Getting started

pip install -U nervapack
nervapack ingest /path/to/ibmi/source

Full details: IBM i Languages documentation.

Implementation notes

  • New module nervapack.parser.regex_extractors (extract_rpg / extract_cl / extract_cobol).
  • LanguageConfig gains an optional regex_extractor; grammar_loader is now Optional. ASTParser.parse_file branches to the extractor when one is registered — no CLI changes.
  • Graph builder emits the typed edges from import metadata and relaxes the name-length floor for regex-parsed entities; a generic reference never overwrites a typed edge.
  • Fully tested: tests/test_ibmi_parsers.py (23 cases); full suite green; docs build clean under --strict.

Out of scope (candidates for future work)

Data-structure / field-level modeling, dynamic (variable) calls, embedded-SQL parsing inside .sqlrpgle, and tree-sitter grammar vendoring.


Full changelog: https://github.com/ramdhavepreetam/NervaPack/blob/master/docs/changelog.md
PyPI: https://pypi.org/project/nervapack/0.7.0/

NervaPack v0.3.0

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 08 Jun 05:23

What's new in v0.3.0

MCP Server — native integration with Claude Code and any MCP-compatible tool

NervaPack now ships a built-in MCP server (nervapack-mcp) exposing three tools:

Tool Description
query_codebase(prompt, max_hops?) Vector search → K-Hop BFS → focused Markdown context + token savings summary
graph_status() Node/edge breakdown by type, language distribution, unsynced file detection
list_entities(entity_type?, file_path?) Browse all indexed classes, functions, imports, markdown docs

Setup (30 seconds):

pip install "nervapack[mcp]"
nervapack ingest .

Add .mcp.json to your project root:

{
  "mcpServers": {
    "nervapack": {
      "command": "nervapack-mcp"
    }
  }
}

Reload Claude Code — NervaPack's tools appear automatically. Every answer about the codebase now uses surgical graph context instead of whole-file dumps.

Install

# Homebrew
brew tap ramdhavepreetam/nervapack && brew install nervapack

# pipx
pipx install nervapack

# pip
pip install nervapack==0.3.0
pip install "nervapack[mcp]"        # MCP server
pip install "nervapack[metrics]"    # exact token counts via tiktoken
pip install "nervapack[all-languages]"  # Go, Rust, Java, C, C++, Ruby, C#

NervaPack v0.2.0

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 08 Jun 01:24

What's new in v0.2.0

nervapack visualize

Interactive HTML knowledge graph rendered with pyvis — nodes colored by type (file, function, class, import, markdown), edges labeled DEFINES/EXPLAINS, hover tooltips with code previews, spring-force physics layout. Opens in your browser automatically.

Token Efficiency Dashboard

Every nervapack query now prints a before/after token comparison panel: NervaPack's focused subgraph vs. what naive RAG would send (full raw files). Shows token count, % reduction, and cost savings at GPT-4o and Claude Sonnet rates. Install nervapack[metrics] for exact counts via tiktoken.

Multi-language Support (16 extensions, 9 languages)

Declarative language registry — adding a new language is one entry, zero core logic changes.

Extra Languages
bundled Python, JavaScript, JSX, TypeScript, TSX
nervapack[go] Go
nervapack[rust] Rust
nervapack[java] Java
nervapack[c] C / headers
nervapack[cpp] C++, headers
nervapack[ruby] Ruby
nervapack[csharp] C#
nervapack[all-languages] everything above

Install

```bash

Homebrew

brew tap ramdhavepreetam/nervapack && brew install nervapack

pipx

pipx install nervapack

pip

pip install nervapack==0.2.0
```

NervaPack v0.1.0

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 07 Jun 23:26

NervaPack v0.1.0 — Initial Release

Privacy-first, offline knowledge graph for developers. Runs 100% on your machine using tree-sitter AST parsing, ChromaDB, NetworkX, and a local Ollama model.

Install

Homebrew (Mac/Linux)
```bash
brew tap ramdhavepreetam/nervapack
brew install nervapack
```

pipx
```bash
pipx install nervapack
```

pip
```bash
pip install nervapack
```

What's included

  • nervapack ingest — build a full AST + vector knowledge graph from any git repo
  • nervapack query — retrieve token-efficient context via K-Hop BFS
  • nervapack sync — incremental per-file update using GitPython diffs
  • nervapack status — graph health and out-of-sync file report

Supported languages

Python, JavaScript, TypeScript, TSX

Requirements

  • Python 3.10+
  • Ollama running locally with any instruction-following model (default: llama3)