Conversation
Extract data functions from every CLI handler in commands/mail/, separating data retrieval from presentation. Each cmd_* function now calls a standalone data function that takes plain Python args and returns structured data — no printing, no argparse dependency. New src/mxctl/api.py provides 56 importable functions: from mxctl.api import get_messages, read_message, get_triage All 675 tests pass. Zero CLI behavior changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add tests for api.py (all 56 exports), analytics.py empty stats branch, and system.py get_headers data function - Update ARCHITECTURE.md test count 675 → 678 - Update README test count 675 → 678 - Add API refactor entry to CHANGELOG [Unreleased] 678 tests, 100% coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ection - Replace real email with fake in example output - "50 commands" → "50+ commands" throughout - Remove redundant JSON Output for Automation section - Replace 20-line manual AI setup snippet with one-liner - Remove Acknowledgments section (duplicated tagline) - Reformat Claude Code examples as blockquotes - Condense Local AI section from 15 to 6 lines - Remove unnecessary --to footnote on export - Fix jq examples to match actual JSON structure 488 → 434 lines. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
src/mxctl/api.pywith 56 importable functions across 13 categoriesWhat this enables
Any Python project can now import mxctl as a library, not just use it as a CLI.
Test plan
🤖 Generated with Claude Code