Metadata-Version: 2.4
Name: cbot-cli
Version: 0.1.1
Summary: A local-first CLI helper for productivity and automation.
Author-email: "Roberto L. Delgado" <roberto@delgadodev.xyz>
License: MIT
Project-URL: Homepage, https://github.com/roskideluge/cbot
Project-URL: Repository, https://github.com/roskideluge/cbot
Project-URL: Issues, https://github.com/roskideluge/cbot/issues
Keywords: cli,productivity,automation,local-first
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: End Users/Desktop
Classifier: Environment :: Console
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: pyperclip
Dynamic: license-file

## Cbot Basics

The application is a Python script that prompts the Llama/Ollama text completion endpoint with a system message and can identify the OS of the current system. This helps ensure that Linux, Mac, and Windows specific commands tend to be more accurate.

## Installation

- NOTE: For the script to work, you will need to have Ollama running in the background. To install a desired Ollama model go to https://ollama.com/search
- Clone this repo to your computer using your terminal.
- `cd ~/<your-directory>/cbot/`
- Run `pip install -e .` inside your cbot directory
- A "cbot" command should be available to use cbot from your CLI, e.g. `cbot -g "Who was the 45th president of the United States?`
- cbot will automatically store questions and responses in a local SQLite database located at `~/.cbot_cache`
  
## Model Selection
  
You can choose which Ollama model Cbot uses by passing one of these flags before your question:
  
- `-l32` : use `llama3.2` (default)  
- `-ds`  : use `deepseek-r1`
  
Example:
  
```
cbot -l32 -g "List files in my home directory"
cbot -ds -g "Explain how a for loop works in Python"
```

You can also call cbot with a **-s** option. This will save any command as a shortcut with whatever name you choose. The first parameter is the name of the command and the second is the command itself in quotes.

```
$> cbot -s nap "pmset sleepnow"
   Saving shortcut nap, will return: pmset sleepnow
$> cbot -x nap
   Sleeping now...
```

To copy a command directly into the clipboard use the **-c** option. Can be useful if you want to execute the command but you don't trust cbot to do so automatically.

Cbot has a -g option to ask general questions. The results when you ask a general question will not be formated as a command line. This is useful for asking general questions, historical facts or other information not likely to be formated as a command.

```
$> cbot -g "Who was the 23rd president?"
  Herbert Hoover
$> cbot -g "What is the meaning of life?"
   42
```

Cbot saves every question and response in a SQLite3 database located in the home directory .cbot_cache. You can inspect or delete this directory, you can also directly add or remove shortcuts if needed.

#### Credits

---

Forked by Roberto Delgado.
Thanks to Gregory Raiz for the original version.
This code is free to use under the MIT liscense.
