How stringke/claudex works
Claudex manages Claude Code profiles and runs them through a local proxy that routes provider requests, translates protocols, and can enrich conversation context. The graph also includes documented OAuth, configuration-set, and dashboard capabilities. The proxy and context wiring is partly supported by sampled source and README; unsampled subsystem internals and uncertain call paths are kept at directory-level granularity.
Main entry points: handler.rs Request handler · main.rs CLI dispatcher · context_engine.rs Context preprocessing · mod.rs Configuration sets
Components 28
CLI runtime
- CLI dispatcher
src/main.rs - Command definitions
src/cli.rs - Launch and daemon
src/process/launch.rs
Proxy and providers
- Proxy server
src/proxy/mod.rs - Request handler
src/proxy/handler.rs - Intent router
src/router/classifier.rs - Provider adapters
src/proxy/adapter/mod.rs - Protocol translation
src/proxy/translate/mod.rs - Failover logic
src/proxy/fallback.rs
Context engine
- Context preprocessing
src/proxy/context_engine.rs - Local RAG
src/context/rag.rs - Context sharing
src/context/sharing.rs - Conversation compression
src/context/compression.rs
Profiles and auth
- Configuration
src/config/mod.rs - Profile management
src/config/profile.rs - OAuth token manager
src/oauth/manager.rs - OAuth login flows
src/oauth/providers.rs - OAuth callback server
src/oauth/server.rs
Management tools
- Configuration sets
src/sets/mod.rs - Set sources
src/sets/source.rs - Set installer
src/sets/install.rs - Set registry
src/sets/lock.rs - TUI dashboard
src/tui/mod.rs - Proxy metrics
src/proxy/metrics.rs - Provider health
src/proxy/health.rs
Other components
- Operator
- Claude Code
- AI providers
Connections 32
- Operator → CLI dispatcher: runs commands
- CLI dispatcher → Command definitions: parses arguments
- CLI dispatcher → Configuration: loads config
- CLI dispatcher → Profile management: manages profiles
- CLI dispatcher → Launch and daemon: launches session
- Launch and daemon → Proxy server: starts proxy
- Launch and daemon → Claude Code: executes with env
- Claude Code → Request handler: sends API requests
- Proxy server → Request handler: dispatches requests
- Request handler → Configuration: resolves profile
- Request handler → Intent router: classifies intent
- Request handler → Context preprocessing: preprocesses request
- Context preprocessing → Local RAG: searches index
- Context preprocessing → Context sharing: loads shared context
- Context preprocessing → Conversation compression: compresses history
- Request handler → Provider adapters: selects provider adapter
- Provider adapters → Protocol translation: translates protocols
- Provider adapters → AI providers: forwards requests
- Request handler → Failover logic: retries on failure
- Request handler → OAuth token manager: gets access token
- OAuth login flows → OAuth callback server: receives callback
- OAuth token manager → OAuth login flows: loads credentials
- CLI dispatcher → OAuth login flows: runs auth commands
- CLI dispatcher → Configuration sets: manages sets
- Configuration sets → Set sources: resolves source
- Configuration sets → Set installer: installs components
- Configuration sets → Set registry: reads and writes lock
- CLI dispatcher → TUI dashboard: opens dashboard
- TUI dashboard → Proxy metrics: displays metrics
- TUI dashboard → Provider health: displays health
- Request handler → Proxy metrics: records requests
- Request handler → Provider health: tracks provider status