DEV Community

CBT Tools
CBT Tools

Posted on

CBT Toolkit v1.5.0 Released: Now with a Hosted API

I just shipped v1.5.0 of my CBT Toolkit - 36 free mental health tools built in vanilla JS. The headline feature: a hosted API so you can add cognitive distortion detection to your app in 3 lines of code.

What is the CBT Toolkit?

36 standalone HTML tools for cognitive behavioral therapy techniques - thought records, cognitive distortion detectors, safety behavior detectors, core belief detectors, and more. No backend, no signup, no tracking. Your mental health data never leaves your browser.

157 developers have cloned it. 445 total clones. 2 stars (working on it).

What is new in v1.5.0?

Hosted API

The toolkit now has a live API endpoint:

curl -X POST https://cbt-thought-analyzer.onrender.com/analyze \
  -H "Content-Type: application/json" \
  -d '{"text": "I always mess everything up. I am a total failure."}'
Enter fullscreen mode Exit fullscreen mode

Returns the detected cognitive distortions (overgeneralization, labeling, all-or-nothing thinking) plus a CBT reframe for each. The same detection logic that powers the 36 browser tools, now callable from any language.

Issue Templates

Bug report and feature request templates so the 157 cloners can contribute back more easily.

CI Workflow

GitHub Actions validates every HTML file on push. The badge in the README shows green - active maintenance signal.

MIT License

Added the MIT license. This was an embarrassing gap for 36 open-source tools.

Why a hosted API?

The toolkit philosophy is: your data stays in your browser. That has not changed. But I kept getting the same question from cloners:

Can I call this from my backend?

The hosted API is the answer. Same detection logic, same CBT reframes, just callable over HTTP. It runs on Render free tier, so there is no uptime guarantee - for production use, clone the repo and self-host.

The 3 agents behind the API

The API actually powers 3 separate agents submitted to the aitopia.ai marketplace:

  1. CBT Thought Analyzer - detects 11 cognitive distortions
  2. Procrastination Pattern Detector - 8 procrastination patterns with behavioral activation interventions
  3. Attachment Style Detector - 4 attachment types based on Bartholomew (1990)

All 3 are in review on aitopia.ai. If approved, they earn credits on the 70/30 BYOM split.

Try it

const response = await fetch("https://cbt-thought-analyzer.onrender.com/analyze", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ text: "I should have done this perfectly. Anything less is failure." })
});
const { distortions, reframes } = await response.json();
console.log(distortions); // [{ name: "All-or-Nothing Thinking", ... }, ...]
Enter fullscreen mode Exit fullscreen mode

Or just open the toolkit and use the browser tools - no API key, no rate limit, no data leaves your device.

What is next

  • More agents on aitopia.ai (3 slots used, waiting on review)
  • RapidAPI listing for the API (in progress)
  • More CBT tools (24 niche funnels built, more coming)

The repo is here. Stars appreciated. Issues welcome. Clones are the best compliment.

Top comments (0)