API Traffic Monitoring
Record and analyse API calls with detailed metrics — endpoint, method, response time, status code and headers — stored entirely in memory or on your filesystem.
July 2026 — the entire x2y suite is now free. Code Leak Detector moves to a one-time $29 on 1 Sep.
View productsProfessional SDK for API Monitoring & Code Refactoring
A comprehensive solution for modern software development, combining powerful API monitoring capabilities with intelligent code refactoring. Designed for developers who want to improve their API integration practices and code quality through automated analysis and suggestions.
Free & open source — MIT licence. No account, no telemetry, no cloud dependency.
Overview
The x2y SDK is a comprehensive solution for modern software development, combining powerful API monitoring capabilities with intelligent code refactoring. It is designed for developers who want to improve their API integration practices and code quality through automated analysis and suggestions.
With support for both CommonJS and ES6 modules, the x2y SDK integrates seamlessly into any JavaScript or TypeScript project, providing real-time insights into API behaviour and actionable code improvement recommendations — all processed locally, with zero telemetry.
| Package | x2y-dev-tools-sdk |
|---|---|
| Version | v1.0.0 |
| Runtime | Node.js 18+ |
| Modules | ES6 + CommonJS |
| Types | TypeScript definitions included |
| Licence | MIT |
| Telemetry | 0 bytes |
Key features
Record and analyse API calls with detailed metrics — endpoint, method, response time, status code and headers — stored entirely in memory or on your filesystem.
Anticipate API failures before they happen. The SDK analyses recorded traffic patterns to surface risk levels, rate-limit proximity and suggested fallback endpoints.
Get intelligent, line-level suggestions to improve code quality — idiomatic patterns, performance fixes and modern async conversions — for strings or entire files.
Identify and fix performance bottlenecks like DOM queries inside loops, repeated allocations and unbatched operations. Suggestions include the corrected code, not just a warning.
Modernise legacy promise chains into clean async/await syntax. The SDK detects nested .then() patterns and produces the equivalent await-based rewrite.
Monitor x-ratelimit-remaining and related headers across every recorded call. Predict when a limit will be reached and receive proactive warnings before requests start failing.
Installation
npm install x2y-dev-tools-sdknpm install -g x2y-dev-tools-sdkgit clone https://github.com/x2yDevs/x2y-sdk.git cd x2y-sdk npm install npm run build
Import & setup
The SDK ships with both module formats and bundled TypeScript definitions. Import whichever style your project uses and initialise with a single constructor call.
Basic usage
API monitoring
Build a dataset by recording API traffic data for predictions. Each call captures endpoint, method, timestamp, response time, status code and headers — the raw material the prediction engine learns from.
The SDK analyses recorded traffic to predict potential problems — risk level, rate-limit proximity, suggested fallback endpoints and a confidence score — before the next call is made.
Customise SDK behaviour with two configuration objects — one for API monitoring, one for refactoring. Every value has a sensible default; override only what you need.
Code refactoring
Analyse any code snippet and receive structured improvement suggestions — type, description, original code, suggested replacement, line number and severity.
Point the SDK at a JavaScript or TypeScript file on disk and receive a full list of suggestions across the entire source — ready to feed into a review workflow or CI gate.
Identify performance issues like DOM queries inside loops. The SDK suggests hoisting the query outside the iteration and provides the rewritten code block.
Get recommendations for modern JavaScript and TypeScript idioms — replacing imperative loops with declarative array methods, eliminating var, and adopting optional chaining where appropriate.
Modernise legacy promise chains into clean async/await syntax. The SDK detects nested .then() structures and emits the equivalent await-based control flow.
Integration
Monkey-patch window.fetch (or the Node equivalent) to automatically record every outbound request, measure its duration, and run a prediction before returning the response. High-risk endpoints surface a console warning without interrupting the call.
X2Y_AUTO_REFACTOR=true to automatically apply high-severity refactoring suggestions during a build step. Use with caution in production pipelines — review the diff first.Specifications
| Package | x2y-dev-tools-sdk |
|---|---|
| Version | v1.0.0 |
| Runtime | Node.js 18+ |
| Module formats | ES6 + CommonJS |
| TypeScript | Bundled type definitions |
| API monitoring | Traffic recording, prediction, rate-limit detection |
| Refactoring | Strings, files, performance, idiom, async |
| Config | Two objects — API + refactoring |
| Auto-refactor | X2Y_AUTO_REFACTOR=true |
| Licence | MIT |
| Telemetry | 0 bytes — verified continuously |
| Account required | None — ever |
| Price | Free & open source |
| Developer | x2y Devs Tools Ltd, Nairobi, Kenya |
Support
For support and inquiries, contact the team directly. Bug reports and feature requests are welcome on GitHub — the SDK is MIT-licensed and contributions are encouraged.
Downloads
Security model
The x2y SDK is a library that runs inside your application. It does not make any network calls of its own — the only traffic it observes is the traffic your code already generates. Recorded API metrics stay in your process memory unless you explicitly persist them. Source code passed to refactorCode or refactorFile is analysed in-process and never leaves your machine. There is no analytics endpoint, no crash reporter, no licence check, no cloud inference tier. Verify with Wireshark, mitmproxy or your firewall logs — you will observe zero outbound connections attributable to the SDK itself.
| Telemetry | 0 bytes collected |
|---|---|
| Account | None required — ever |
| API traffic data | Your process memory or your filesystem |
| Source analysis | In-process, never transmitted |
| Refactoring engine | Local — no cloud inference |
| Network | Only your application's own calls |
| Licence | MIT — auditable source |
| Verification | Any network monitor |
Ready to build
Free, MIT-licensed, zero telemetry. One npm install gives you predictive API monitoring and intelligent code refactoring — running entirely inside your own process.
| Version | v1.0.0 |
|---|---|
| Runtime | Node.js 18+ |
| Licence | MIT — free & open source |
| Telemetry | 0 bytes |