Skip to content

codebuff without arguments shows render-graphs.js usage #440

@sudhirrawal20

Description

@sudhirrawal20

Bug Report: codebuff command without arguments shows incorrect output

Environment

  • OS: macOS (Darwin 25.3.0)
  • Node: Installed via Homebrew
  • CodeBuff Version: 1.0.620
  • Install Method: npm install -g codebuff
  • Shell: zsh

Bug Description

When running codebuff without any arguments, the CLI shows usage text from an unrelated script (render-graphs.js) instead of starting the interactive CodeBuff session.

Expected Behavior

Running codebuff should start the interactive AI coding assistant.

Actual Behavior

Usage: render-graphs.js <skill-directory> [--combine]

Options:
  --combine    Combine all diagrams into one SVG

Example:
  ./render-graphs.js ../subagent-driven-development
  ./render-graphs.js ../subagent-driven-development --combine

Commands Status

✅ Commands that WORK:

  • codebuff --version → Shows 1.0.620
  • codebuff --help → Shows correct help menu
  • codebuff "prompt text" → Works with prompts

❌ Commands that FAIL:

  • codebuff (no arguments) → Shows render-graphs.js usage

Reproduction Steps

  1. Install codebuff: npm install -g codebuff
  2. Navigate to any project directory
  3. Run: codebuff (with no arguments)
  4. Observe incorrect output showing render-graphs.js usage

Investigation Details

  • Issue persists when running binary directly: ~/.config/manicode/codebuff
  • Issue persists in different directories (not project-specific)
  • Issue persists even after npm reinstall
  • Running via explicit node also fails: node /opt/homebrew/bin/codebuff

Workaround

Temporary fix:

rm -rf ~/.config/manicode/*
codebuff --version  # Forces fresh binary download

This fixes it temporarily, but the issue may recur.

Root Cause Analysis

The render-graphs.js mentioned in the error is from a completely unrelated tool located at ~/.agents/skills/writing-skills/render-graphs.js (Claude Code skills directory).

Hypothesis: The codebuff binary or wrapper script may be incorrectly executing or falling back to an unrelated script when no arguments are provided. This suggests a possible issue with:

  • Argument parsing in the wrapper script
  • Binary execution path resolution
  • Default command handling when argc == 0

Additional Context

  • The binary at ~/.config/manicode/codebuff is a proper Mach-O 64-bit executable
  • The wrapper at /opt/homebrew/bin/codebuff is a Node.js script
  • No shell aliases or functions override the codebuff command
  • Issue affects multiple users/installations

Impact

This prevents users from starting the interactive CodeBuff session using the standard codebuff command, requiring them to always specify arguments or use workarounds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions