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 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude4

v0.1.0

Published

Official CLI tool for Claude AI interactions

Downloads

2

Readme

Claude4 CLI

Official command-line interface for Claude AI interactions.

Installation

npm install -g claude4

Quick Start

  1. Get your API key from Anthropic Console
  2. Login to the CLI:
    claude4 auth login
  3. Start chatting:
    claude4 chat "Hello Claude!"
    # or
    claude4 chat --interactive

Features

Authentication

  • Login/Logout: Secure API key management
  • Status Check: Verify authentication status
  • Credentials stored in ~/.claude4rc.json

Chat

  • Single Messages: claude4 chat "Your message"
  • Interactive Mode: claude4 chat --interactive
  • File Input: claude4 chat -f document.txt
  • Model Override: claude4 chat -m claude-3-opus-20240229
  • Temperature Control: claude4 chat -t 0.3

Configuration

  • View Settings: claude4 config list
  • Set Values: claude4 config set model claude-3-opus-20240229
  • Get Value: claude4 config get model
  • Interactive Editor: claude4 config edit
  • Reset to Defaults: claude4 config reset

Commands

Authentication

# Login with API key
claude4 auth login

# Check authentication status
claude4 auth whoami

# Logout and clear credentials
claude4 auth logout

Chat

# Send a single message
claude4 chat "Explain quantum computing"

# Interactive chat session
claude4 chat --interactive

# Send file contents
claude4 chat -f README.md "Summarize this document"

# Override model
claude4 chat -m claude-3-opus-20240229 "Complex reasoning task"

# Set temperature
claude4 chat -t 0.1 "Be very focused and precise"

Configuration

# View all configuration
claude4 config list

# Set configuration values
claude4 config set model claude-3-opus-20240229
claude4 config set temperature 0.3
claude4 config set maxTokens 8192

# Get specific value
claude4 config get model

# Interactive configuration editor
claude4 config edit

# Reset to defaults
claude4 config reset

Configuration Options

| Key | Description | Default | |-----|-------------|---------| | baseUrl | Anthropic API endpoint | https://api.anthropic.com | | model | Claude model to use | claude-3-haiku-20240307 | | temperature | Response creativity (0-1) | 0.7 | | maxTokens | Maximum response length | 4096 | | apiKey | Your Anthropic API key | (none) |

Available Models

  • claude-3-haiku-20240307 - Fast and efficient (default)
  • claude-3-sonnet-20240229 - Balanced performance
  • claude-3-opus-20240229 - Most capable

Examples

Basic Usage

# Simple question
claude4 chat "What is the capital of France?"

# Code explanation
claude4 chat -f app.js "Explain this code"

# Creative writing
claude4 chat -t 0.9 "Write a short story about a robot"

Interactive Session

claude4 chat --interactive
# Now you can have a back-and-forth conversation
# Type 'exit' or 'quit' to end the session

Configuration

# Set up for creative tasks
claude4 config set model claude-3-opus-20240229
claude4 config set temperature 0.8

# Set up for analytical tasks  
claude4 config set model claude-3-sonnet-20240229
claude4 config set temperature 0.2

Development

Build from Source

git clone <repository-url>
cd claude4-cli
npm install
npm run build
npm link

Run Tests

npm test

Development Mode

npm run dev

Troubleshooting

Authentication Issues

  • Ensure your API key is valid and starts with sk-ant-
  • Check your internet connection
  • Verify your API key hasn't expired

Configuration Problems

  • Reset configuration: claude4 config reset
  • Check configuration: claude4 config list
  • Re-run authentication: claude4 auth login

Connection Issues

  • Check your internet connection
  • Verify the base URL is correct
  • Try with a different model

Support

For issues and support:

License

MIT