8000 GitHub - joliss/claude-code-logger
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

joliss/claude-code-logger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code API Logger

A simple tool to log API calls made by the Claude Code CLI to Anthropic's API.

Disclaimer

FOR RESEARCH PURPOSES ONLY

This tool is provided strictly for research and educational purposes only. By using this software, you agree to the following:

  1. The author makes no warranties or representations of any kind concerning this software and accepts no liability for its use.
  2. The author assumes no responsibility whatsoever for any consequences arising from the use of this tool.
  3. Users are solely responsible for ensuring their use of this tool complies with all applicable laws, regulations, and Anthropic's terms of service.
  4. This tool is not officially affiliated with, authorized, maintained, sponsored, or endorsed by Anthropic or any of its affiliates.

Use at your own risk.

This project itself was developed with Claude Code.

Installation

Global Installation (recommended)

npm install -g .

This will make the claude-log command available globally.

Local Installation

npm install .

Usage

claude-log [options] [claude options]

All arguments after the options are passed directly to the Claude CLI.

Options

  • --log_dir=DIR: Directory to save logs (default: ~/.claude_logs)
  • --print: Show debug messages (default: off)

Examples

# Basic usage - run Claude with API logging
claude-log

# Run Claude with a prompt
claude-log -p "What is Rust and why do people care?"

# Specify a custom log directory
claude-log --log_dir=/path/to/logs

Setting up an alias

For even easier usage, you can set up a shell alias:

Bash/ZSH

Add to your .bashrc or .zshrc:

alias claude='claude-log'

Fish shell

alias claude='claude-log'
funcsave claude

This lets you use claude as normal, but with all API calls logged.

Log Files

Logs are stored in ~/.claude_logs by default, organized by timestamp.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%
0