How sleuth-io/sx works
sx is a shared library for capturing, versioning, governing, and distributing AI assets—skills, rules, agents, commands, hooks, MCP servers, and plugins—to AI clients. Users enter through either the desktop app or CLI. The central workflow adds assets to a vault, then installs them to selected scopes and clients; governance, team/bot management, usage reporting, and cloud MCP access are additional branches. Relationships below rely on the README and SOURCE INDEX references; several implementation details were not sampled, so those links are omitted.
Main entry points: repository.go Vault storage · install_context.go Install workflow · main.go Desktop app · add.go Add assets
Components 22
User interfaces
- Desktop app
app/main.go - Library workspace
app/frontend/src/screens/Library.tsx - Vault onboarding
app/frontend/src/screens/Onboarding.tsx - sx CLI
cmd/sx/main.go - CLI commands
internal/commands/commands.go
Asset lifecycle
- Add assets
internal/commands/add.go - Asset manifest
internal/manifest/manifest.go - Vault storage
internal/vault/repository.go - Version storage
internal/vault/storage.go - Publish assets
internal/publish/publish.go
Installation
- Install scopes
internal/scope/scope.go - Install workflow
internal/commands/install_context.go - Client registry
internal/clients/registry.go - AI client adapters
internal/clients/client.go
Teams and governance
- Teams and bots
internal/mgmt/teams.go - Audit trail
internal/mgmt/audit.go - Usage reporting
internal/stats/queue.go
External integrations
- Cloud MCP relay
internal/cloud/bridge.go - AI tools
- Synced team folder
- Web AI services
Other components
- User or automation
Connections 24
- User or automation → Desktop app: opens app
README.md - User or automation → sx CLI: runs commands
README.md - Desktop app → Vault onboarding: sets up vault
README.md - Desktop app → Library workspace: opens library
- User or automation → Add assets: adds assets
README.md - sx CLI → CLI commands: dispatches
cmd/sx/main.go - CLI commands → Add assets: routes add
README.md - Add assets → Vault storage: stores assets
README.md - Vault storage → Asset manifest: tracks metadata
internal/vault/repository.go - Vault storage → Version storage: stores versions
README.md - Vault storage → Synced team folder: uses as vault
README.md - User or automation → Publish assets: publishes assets
README.md - User or automation → Install workflow: requests installs
README.md - Install workflow → Install scopes: resolves target
internal/commands/install_context.go - Install workflow → Vault storage: loads assets
internal/commands/install_context.go - Install workflow → Client registry: selects clients
internal/commands/install_context.go - Client registry → AI client adapters: dispatches installs
- AI client adapters → AI tools: writes native assets
README.md - User or automation → Teams and bots: manages access
README.md - User or automation → Audit trail: reviews changes
README.md - AI tools → Usage reporting: reports adoption
- User or automation → Cloud MCP relay: starts relay
README.md - Cloud MCP relay → Vault storage: serves vault content
README.md - Web AI services → Cloud MCP relay: requests MCP
README.md