Cyrille Martraire
@cyriux.bsky.social
400 followers
250 following
79 posts
Software socio-technical architect, DDD enthusiast, trainer, speaker, Arolla CTO & co-founder, living in Paris. Author of “Living Documentation” (Addison-Wesley), co-author “Software Craft” (Dunod). Also fan of modern electro & pop music production
Posts
Media
Videos
Starter Packs
Reposted by Cyrille Martraire
Reposted by Cyrille Martraire
Dr Abeba Birhane
@abeba.bsky.social
· Nov 24
Reposted by Cyrille Martraire
Reposted by Cyrille Martraire
Reposted by Cyrille Martraire
Romeu Moura
@malk-zameth.bsky.social
· Jul 17
Cyrille Martraire
@cyriux.bsky.social
· Jul 16
Reposted by Cyrille Martraire
Charles Desneuf
@selrahcd.bsky.social
· Jul 16
Justin Searls
@searls.bsky.social
· Jul 16
TLDR is the best test runner for Claude Code
A couple years ago, Aaron (https://tenderlovemaking.com) and I had an idea for a satirical test runner that enforced fast feedback by giving up on running your tests after 1.8 seconds. It's called TLDR (https://github.com/tendersearls/tldr).
I kept pulling on the thread until TLDR could stand as a viable non-satirical test runner and a legitimate Minitest alternative. Its 1.0 release sported a robust CLI, configurable (and disable-able) timeouts, and a compatibility mode that makes TLDR a drop-in replacement for Minitest in most projects.
Anyway, as I got started working with Claude Code and learned about how hooks work (https://docs.anthropic.com/en/docs/claude-code/hooks-guide), I realized that a test runner with a built-in concept of a timeout was suddenly a very appealing proposition. To make TLDR a great companion to agentic workflows, I put some work into a new release this weekend that allows you to do this:
tldr --timeout 0.1 --exit-0-on-timeout --exit-2-on-failure
The above command does several interesting things:
• Runs as many tests in random order and in parallel as it can in 100ms
• If some tests don't run inside 100ms, TLDR will exit cleanly (normally a timeout fails with exit code 3)
• If a test fails, the command fails with status code 2 (normally, failures exit code 1)
These three flags add up to a really interesting combination when you configure them as a Claude Code hook:
• A short timeout means you can add TLDR to run as an after-write hook for Claude Code without slowing you or Claude down very much
• By exiting with code 0 on a timeout, Claude Code will happily proceed so long as no tests fail. Because Claude Code tends to edit a lot of files relatively quickly, the hook will trigger many randomized test runs as Claude works—uncovering any broken tests reasonably quickly
• By exiting code 2 on test failures, Claude will—according to the docs (https://docs.anthropic.com/en/docs/claude-code/hooks#simple%3A-exit-code)—block Claude from proceeding until the tests are fixed
Here's an example Claude Code configuration you can drop into any project that uses TLDR. My .claude/settings.json file on todo_or_die (https://github.com/searls/todo_or_die) looks like this:
{ "hooks": { "PostToolUse": [{ "matcher": "Edit|MultiEdit|Write", "hooks": [ { "type": "command", "command": "bundle exec tldr --timeout 0.1 --exit-0-on-timeout --exit-2-on-failure" }] } ] } }
If you maintain a linter or a test runner, you might want to consider exposing configuration for timeouts and exit codes in a similar way. I suspect demand for hook-aware CLI tools will become commonplace soon.
justin.searls.co
Reposted by Cyrille Martraire
Cyrille Martraire
@cyriux.bsky.social
· Jun 26
Cyrille Martraire
@cyriux.bsky.social
· Jun 18
Cyrille Martraire
@cyriux.bsky.social
· Jun 9
Reposted by Cyrille Martraire