Skip to content

feat: add CLI framework adapters for Klyne analytics#31

Merged
psincraian merged 1 commit into
mainfrom
psincraian/cli-framework-adapters
Jan 10, 2026
Merged

feat: add CLI framework adapters for Klyne analytics#31
psincraian merged 1 commit into
mainfrom
psincraian/cli-framework-adapters

Conversation

@psincraian

Copy link
Copy Markdown
Owner

Summary

Added adapters for Click, Typer, and argparse that enable analytics tracking with just one line of code. Each framework gets a unified track_*() function with consistent API and behavior.

Key features:

  • Track command execution, duration, success/failure, and errors
  • Auto-detect package version with optional override
  • Privacy-first: sensitive args redacted, track_args=False by default
  • Graceful failure: analytics errors never break CLI execution
  • Zero additional dependencies beyond the SDK

Test Plan

  • All 23 new adapter tests passing
  • All 10 existing SDK tests still passing
  • Examples work for Click, Typer, and argparse
  • Code passes ruff linter

Add adapters for Click, Typer, and argparse frameworks that enable
analytics tracking with just one line of code per framework. Includes
base adapter class, framework-specific implementations, comprehensive
tests (23 passing), and usage examples.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@psincraian psincraian merged commit c80c4a6 into main Jan 10, 2026
2 checks passed
@psincraian psincraian deleted the psincraian/cli-framework-adapters branch January 10, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant