npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

tree-of-thought-cli

v0.2.0

Published

Tree of Thought CLI - Multi-AI mode with Claude + Gemini + Codex for Claude Code

Downloads

155

Readme

@tot/cli

CLI installer for Tree of Thought framework - adds /tot command to Claude Code with Multi-AI support (Claude + Gemini + Codex).

Installation

npm install -g tree-of-thought-cli

That's it! The /tot command is now available in Claude Code.

MCP Setup (Optional but Recommended)

For Multi-AI mode (Claude + Gemini + Codex), install MCP servers:

# Install Gemini MCP (for architecture & design)
claude mcp add gemini-cli -s user -- npx -y gemini-mcp-tool

# Install Codex MCP (for performance & optimization)
# Follow Codex MCP setup instructions

Usage

Multi-AI Mode (Default - Recommended) 🚀

Combines 3 AI perspectives for maximum diversity:

# Default: Claude + Gemini + Codex (2:2:2)
/tot "Memory leak in production - grows 50MB/hour"

# Custom ratio (Claude-focused: 3:2:1)
/tot --ratio 3:2:1 "Design notification system for 100k users"

# Custom ratio (Performance-focused: 1:2:3)
/tot --ratio 1:1:4 "Database query takes 5 seconds"

Output: 6 thoughts

  • 2 practical solutions (Claude)
  • 2 architectural designs (Gemini)
  • 2 performance optimizations (Codex)

Hybrid Mode (2 AIs)

Focus on 2 specific perspectives:

# Claude + Gemini (Practical + Architecture)
/tot --hybrid cg "Refactor PaymentService with 500 lines"

# Claude + Codex (Practical + Performance) - Classic
/tot --hybrid cx "Optimize image processing pipeline"

# Gemini + Codex (Architecture + Performance)
/tot --hybrid gx "Design high-throughput message queue"

Single-AI Mode

Quick analysis with one AI:

# Claude-only (practical solutions)
/tot -c "Fix authentication bug"

# Gemini-only (architecture focus)
/tot -g "Design microservices system"

# Codex-only (performance focus)
/tot -x "Reduce API latency to <50ms"

What Gets Installed

This package installs command definitions to ~/.claude/commands/:

  • tot.md - Main Tree of Thought command

How It Works

  1. npm install runs automatically
  2. postinstall script copies command files to ~/.claude/commands/
  3. Claude Code recognizes the /tot command
  4. Use /tot to solve problems systematically

Features

  • 🌳 Systematic Problem Solving: Princeton NLP's Tree of Thought methodology
  • 🤖 Multi-AI Intelligence: Claude + Gemini + Codex (3 perspectives)
  • 🔍 Maximum Diversity: 6 thoughts from 3 different AI models
  • 🎯 Smart Selection: Chooses top 3-4 approaches to expand
  • 🔄 Iterative Exploration: BFS/DFS algorithms for thorough analysis
  • Parallel Execution: All AIs run simultaneously (~20s)
  • 🎛️ Flexible Modes: Multi-AI, Hybrid (2 AIs), or Single-AI

AI Role Differentiation

  • Claude: Practical, user-focused, proven patterns
  • Gemini: Innovative architecture, creative system design
  • Codex: Algorithm optimization, performance analysis

Requirements

Required

  • Node.js 16+
  • Claude Code CLI

Optional (for Multi-AI mode)

  • Gemini MCP: claude mcp add gemini-cli -s user -- npx -y gemini-mcp-tool
  • Codex MCP: Follow Codex MCP setup guide

Note: /tot works without MCPs (Claude-only mode) but Multi-AI provides best results.

Uninstallation

npm uninstall -g @tot/cli
rm ~/.claude/commands/tot.md

Documentation

Core Documentation

MCP Integration Guides

Troubleshooting

Command not found after installation

The installation script should have copied files to ~/.claude/commands/. Verify:

ls ~/.claude/commands/tot.md

If the file is missing, try reinstalling:

npm uninstall -g tree-of-thought-cli
npm install -g tree-of-thought-cli

MCP connection issues

If Multi-AI mode falls back to Claude-only:

# Check Gemini MCP
claude mcp list | grep gemini-cli

# Check Codex MCP
claude mcp list | grep codex

# Reinstall if needed
claude mcp add gemini-cli -s user -- npx -y gemini-mcp-tool

Auto-fallback: If MCP fails, Claude automatically generates replacement thoughts.

Permission errors

If you get permission errors during installation:

# macOS/Linux
sudo npm install -g tree-of-thought-cli

# Or use npx (no global install needed)
npx tree-of-thought-cli

Slow execution

Multi-AI mode takes 15-20s (parallel execution). To speed up:

# Use Hybrid mode (2 AIs) - ~18s
/tot --hybrid cx "problem"

# Use Claude-only - ~15s
/tot -c "problem"

Links

License

MIT © youkchansim