https://github.com/paralin/claude
Extremely basic CLI for Claude Opus.
https://github.com/paralin/claude
litellm
Last synced: 12 months ago
JSON representation
Extremely basic CLI for Claude Opus.
- Host: GitHub
- URL: https://github.com/paralin/claude
- Owner: paralin
- License: mit
- Created: 2024-05-04T01:44:14.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-04T04:09:26.000Z (almost 2 years ago)
- Last Synced: 2025-03-10T22:48:32.254Z (12 months ago)
- Topics: litellm
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Claude CLI
[](https://opensource.org/licenses/MIT)
A command-line interface for interacting with Anthropic's Claude Opus AI model.
## Installation
1. Clone the repository or download the `claude` script.
```
wget -O ./claude https://raw.githubusercontent.com/paralin/claude/master/claude
```
2. Make the script executable:
```
chmod +x claude
```
3. (optional) Move the script to a directory in your PATH, e.g.:
```
cp claude ~/.local/bin/
```
## Usage
Set your Anthropic API key as an environment variable:
```
export ANTHROPIC_API_KEY=your_api_key_here
```
To use the CLI, simply run the `claude` command followed by your input text:
```
./claude
Rewrite this program correctly: stdos.stdout.logthis("hello world")
```
Then press ctrl+d to end the input.
You can also pipe input to the script:
```
echo "Hello, how are you?" | claude
```
Or a file:
```
cat prompt.txt | claude
```
If you're feeling brave:
```
echo "Show me what is in my home directory." | claude bash | bash
```
### Templates
The script supports predefined templates. To use a template, pass its name as the first argument:
```
claude spanish "Hello, how are you?"
```
Available templates:
- `spanish`: Translates the input text to Spanish (basic example).
- `bash`: Output an executable bash script from the input.
## Acknowledgements
- [Anthropic](https://www.anthropic.com/) for creating the Claude AI model.
- [litellm](https://github.com/kaiokendev/litellm) for the Python library to interact with the Anthropic API.
## License
MIT