![]() |
![]() |
![]() |
|---|
art by Gemini
mechanise
Mechanise is a Rust library that provides a simple and intuitive interface for interacting with the Anthropic's messages REST API.
It exists because getting llms to write an API for themselves has become somewhat of a pastime of mine to evaluate them.
Goals:
- Easy-to-use API.
- Convenient methods for generating content.
- Have these goals met by llms predominantly writing most of the code.
Usage
To get started with Mechanise, add it as a dependency to your Rust project's Cargo.toml file:
[]
= "0.1.0"
or, cargo add mechanise if that's your preferred method of adding dependencies.
After adding Mechanise as a dependency, you will need to obtain an API key to interact with the services.
Make sure to set the ANTHROPIC_API_KEY environment variable with your API key before running your application.
Then, in your main.rs:
async
NOTE:
AnthropicErrorwill#transparentmost of / all of the errors possible from the dependency crates so be aware of that should you encounter problems.
Testing
To run the tests for Mechanise, use the following command:
Contributing
Contributions to Mechanise are welcome! Please feel free to open an issue or submit a pull request if you have improvements or bug fixes.
License
Mechanise is licensed under the MIT License.
Resources like this (I've not looked at these past a crates.io search)
https://crates.io/crates/anthropic https://crates.io/crates/claude_cli


