https://github.com/alexoarga/co-bash
A CLI tool that transforms natural language into bash commands
https://github.com/alexoarga/co-bash
bash cli cohere language-model machine-learning natural-language-processing
Last synced: 4 months ago
JSON representation
A CLI tool that transforms natural language into bash commands
- Host: GitHub
- URL: https://github.com/alexoarga/co-bash
- Owner: alexOarga
- License: apache-2.0
- Created: 2023-01-13T11:56:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-13T13:26:34.000Z (over 3 years ago)
- Last Synced: 2025-01-02T22:45:47.540Z (over 1 year ago)
- Topics: bash, cli, cohere, language-model, machine-learning, natural-language-processing
- Language: Python
- Homepage:
- Size: 33.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# _co:bash_ - Cohere powered bash commands

_co:bash_ is a CLI tool for converting natural language into
bash commands. It is powered by [Cohere](https://cohere.ai).

# Install
_co:bash_ can be installed via `pip`:
pip install co-bash
# Setup
To use _co:bash_ you will need your own Cohere API key. You can get one at [cohere.ai](https://cohere.ai).
You can set your API key in the environment variable `COHERE_API_KEY`. I suggest adding this to your `.bashrc` file.
```bash
export COHERE_API_KEY=XXXXXXXXXX
```
Optional: You can also set the Cohere model you want to use
with the environment variable `COHERE_MODEL`:
```bash
export COHERE_MODEL=xlarge
```
# Usage
Just use the `co` command to run _co:bash_:
```console
$ co
```
# Example
```console
$ co create a git commit with message 'initial commit'
Suggested command:
git commit -m 'initial commit'
Execute? [y/N]: y
[master (commit-raíz) d55572b] initial commit
19 files changed, 561 insertions(+)
create mode 100644 LICENSE
create mode 100644 README.md
create mode 100644 co/__init__.py
create mode 100644 co/cohere.py
create mode 100644 co/constants.py
create mode 100644 co/entrypoint.py
```