Skip to main content

CLI wrapper for jcodemunch-mcp - Token-efficient code exploration

Project description

jCodeMunch CLI

A thin CLI wrapper for jcodemunch-mcp — token-efficient code exploration via tree-sitter AST parsing.

Key feature: Uses uvx to always stay up to date with the latest jcodemunch-mcp. No manual updates needed.

Why This Exists

jcodemunch-mcp is MCP-only (no CLI). This wrapper gives you a CLI that works anywhere:

  • Sub-agents via exec
  • Scripts
  • CI/CD pipelines
  • Any AI that can run shell commands

Installation

Option 1: pip (recommended)

pip install jcodemunch-cli

Or with uv:

uv pip install jcodemunch-cli

Option 2: Development Install

git clone https://github.com/your-org/jcodemunch-cli.git
cd jcodemunch-cli
pip install -e .

Option 3: Standalone Script

If you just want to run it directly:

# Requires Python 3.10+ and uv
uv run jcodemunch-cli list-tools

Configuration

Environment Variables

Variable Required Description
GITHUB_TOKEN No GitHub token for private repos
OPENAI_API_KEY No API key for AI summaries
OPENAI_API_BASE No API base URL (default: https://api.minimax.chat/v1)
ANTHROPIC_API_KEY No Anthropic key for Claude summaries
GOOGLE_API_KEY No Google key for Gemini summaries

Set up GitHub Token (optional)

# Using your existing gh CLI
export GITHUB_TOKEN=$(gh auth token)

# Or create a personal access token
# https://github.com/settings/tokens
export GITHUB_TOKEN=ghp_your_token_here

Usage

Index a Repository

# Index a GitHub repository
jcodemunch index-repo owner/repo

# Index a local folder
jcodemunch index-folder /path/to/code

Search for Code

# Search symbols by name
jcodemunch search-symbols --repo owner/repo login

# Get exact symbol code
jcodemunch get-symbol --repo owner/repo "src/main.py::UserService.login#method"

# Get all symbols in a file
jcodemunch file-outline --repo owner/repo src/main.py

# Get repo overview
jcodemunch repo-outline owner/repo

# Full-text search
jcodemunch search-text --repo owner/repo "TODO"

List Indexed Repos

jcodemunch list-repos

For AI Agents

OpenClaw Sub-agents

Add to your skill or agent workflow:

# Agent calls via exec
exec  jcodemunch search-symbols --repo owner/repo functionName

Claude Code (MCP)

Use the native MCP integration instead (recommended for Claude Code):

{
  "mcpServers": {
    "jcodemunch": {
      "command": "uvx",
      "args": ["jcodemunch-mcp"]
    }
  }
}

Any Other AI

If your AI can run shell commands, it can use this CLI:

Agent: "Find the login function"
→ exec: jcodemunch search-symbols --repo owner/repo login
→ Returns: [list of matching symbols]
→ exec: jcodemunch get-symbol --repo owner/repo "src/auth.py::login#function"
→ Returns: exact function code

Token Savings

Task Traditional jCodeMunch
Find a function ~40,000 tokens ~200 tokens
Understand module API ~15,000 tokens ~800 tokens
Explore repo structure ~200,000 tokens ~2,000 tokens

95%+ token reduction on code exploration tasks.

Requirements

  • Python 3.10+
  • uv (for automatic jcodemunch-mcp updates)
  • GitHub token (optional, for private repos)

How It Works

This package is a thin wrapper that:

  1. Uses the mcp Python library to handle the MCP protocol
  2. Calls uvx jcodemunch-mcp under the hood
  3. Passes through environment variables for API keys

Because it uses uvx, you always get the latest jcodemunch-mcp version — no manual updates required.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jcodemunch_cli-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jcodemunch_cli-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file jcodemunch_cli-1.0.0.tar.gz.

File metadata

  • Download URL: jcodemunch_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jcodemunch_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e31fa02f58807eff95054b72f18a43441119a443d86d170f4f6ab0a4d5ae2845
MD5 f2c4ed856400a9c60ee2b38e146abb30
BLAKE2b-256 b05908c1623db1a4dee062cc5e4b97eba5d1a509ca363d3cd9a2b8bf70d4b7e3

See more details on using hashes here.

File details

Details for the file jcodemunch_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: jcodemunch_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jcodemunch_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 533d375434e8ee1027a153e20c6f248a634e9ce4b3237839707c822415bbce95
MD5 8ce73a7dfa7caab19da9b39e21ec3ec8
BLAKE2b-256 b564dd87fffb3a6214661f2c0f12f45529cc06325fe173e481b860696c0186a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page