Skip to main content

cartoon

Your coding agent gets the failing test, plus file:line where the tool reports one, from xcodebuild, swift test, pytest or cargo test — not a wall of log. Exit code and full log kept.

Before and after

Illustrative (hand-written to show the shape, not captured from one run). An xcodebuild test run with two failing tests, as the agent would see it:

$ xcodebuild test -scheme App -destination 'platform=iOS Simulator,name=iPhone 16'
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test -scheme App ...
Build settings from command line:
    ...
CompileSwift normal arm64 /Users/dev/proj/App/Greeter.swift (in target 'App' ...)
Test Case '-[AppTests.GreeterXCTests testGreetingExact]' started.
Test Case '-[AppTests.GreeterXCTests testGreetingExact]' failed (0.002 seconds).
... thousands more lines: build steps, one line per passing test, warnings ...
** TEST FAILED **
$ xcodebuild test -scheme App ...      # run through cartoon
runner: xcodebuild-test
summary:
 total: 212
 passed: 210
 failed: 2
 skipped: 0
 duration_s: 41.7
failures[2]{id,loc,msg}:
 "AppTests.GreeterXCTests/testGreetingExact()","AppTests/GreeterTests.swift:14","XCTAssertEqual failed: (\"hello, world!\") is not equal to (\"hello, worldz!\")"
 "AppTests.greetingMatches()","","Expectation failed: (greeting(for: \"world\") == \"hello, worldz!\")"
raw_log: ~/.local/state/cartoon/runs/20261115-104713-736d

A compile error during xcodebuild test or swift test comes back as a diagnostics table with file:line:col per error. The exit code is the one xcodebuild returned, and raw_log points at the complete output on disk.

Install

brew tap abhijitbansal/cartoon https://github.com/abhijitbansal/cartoon
brew install cartoon

or cargo install cartoon, or uv tool install cartoon. Then:

cartoon setup      # Claude Code hook + instructions block, then a health check

npm, cargo binstall, the shell installer and the plugin: docs/usage.md.

How it compares

keeps failing test id keeps file:line exit code honest auto-wraps bare command
Claude Code native preview¹ yes below the persistence threshold; above it, only if in a ~2 KB head same as the test id yes built in
xcodebuild ... | tail -40 only if in the last 40 lines only if in the last 40 lines no, returns tail's status unless set -o pipefail you type it
rtk cargo/pytest/go/npm: yes; Xcode: not stated² location for cargo test; others not stated² yes³ yes, hook rewrites
xcsift test failures reported⁴ yes⁴ --exit-on-failure flag⁴ no, you pipe ... 2>&1 | xcsift⁴
cartoon yes (from the xcresult bundle, or xunit for swift test) compile errors and XCTest failures yes; a Swift Testing failure carries its message, not a line yes yes, incl. 2>&1, | tail -N, cd App && forms

¹ Observed on Claude Code 2.1.325, one measurement each way: a 20.5 KB output was shown whole, a 102.6 KB one was replaced by a ~2 KB head, so the threshold lies between 20 KB and 100 KB. Not a documented guarantee. ² The project's README does not claim it; absence is not a claim that it cannot. ³ rtk README: "the command's exit code is passed through unchanged". ⁴ xcsift README: "test failures with file/line locations", the quick start pipes through xcsift, --exit-on-failure is shown for CI. xcsift also ships an MCP proxy and a Claude Code installer; we have not checked what the installer rewrites. Read from each README on 2026-11-15; check them for changes.

The honest summary: if you already pipe through xcsift or run rtk, you have most of the effect. cartoon's difference is reading the xcresult bundle, wrapping the bare command so the agent does not have to remember, and keeping the whole run on disk for cartoon logs grep.

Safety

The hook rewrites a command with permissionDecision: "allow", which skips Claude Code's permission prompt for that call, so it is deliberately narrow.

  • It auto-approves only read-mostly dev-loop commands: test runners, linters, typecheckers and builds. It refuses the deploy, publish, sign and watch forms it recognises, xcodebuild modes other than build, test and clean, and modes that rewrite files (--fix, -u). A task or target name that avoids every word it knows (a custom gradle task, a make target) can still slip through. Infra CLIs (docker, kubectl, terraform, gh, aws) are never wrapped.
  • It reads your Bash ask and deny rules from settings files (user, project and managed settings) and stays silent when one could match the command, any && segment of it, or the tool behind a launcher (uv run pytest, xcrun xcodebuild). When it cannot tell, it stays silent. Measured on Claude Code 2.1.325: --disallowedTools and dontAsk mode are honoured with the hook installed. Rules the hook cannot read and that were not measured (--settings, session /permissions rules, Agent SDK options, other managed-settings locations, Windows) may not stop an auto-approved command.
  • It never rewrites in plan permission mode.
  • Silent means the command goes through Claude Code's normal permission flow, exactly as without cartoon. A project script you declare in .cartoon.toml is never auto-approved.

The full list, and how to turn it off (CARTOON_NO_WRAP=1, cartoon hook uninstall): docs/usage.md.

More

  • docs/usage.md: every flag, -c pipes, --junit, --max-tokens, last / diff, config, adapters, upgrading from 0.7
  • docs/agents.md: the Claude Code plugin, skills for other agents, the MCP server, the instructions block
  • benchmarks/: measured token reduction, with each baseline named. Against an already-quiet command such as pytest -q the gain is small.
  • CONTRIBUTING.md: adapters are one trait impl plus fixtures

License

MIT

Metadata

Release files for cartoon 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cartoon 0.8.0
File Size Uploaded Provenance Actions
cartoon-0.8.0.tar.gz 308.3 kB With provenance Details for cartoon-0.8.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for cartoon 0.8.0
File Actions
cartoon-0.8.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for cartoon-0.8.0-py3-none-win_amd64.whl
cartoon-0.8.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for cartoon-0.8.0-py3-none-musllinux_1_2_x86_64.whl
cartoon-0.8.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for cartoon-0.8.0-py3-none-musllinux_1_2_aarch64.whl
cartoon-0.8.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for cartoon-0.8.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
cartoon-0.8.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for cartoon-0.8.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
cartoon-0.8.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for cartoon-0.8.0-py3-none-macosx_11_0_arm64.whl
cartoon-0.8.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for cartoon-0.8.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 26.9 MB

Release files / cartoon-0.8.0.tar.gz

Download URL cartoon-0.8.0.tar.gz
Size 308.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a19c17a057d776d4b3ab69430e092b040cb3ab91a96df31eaa71eb7fdea84a3a
BLAKE2b-256 checksum
How to use checksums
916ad1eec3ff3778e2e1d997714b12d034b87ea0bfe978502ecf1c6495acbbe5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / cartoon-0.8.0-py3-none-win_amd64.whl

Download URL cartoon-0.8.0-py3-none-win_amd64.whl
Size 3.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
f011d375b278cfbb1984849c77d9fcf359e0ac6abea06d3de9b4237f3245d2f6
BLAKE2b-256 checksum
How to use checksums
3bb9a5f591f05960f1b494a79fe338a35a50446a7be96efa1291102d04bbc6fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / cartoon-0.8.0-py3-none-musllinux_1_2_x86_64.whl

Download URL cartoon-0.8.0-py3-none-musllinux_1_2_x86_64.whl
Size 3.9 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
31eafe8dc5648617bdd25bbc469404dd7baab4c787acdc37120d73f448584515
BLAKE2b-256 checksum
How to use checksums
be5aa374edd25be332246941f68ad4527ee18c6e1f5b4a259b78c33aa7cbea7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / cartoon-0.8.0-py3-none-musllinux_1_2_aarch64.whl

Download URL cartoon-0.8.0-py3-none-musllinux_1_2_aarch64.whl
Size 3.7 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
1c69d8cbcdaf3e264191afa2e516946f2c5eda4e32494b1363971b0df0d49dd1
BLAKE2b-256 checksum
How to use checksums
68c74b3dc8aa2b0ba7274df28b57fe5ff7ddea05a695940a6863e28fa1f64b97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / cartoon-0.8.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL cartoon-0.8.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 3.9 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
4d4dfff49a0f37bdca2817ac1a1d045e849b9efb8c377fc79cd3f780177ccfc8
BLAKE2b-256 checksum
How to use checksums
24cf19e3603ccc1e44162dc3459c2835a0052d72732baa579ec68cac9cbe8154
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / cartoon-0.8.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL cartoon-0.8.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 3.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4e21ad801e4edc87a49953fe54f559e2b620a22df0890813e2baf2a13c5ece55
BLAKE2b-256 checksum
How to use checksums
ed7df76eb954848fdb0ca093f0b7ec819e399001c7b8884906cf958edbfc08d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / cartoon-0.8.0-py3-none-macosx_11_0_arm64.whl

Download URL cartoon-0.8.0-py3-none-macosx_11_0_arm64.whl
Size 3.7 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2ce196fb9acc39ab84d6846baf4fc2e6415319a9da04dc8dff8fd6b2e9cc6671
BLAKE2b-256 checksum
How to use checksums
4d81c2dc93953ca755586692249834100e6b20129a4f2b41ebd6712b156409c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / cartoon-0.8.0-py3-none-macosx_10_12_x86_64.whl

Download URL cartoon-0.8.0-py3-none-macosx_10_12_x86_64.whl
Size 3.8 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d674f90736637704dd8b64bd239d4b9b8816a646e789eb13300712458dec6cb5
BLAKE2b-256 checksum
How to use checksums
4266b63c9852e19259a5bddda76190c07b09103abdcfdc3e9c67688869533687
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for cartoon 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for cartoon-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page