Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neysofu/en2tex
A CLI utility to generate LaTeX mathematical expressions, powered by OpenAI APIs
https://github.com/neysofu/en2tex
cli gpt-3 latex openai
Last synced: 12 days ago
JSON representation
A CLI utility to generate LaTeX mathematical expressions, powered by OpenAI APIs
- Host: GitHub
- URL: https://github.com/neysofu/en2tex
- Owner: neysofu
- License: mit
- Created: 2023-02-04T18:55:40.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-05T13:56:01.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T14:06:31.236Z (3 months ago)
- Topics: cli, gpt-3, latex, openai
- Language: Rust
- Homepage:
- Size: 80.1 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# `en2tex`
A CLI utility to generate LaTeX mathematical expressions, powered by OpenAI APIs.
![demo](resources/demo.gif)
## Installation
```
cargo install en2tex
```You may need to close and reopen your terminal after installation.
## Usage
`en2tex` uses [GPT-3](https://beta.openai.com/). To use it, you'll need to grab an API key from [your dashboard](https://beta.openai.com/), and save it to `OPENAI_API_KEY` environment variable as follows (I suggest saving it in your shell's profile for persistance between sessions):
```bash
export OPENAI_API_KEY='sk-XXXXXXXX'
```Once you have configured your environment, run `en2tex` followed by whatever mathematical expression that you want.
To get a full overview of all available options, run `en2tex --help`
```
A CLI utility to generate LaTeX mathematical expressions, powered by OpenAI APIsUsage: en2tex [OPTIONS] [PROMPT]...
Arguments:
[PROMPT]... Description of the desired LaTeX output. You can use English words, abbreviations, or any notation resembling LaTeX commands and AsciiMathOptions:
-m, --model Which OpenAI model to use [default: text-davinci-003]
-c, --copy Copy the generated LaTeX without asking for confirmation first
-h, --help Print help information
-V, --version Print version information
```## Acknowledgements
This repository is a fork of https://github.com/m1guelpf/plz-cli, which inspired `en2tex`. The original code was simple enough for me to seamlessly adapt it to LaTeX. Thank you to the original authors!
## License
This project is open-sourced under the MIT license. See [the License file](LICENSE) for more information.