Code Monkey home page Code Monkey logo

mistralcli's Introduction

MistralCLI - Rust CLI for Mistral AI API

This project has no affiliation with Mistral AI.

MistralCLI is a simple open source command-line interface (CLI) written in Rust that allows you to easily interact with the Mistral AI API.

Prerequisites

Usage

Before you can interact with the API, you need to set your Mistral API key.

Setting Your Mistral API Key

  1. Obtain a Mistral API key from the Mistral website: https://mistral.ai
  2. Add your API key to your shell environment. You can do this by adding the following line to your ~/.bashrc (or ~/.bash_profile on Mac) file: export MISTRAL_API_KEY=your-api-key
  3. To apply the changes, either restart your shell session or run the following command: source ~/.bashrc # or source ~/.bash_profile on Mac

Installation

  1. Clone the MistralCLI repository to your local machine using Git: git clone https://github.com/aumbriac/MistralCLI
  2. Enter the directory: cd MistralCLI
  3. Test the project locally using Cargo (Rust's package manager): cargo run What is the meaning of life?
  4. Build the executable: cargo build
  5. Copy the executable to a directory in your system's PATH to make it easily accessible:
    • Windows: You can copy it to a directory listed in your system's Path environment variable, such as C:\Windows\System32.
    • Mac: You can copy it to /usr/local/bin/ using the following command: sudo cp target/release/mistral /usr/local/bin/

Using MistralCLI

Now that you have the MistralCLI installed on your system, you can use it directly from within your shell environment.

  • Example usage: mistral What is the meaning of life?

Note: mistral-tiny is the default model, but you can use either mistral-small or mistral-medium by specifying an optional -m flag with the model suffix: mistral -m medium What is the meaning of life?

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

mistralcli's People

Contributors

aumbriac avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.