anthropic-cli  by anthropics

Command-line interface for the Claude API

Created 2 months ago
267 stars

Top 95.9% on SourcePulse

GitHubView on GitHub
Project Summary

The anthropic-cli provides a command-line interface for interacting with the Claude Developer Platform. It is designed for developers and power users who need to programmatically access Claude's AI models and functionalities directly from their terminal. The CLI streamlines API operations, offering a convenient way to manage Claude-based applications and workflows.

How It Works

The CLI employs a resource-based command structure, enabling users to interact with Claude API functionalities through intuitive commands like ant messages create. It offers flexible methods for passing file content, supporting direct file arguments (@filename) or embedding file references within JSON/YAML payloads. Advanced users can leverage explicit encoding schemes (@file:// for text, @data:// for base64) to precisely control how file data is transmitted to the API.

Quick Start & Requirements

  • Installation:
    • Homebrew: brew install anthropics/tap/ant
    • Go: go install github.com/anthropics/anthropic-cli/cmd/ant@latest
  • Prerequisites: Go version 1.22 or later.
  • PATH Configuration: After Go installation, ensure the Go bin directory ($HOME/go/bin or $GOPATH/bin) is added to your shell profile (.zshrc, .bashrc, etc.) if commands are not found.
  • Running Locally: Clone the repository and use ./scripts/run args....

Highlighted Details

  • Resource-based Command Structure: Organizes commands logically by API resource (e.g., messages, models).
  • Flexible File Handling: Accepts file paths directly (@file.ext) or embedded within JSON/YAML structures.
  • Explicit Encoding Control: Allows specifying plain text (@file://) or base64 (@data://) encoding for file content.
  • Configurable Output: Supports various output formats (JSON, YAML, pretty-print, raw) and error formatting options.
  • Environment Variable Support: Integrates seamlessly with ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN for authentication.

Maintenance & Community

No information regarding maintainers, community channels, or project health signals was present in the provided documentation.

Licensing & Compatibility

No licensing information was provided in the documentation.

Limitations & Caveats

The provided documentation focuses on installation and usage, particularly for local testing and development. No explicit limitations, alpha status, or known bugs were detailed.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
21
Issues (30d)
0
Star History
63 stars in the last 30 days

Explore Similar Projects

Starred by George Hotz George Hotz(Author of tinygrad; Founder of the tiny corp, comma.ai), Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), and
42 more.

opencode by anomalyco

3.1%
141k
CLI tool for AI-assisted coding in the terminal
Created 11 months ago
Updated 20 hours ago
Feedback? Help us improve.