Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildUserAgent ¶
BuildUserAgent constructs the HTTP User-Agent header value for the CLI. The base format is "slack-cli/<version> (os: <goos>)". If an AI agent is detected, an " AI-Agent (name: ..., entry: ...)" suffix is appended.
Examples:
slack-cli/2.38.1 (os: darwin) slack-cli/2.38.1 (os: darwin) AI-Agent (name: claude-code, entry: cli) slack-cli/2.38.1 (os: linux) AI-Agent (name: cursor)
func GetAIAgentName ¶
func GetAIAgentName() string
GetAIAgentName returns the normalized name of the detected AI agent, or an empty string if no agent is detected.
Types ¶
type AIAgent ¶
AIAgent represents a detected AI coding agent that invoked the CLI.
func GetAIAgent ¶
func GetAIAgent() *AIAgent
GetAIAgent checks environment variables to determine if the CLI is being run by an AI coding agent. Returns nil if no agent is detected. Detection priority: CLAUDECODE > CODEX_CI > GEMINI_CLI > CLINE_ACTIVE > CURSOR_AGENT > AGENT.
Click to show internal directories.
Click to hide internal directories.