cmd

package
v1.20250724.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientCmd = &cobra.Command{
	Use:   "client",
	Short: "AgentAPI Client CLI",
	Long:  "Command line client for interacting with AgentAPI endpoints",
}
View Source
var HelpersCmd = &cobra.Command{
	Use:   "helpers",
	Short: "Helper utilities for agentapi-proxy",
	Long:  "Collection of helper utilities and tools for working with agentapi-proxy",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Available helpers:")
		fmt.Println("  setup-claude-code - Setup Claude Code configuration")
		fmt.Println("  generate-token - Generate API keys for agentapi-proxy authentication")
		fmt.Println("  init - Initialize Claude configuration (alias for setup-claude-code)")
		fmt.Println("  setup-gh - Setup GitHub authentication using gh CLI")
		fmt.Println("  send-notification - Send push notifications to registered subscriptions")
		fmt.Println("Use 'agentapi-proxy helpers --help' for more information about available subcommands.")
	},
}
View Source
var MCPCmd = &cobra.Command{
	Use:   "mcp",
	Short: "Model Context Protocol Server",
	Long:  "Start an MCP server that exposes agentapi-proxy functionality",
	Run:   runMCPServer,
}
View Source
var ServerCmd = &cobra.Command{
	Use:   "server",
	Short: "Start the AgentAPI Proxy Server",
	Long:  "Start the reverse proxy server for AgentAPI that routes requests based on configuration",
	Run:   runProxy,
}

Functions

func RunAddMcpServers added in v1.41.3

func RunAddMcpServers(configFlag string) error

RunAddMcpServers is exported for use in other packages

func RunInitGitHubRepo added in v1.41.3

func RunInitGitHubRepo(repoFullName, cloneDir string, ignoreMissingConfig bool) error

RunInitGitHubRepo is exported for use in other packages

func RunSetupClaudeCode added in v1.41.3

func RunSetupClaudeCode() error

RunSetupClaudeCode is exported for use in other packages

Types

type APIKeysFile added in v0.14.0

type APIKeysFile struct {
	APIKeys []config.APIKey `json:"api_keys"`
}

type AgentAPIServer added in v1.0.0

type AgentAPIServer struct {
	// contains filtered or unexported fields
}

type GitHubAppConfig added in v0.5.0

type GitHubAppConfig struct {
	AppID          int64
	InstallationID int64
	PEMPath        string
	APIBase        string
}

type MCPServerConfig added in v1.9.1

type MCPServerConfig struct {
	ID        string            `json:"id"`
	Name      string            `json:"name"`
	Endpoint  string            `json:"endpoint"`
	Enabled   bool              `json:"enabled"`
	Transport string            `json:"transport"`
	Command   string            `json:"command,omitempty"`
	Args      []string          `json:"args,omitempty"`
	Env       map[string]string `json:"env,omitempty"`
	Timeout   int               `json:"timeout,omitempty"`
}

MCP Server configuration structure

type Message added in v1.0.0

type Message struct {
	Content string `json:"content"`
	Type    string `json:"type"`
}

type MessageResponse added in v1.0.0

type MessageResponse struct {
	ID        string    `json:"id"`
	Role      string    `json:"role"`
	Content   string    `json:"content"`
	Timestamp time.Time `json:"timestamp"`
}

type NotificationHistory added in v1.59.0

type NotificationHistory struct {
	ID             string                 `json:"id"`
	UserID         string                 `json:"user_id"`
	SubscriptionID string                 `json:"subscription_id"`
	Title          string                 `json:"title"`
	Body           string                 `json:"body"`
	Type           string                 `json:"type"`
	SessionID      string                 `json:"session_id"`
	Data           map[string]interface{} `json:"data"`
	SentAt         time.Time              `json:"sent_at"`
	Delivered      bool                   `json:"delivered"`
	Clicked        bool                   `json:"clicked"`
	ErrorMessage   *string                `json:"error_message"`
}

type NotificationResult added in v1.59.0

type NotificationResult struct {
	Subscription NotificationSubscription
	Error        error
}

type NotificationSubscription added in v1.59.0

type NotificationSubscription struct {
	ID                string            `json:"id"`
	UserID            string            `json:"user_id"`
	UserType          string            `json:"user_type"`
	Username          string            `json:"username"`
	Endpoint          string            `json:"endpoint"`
	Keys              map[string]string `json:"keys"`
	SessionIDs        []string          `json:"session_ids"`
	NotificationTypes []string          `json:"notification_types"`
	CreatedAt         time.Time         `json:"created_at"`
	Active            bool              `json:"active"`
}

type StatusResponse added in v1.0.0

type StatusResponse struct {
	Status string `json:"status"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL