SDK v1.7.0
Highlights
New field history-bulk command fetches field change history across an entire list in one shot — useful for pipeline stage analysis, funnel conversion, and time-in-stage metrics. Also fixes --dotenv to search upward for .env files (matching standard dotenv behavior) and hardens the PreToolUse hook with a three-tier API key check.
What's New
- CLI:
field history-bulkcommand for batch field change history across lists. Supports--list-id(with--all/--max-resultsbounding),--list-entry-idsfor specific entries,--action-typefiltering,--dry-runfor API cost estimation, and concurrent fetching viaXAFFINITY_CONCURRENCYenv var. Partial failures are reported as warnings without blocking successful entries. - CLI:
--listalias for--list-idonfield lsandfield history-bulkcommands (LLM-friendly shorthand). - MCP Plugin: Pipeline history analysis skill (
pipeline-history) with 5-step workflow: identify status field, export current state, dry-run estimate, fetch history, analyze transitions.
Bug Fixes
- CLI:
--dotenvnow searches upward for.envfiles usingfind_dotenv(usecwd=True), matching standard python-dotenv behavior. Previously only checked the current working directory, which failed in Cowork VM sessions where the working directory differs from the.envlocation. - CLI Plugin: PreToolUse hook (
pre-xaffinity.sh) now uses three-tier API key detection: (1)AFFINITY_API_KEYenv var, (2)--dotenvcheck-key, (3) plain check-key (config.toml). Previously only checked the env var, blocking commands when the key was configured via.envor config file.
Documentation
- Added
list export --jsonoutput structure documentation to data model resource (fieldkey details,--field/--field-typerequirement). - Added
field history-bulkto MCP command registry for LLM discoverability. - Added field change history section to data model resource.
CLI Plugin 1.5.5
Fixed
- PreToolUse hook: three-tier API key detection (env var → dotenv → config.toml)
MCP Plugin 1.19.0
Added
- Pipeline history analysis skill for deal stage transition workflows
Quick Install
SDK only:
pip install affinity-sdkSDK + CLI:
pipx install "affinity-sdk[cli]"MCP Server for Claude Desktop (easiest - MCPB bundle):
- Install CLI:
pipx install "affinity-sdk[cli]" - (Optional) Pre-configure API key:
xaffinity config setup-key- If skipped, Claude Desktop will prompt for your API key during install
- Install xaffinity MCP in Claude Desktop (download and double-click)
Other MCP clients (Cursor, Windsurf, VS Code, etc.) require manual configuration - see MCP docs.