Skip to navigation

CLI Tools

View as MarkdownOpen in Claude

The TypeScript Server SDK ships two command-line tools. swaig-test loads an agent file, renders its SWML, lists its SWAIG functions, executes a function with arguments you supply, and simulates serverless platforms, all without deploying or placing a call. sw-tsdocs prints the SDK’s documentation, API signatures, and examples from the installed package. The package’s bin entry makes both available through npx after installation.

npm install @signalwire/sdk

Available tools

CommandPurpose
swaig-testTest SWAIG functions and generate SWML output locally
sw-tsdocsLook up the installed SDK’s docs, API signatures, and examples

Local development workflow

# 1. Inspect the generated SWML
npx swaig-test src/agent.ts --dump-swml
# 2. List available tools
npx swaig-test src/agent.ts --list-tools
# 3. Test a specific function
npx swaig-test src/agent.ts --exec get_info --topic SignalWire
# 4. Look up an API's signature
npx sw-tsdocs api AgentBase