$ show hj01857655/kiro-account-manager
Kiro Account Manager is a Tauri-v2 desktop application (Rust + React/TypeScript) that manages multiple Kiro IDE accounts with smart switching, quota monitoring, token refresh, and machine-ID rotation to avoid multi-account association. It also ships a fully featured local HTTP gateway (Kiro2API) that exposes managed accounts via OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages APIs, with load balancing, model mapping, prompt filtering, response caching, and streaming. Additionally, the app provides a configuration surface for Kiro IDE settings, MCP servers, custom agents, skills, steering rules, hooks, and powers. It supports multiple authentication providers (Google, GitHub, AWS Builder ID, IAM Identity Center) and integrates with the Kiro CLI SQLite database for account import. The architecture follows a clean separationβRust backend handles all business logic via Tauri IPC commands, while the React frontend uses Radix-based UI components and context-based state management. Despite its broad feature set, the codebase demonstrates professional engineering practices with extensive testing in both Rust and TypeScript, though some modules are monolithic and contain hardcoded constants tied to Kiro-specific APIs.
The LLM identified 3 files worth highlighting for reuse:
Implements a generic load balancer for routing upstream AI API requests to a pool of accounts. Supports multiple selection strategies (round-robin, random, balanced, most-quota, weighted-random, least-connections) with per-account health scoring, failure tracking, rate-limit cooldown, and ban persistence. The strategy enum and the `SelectStrategy` trait make this easily reusable in other proxy or API-gateway projects, independent of the specific account model.
Provides a clean protocol adater that normalizes incoming requests from Anthropic Messages, OpenAI Chat Completions, and OpenAI Responses APIs into a common `NormalizedRequest` internal structure, and then builds a unified Kiro upstream payload. This pattern of separating format-specific normalization from common downstream processing is a textbook integration pattern, reusable in any system that must support multiple external API formats while proxying to a single backend.
Builds HTTP clients with a configurable proxy resolution chain (per-account proxy β Kiro IDE settings β environment variables), custom timeout handling (streaming vs. non-streaming), and user-agent spoofing to mimic AWS SDK behavior. Although tied to Kiro-specific headers, the builder pattern and proxy resolution logic are extractable into a general-purpose HTTP client factory that supports layered proxy configuration.