Skip to content

docs: use Python/Node.js bindings in SDK integration examples#225

Merged
aphoristicartist merged 1 commit intomainfrom
docs/sdk-binding-examples
Mar 17, 2026
Merged

docs: use Python/Node.js bindings in SDK integration examples#225
aphoristicartist merged 1 commit intomainfrom
docs/sdk-binding-examples

Conversation

@aphoristicartist
Copy link
Contributor

Summary

All SDK integration examples were using subprocess.run() or CLI commands instead of the actual Infiniloom Python (pip install infiniloom) and Node.js (npm install infiniloom-node) bindings. Fixed to use native bindings for better DX and performance.

README.md

Before:

import subprocess
context = subprocess.run(["infiniloom", "pack", ".", "-f", "xml", ...], capture_output=True, text=True).stdout

After:

import infiniloom
context = infiniloom.pack(".", format="xml", model="claude", compression="balanced")

Same fix applied to LangChain example: CLI → infiniloom.embed() with JSON parsing.

Claude Code guide — new section

"Using the Python Binding with Claude SDK" with working examples for infiniloom.pack(), build_index(), analyze_impact(), get_diff_context(), embed().

Codex guide — new section

"Using the Node.js Binding with Vercel AI SDK / Mastra" with:

  • Vercel AI SDK streaming example using pack() from infiniloom-node
  • Mastra agent tool example using createTool with infiniloom-node
  • Examples for pack, scan, embed, buildIndex, analyzeImpact, getDiffContext

Test plan

  • Python examples use functions that exist in infiniloom package
  • Node.js examples use functions that exist in infiniloom-node package
  • Install commands are correct (pip install infiniloom anthropic, npm install infiniloom-node ai @ai-sdk/openai)

🤖 Generated with Claude Code

Replace subprocess/CLI calls with actual Infiniloom bindings in SDK
examples throughout the docs.

README.md:
- Anthropic Claude SDK: subprocess.run → infiniloom.pack()
- LangChain/LlamaIndex: CLI → infiniloom.embed() with JSON parsing

docs/guides/claude-code-integration.md:
- New "Using the Python Binding with Claude SDK" section
- Examples: infiniloom.pack(), build_index(), analyze_impact(),
  get_diff_context(), embed()

docs/guides/codex-integration.md:
- New "Using the Node.js Binding with Vercel AI SDK / Mastra" section
- Vercel AI SDK streaming example with pack() binding
- Mastra agent tool example using infiniloom-node createTool
- Examples: pack(), scan(), embed(), buildIndex(), analyzeImpact(),
  getDiffContext()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Contributor

Benchmark Results

                        time:   [21.374 µs 21.393 µs 21.413 µs]
                        thrpt:  [467.02 Kelem/s 467.44 Kelem/s 467.85 Kelem/s]
                        time:   [85.760 µs 85.884 µs 86.043 µs]
                        thrpt:  [116.22 Kelem/s 116.44 Kelem/s 116.60 Kelem/s]
                        time:   [37.299 µs 37.318 µs 37.340 µs]
                        thrpt:  [1.3390 Melem/s 1.3398 Melem/s 1.3405 Melem/s]
                        time:   [109.68 µs 109.82 µs 109.96 µs]
                        thrpt:  [454.73 Kelem/s 455.30 Kelem/s 455.87 Kelem/s]
                        time:   [103.09 µs 103.16 µs 103.23 µs]
                        thrpt:  [1.9373 Melem/s 1.9387 Melem/s 1.9400 Melem/s]
                        time:   [210.30 µs 211.10 µs 212.19 µs]
                        thrpt:  [942.54 Kelem/s 947.43 Kelem/s 951.03 Kelem/s]
file_reading/sequential time:   [227.56 µs 227.84 µs 228.13 µs]
                        time:   [99.780 µs 100.49 µs 101.47 µs]
                        time:   [95.918 µs 96.226 µs 96.540 µs]
                        time:   [100.54 µs 100.90 µs 101.26 µs]
                        time:   [130.52 µs 132.97 µs 136.58 µs]
                        time:   [621.57 ps 621.70 ps 621.88 ps]
                        time:   [621.60 ps 621.74 ps 621.94 ps]
                        time:   [621.81 ps 622.06 ps 622.37 ps]

Benchmarks run on Ubuntu runner. See artifacts for full results.

@aphoristicartist aphoristicartist merged commit 323778b into main Mar 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant