Skip to content

SDK v1.5.2

Choose a tag to compare

@github-actions github-actions released this 14 Feb 20:08
· 126 commits to main since this release

Highlights

Plugin improvements for Claude Code and Cowork: automatic environment setup via SessionStart hook, API key protection via .env read guard, and clearer plugin names in marketplace listings.

What's New

  • CLI Plugin: SessionStart hook (session-setup.sh) for Cowork bootstrap — installs xaffinity, sets PATH, loads API key from .env
  • CLI Plugin: PreToolUse/Read guard (guard-env-read.sh) blocks reading .env files to prevent API key exposure in conversation
  • CLI Plugin: Query command reference (references/query-guide.md)
  • MCP Plugin: Query language reference files (references/filter-operators.md, quantifiers.md, include-expand.md, output-formats.md)

Changes

  • Marketplace: Renamed plugins from generic "sdk"/"cli"/"mcp" to "Affinity CRM SDK (unofficial)", "Affinity CRM CLI (xaffinity, unofficial)", "Affinity CRM MCP (unofficial)" for clarity in plugin lists.
  • CLI Plugin: Rewrote skill description following Anthropic skills guide formula
  • MCP Plugin: Rewrote query-language SKILL.md (861→293 lines) with progressive disclosure; extracted detail to references/
  • MCP Plugin: Updated affinity-mcp-workflows skill description following guide formula
  • SDK Plugin: Updated affinity-python-sdk skill description following guide formula

Removed

  • CLI Plugin: Removed /affinity-help command (redundant — CLI skill auto-triggers on relevant prompts)

Bug Fixes

  • CLI Plugin: .env parsing now handles quoted values and CRLF line endings
  • CLI Plugin: SessionStart hook writes to CLAUDE_ENV_FILE are idempotent (no duplicate lines on re-run)

Quick Install

SDK only:

pip install affinity-sdk

SDK + CLI:

pipx install "affinity-sdk[cli]"

MCP Server for Claude Desktop (easiest - MCPB bundle):

  1. Install CLI: pipx install "affinity-sdk[cli]"
  2. (Optional) Pre-configure API key: xaffinity config setup-key
    • If skipped, Claude Desktop will prompt for your API key during install
  3. Install xaffinity MCP in Claude Desktop (download and double-click)

Other MCP clients (Cursor, Windsurf, VS Code, etc.) require manual configuration - see MCP docs.

Full documentation | MCP Server docs