JS library for Claude-2 API via Claude Web (also CLI)
Top 47.9% on sourcepulse
This project provides an unofficial JavaScript API and CLI for interacting with Claude AI, targeting developers and power users who want programmatic access to Claude's conversational capabilities. It aims to offer a lightweight, isomorphic solution for starting conversations, uploading files, and managing chat history.
How It Works
The library leverages an unofficial internal API exposed by the Claude web interface, requiring a user's session key for authentication. It's built with a zero-dependency, isomorphic JavaScript approach, allowing it to run in both Node.js and browser environments, though browser usage may require a proxy to circumvent CORS issues. The core functionality revolves around initiating conversations, sending messages, and retrieving conversation details.
Quick Start & Requirements
npm install claude-ai
(library), npm install -g claude-cli
(CLI)Highlighted Details
claude-2
, claude-1.3
, and claude-instant-100k
.Maintenance & Community
The project is maintained by @Explosion-Scratch. Contributions are welcome via pull requests.
Licensing & Compatibility
The README does not specify a license. Compatibility for commercial use or closed-source linking is not addressed.
Limitations & Caveats
The project is currently non-functional due to Claude blocking non-browser traffic to its internal API. The author is seeking community assistance to find a workaround.
1 year ago
1 day