After a few months, looking back, it really took off.
Anthropic's Claude Code SDK (Software Development Kit) allows developers to integrate Claude Code as a subprogram into applications. It can be executed in non-interactive mode via the command-line interface (CLI), currently primarily supporting CLI usage, with future support for TypeScript and Python SDKs.
Basic usage involves executing a single query with --print, and using --resume or --continue parameters to backtrack or continue multi-turn conversations. Developers can customize or append system prompts via --system-prompt or --append-system-prompt. More advanced Model Context Protocol (Model Context Protocol, MCP) features allow loading external tool servers, such as databases, API integrations, or custom workflows, via --mcp-config, with explicit tool authorization via --allowedTools to ensure security.
Key CLI options include --output-format to specify response format (default text, JSON, or streaming JSON), --verbose to enable detailed logging, --max-turns to limit non-interactive mode loop counts, and --disallowedTools rejection list along with --permission-prompt-tool for MCP permission prompts. Returned data can be structured using JavaScript Object Notation (JSON), while streaming mode sequentially outputs each init, user, assistant message, and final result.
Official examples cover script integration, file handling, and session management; best practices suggest prioritizing JSON format for program parsing, handling failures via exit codes and standard error streams, maintaining context with session management, setting timeout mechanisms, and adhering to API call rate limits. In practical applications, the Claude Code SDK has been integrated into GitHub Actions, automating code reviews, pull request creation, and issue prioritization workflows.
Community discussions indicate that Google's Gemini outperforms Claude in certain scenarios with its million-character context and full codebase compression upload features, yet some argue that the Sonnet 3.7 model is more reliable in understanding and executing imprecise prompts. Multiple model support tools like Plandex and clai offer supplier-agnostic alternatives; cost remains a critical consideration, with enterprises accepting the Max plan at around $100 monthly for ROI evaluation, though individual project developers may hesitate due to daily costs exceeding $20. Finally, GitHub Actions' native integration has received widespread praise, regarded as a significant milestone in automating AI assistant workflows on CI platforms.
https://news.ycombinator.com/item?id=44032777