How mnemoo/cli works
stakecli is a CLI/TUI and MCP application for browsing Stake Engine teams and games, validating and uploading game assets, and publishing releases. Users enter through the CLI or interactive TUI; adapters call application use cases in service, which coordinate compliance, upload planning and execution, then publish through Stake’s API. The repository also provides approval conversations with persistent read state and hooks, MLR and repack tools, and an optional encrypted upload relay. README documents these capabilities; unsampled subsystem links are included only where the documented workflow supports them.
Main entry points: service.go Application service · app.go Interactive TUI · cli CLI commands · manager.go Conversation manager
Components 24
User interfaces
- CLI commands
internal/cli - Interactive TUI
internal/tui/app/app.go
Asset workflows
- Application service
internal/service/service.go - Math compliance
internal/upload/compliance.go - MLR reweighting
internal/mlr/mlr.go - Book repacking
internal/repack/apply.go - Upload execution
internal/upload/uploader.go
Stake integration
- Session and accounts
internal/auth/auth.go - Stake API client
internal/api/client.go - Self updater
internal/updater/check.go
Approvals and agents
- Conversation manager
internal/conversations/manager.go - Read state and receipts
internal/conversations/store.go - Message hooks
internal/conversations/hooks.go - MCP server
internal/mcpserver/server.go - Upload daemon
internal/daemon/daemon.go - Operation state
internal/operations/store.go
Upload acceleration
- Relay client
internal/accelerator/client.go - Relay server
internal/accelerator/server.go
Other components
- CLI/TUI user
- Stake Engine
- Presigned object storage
- Hook destinations
- Coding agent
- Relay operator
Connections 35
- CLI/TUI user → CLI commands: runs commands
- CLI/TUI user → Interactive TUI: opens interface
- CLI commands → Application service: invokes use cases
- Interactive TUI → Application service: invokes use cases
- Interactive TUI → Session and accounts: selects account
- Application service → Math compliance: checks math
- CLI commands → MLR reweighting: runs MLR
- Interactive TUI → MLR reweighting: offers reweighting
- CLI commands → Book repacking: estimates or repacks
- Interactive TUI → Book repacking: offers confirmed repack
- Application service → Upload execution: plans and executes
- Application service → Stake API client: reads and publishes
- Upload execution → Stake API client: requests upload plan
- Stake API client → Stake Engine: calls API
- Upload execution → Presigned object storage: transfers presigned parts
- Session and accounts → Stake API client: provides session
- Interactive TUI → Conversation manager: views approvals
- MCP server → Conversation manager: handles review tools
- Conversation manager → Application service: fetches and sends threads
- Conversation manager → Read state and receipts: persists read state
- Conversation manager → Message hooks: dispatches message events
- Message hooks → Hook destinations: delivers notifications
- CLI/TUI user → Coding agent: uses coding agent
- Coding agent → MCP server: connects over stdio
- MCP server → Application service: invokes tools
- MCP server → Upload daemon: queues upload work
- Upload daemon → Application service: executes upload use cases
- Application service → Operation state: tracks upload operation
- CLI commands → Relay client: configures or tests relay
- Interactive TUI → Relay client: selects relay upload
- Application service → Relay client: uses alternate transport
- Relay client → Relay server: sends encrypted stream
- Relay operator → Relay server: runs relay daemon
- Relay server → Presigned object storage: delivers queued parts
- CLI commands → Self updater: checks and installs update