28 lines
398 B
Go
28 lines
398 B
Go
package cli
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"email-mcp/internal/secretstore"
|
|
)
|
|
|
|
type App struct {
|
|
store secretstore.Store
|
|
}
|
|
|
|
func NewApp(_ ...any) *App {
|
|
return &App{}
|
|
}
|
|
|
|
func (a *App) Run(args []string) error {
|
|
if len(args) == 0 {
|
|
return fmt.Errorf("usage: email-mcp <setup|mcp>")
|
|
}
|
|
|
|
switch args[0] {
|
|
case "setup", "mcp":
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("unknown command: %s", args[0])
|
|
}
|
|
}
|