Add comprehensive CLI tool for Scope3 Agentic API#18
Merged
Conversation
Adds a full-featured command-line interface with 80+ auto-generated commands across all 12 API resources (agents, assets, brand-agents, campaigns, etc.) Features: - Auto-generated commands with built-in help at all levels - Dual output formats (JSON and table) - Multiple authentication methods (config file, env var, CLI flag) - Fixed authentication to use x-scope3-api-key header - Fixed ID type handling (string IDs vs numeric IDs) - Platform and partner workflow test scripts CLI Usage: scope3 config set apiKey your_key scope3 campaigns list scope3 campaigns create --prompt "Test" --brandAgentId 123 Documentation: - CLI.md: Complete CLI reference with examples - WORKFLOW_GUIDE.md: Platform vs Partner access guide - CLI_STATUS.md: Current status of all operations - scripts/: Platform and partner workflow tests Tested and verified working with real API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add changeset for minor version bump - Format CLI code with prettier 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace all `any` type annotations with proper TypeScript types to pass ESLint strict rules: - parseJsonArg return type: any -> unknown - request object type: any -> Record<string, unknown> - error catch type: any -> unknown with proper Error type guards - client resource access: (client as any) -> (client as Record<string, unknown>) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix type errors from strict TypeScript checking: - Cast data object for accessing dynamic properties (data, success, message) - Use double cast (unknown -> Record) for client resource access - Extract and cast method before calling to satisfy type checker - All type checks now pass while maintaining ESLint compliance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace static command definitions with dynamic tool discovery from MCP server. The CLI now automatically stays in sync with API changes without code updates. Key improvements: - Commands auto-generate from MCP server's tools/list endpoint - 24-hour smart caching with offline fallback - Type-safe parameter parsing from server schemas - Zero maintenance - always reflects latest API capabilities - Expose listTools() and callTool() methods in SDK for CLI use Benefits: - API adds endpoint → CLI instantly supports it (after cache refresh) - API changes parameters → CLI auto-updates validation - No manual command definition maintenance required 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Change plural resource names to singular (campaigns -> campaign, brand-agents -> brand-agent, etc.) - Fix special command names (campaign get-summary -> campaign-get summary) - Add required manifestUrl parameter to brand agent creation - Update products commands to media-product This demonstrates the power of dynamic CLI: API added manifestUrl requirement and CLI automatically caught it! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Move TESTING.md and SIMPLE_MEDIA_AGENT.md to docs/ folder - Delete verbose/redundant docs (CLI.md, CLI_STATUS.md, WORKFLOW_GUIDE.md) - Update README with concise CLI section highlighting dynamic updates - Keep only essential docs in root (README, CHANGELOG) Repo is now cleaner with less verbose documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add simple structured logging utility based on GCP-compatible format: - Outputs JSON in production for better querying/monitoring - Human-readable format in development - Logs to stderr to avoid interfering with CLI output - Replaces console.error with logger.error for internal errors - Keeps console.log for user-facing CLI output Benefits: - Better error tracking and debugging - Structured logs for production monitoring - Consistent error handling throughout CLI 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This documentation is redundant and not needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Organize logger into src/utils/ for better code structure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
EmmaLouise2018
approved these changes
Nov 7, 2025
This was referenced Nov 7, 2025
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a comprehensive CLI tool for the Scope3 Agentic API with 80+ auto-generated commands across all 12 API resources.
Features
CLI Tool
Workflow Tests
Documentation
Key Fixes
Usage
Install and configure:
```bash
npm run build
export SCOPE3_API_KEY=your_key
```
Basic commands:
```bash
node dist/cli.js channels list
node dist/cli.js campaigns create --prompt "Q1 campaign" --brandAgentId 123
```
Run workflow tests:
```bash
./scripts/platform-workflow-test.sh
```
Testing
Production Ready
✅ No TODOs or commented code
✅ Production-ready implementation
✅ Comprehensive documentation
✅ Tested with real API
✅ Ready to merge