cbot-cli


Namecbot-cli JSON
Version 0.1.8 PyPI version JSON
download
home_pageNone
SummaryA local-first CLI helper for productivity and automation.
upload_time2025-07-25 23:21:27
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT
keywords cli productivity automation local-first
VCS
bugtrack_url
requirements requests pyperclip openai python-dotenv
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## Cbot-cli 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

## For Development: 
- Clone this repo to your computer using your terminal.
- `cd ~/<your-directory>/cbot/`
- Run `pip install -e .` inside your cbot directory

- A "cbot-cli" command should be available to use cbot from your CLI, e.g. `cbot-cli -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`

- 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


## 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`
- `-oa`: use `openai o4-mini`
  
Example:
  
```
cbot-cli -l32 -g "List files in my home directory"
cbot-cli -ds -g "Explain how a for loop works in Python"
cbot-cli -oa -g "Who is the president of the United States?"
```

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-cli -s nap "pmset sleepnow"
   Saving shortcut nap, will return: pmset sleepnow
$> cbot-cli -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-cli -g "Who was the 23rd president?"
  Herbert Hoover
$> cbot-cli -g "What is the meaning of life?"
   42
```

## Agent Mode

Cbot includes an agent mode with persistent conversation memory using the **-a** flag. In agent mode, the AI maintains context across multiple interactions, remembering your conversation history even between sessions.

```
$> cbot-cli -a
   Entering agent mode. Type 'exit' to end the agent chat.
   Type 'clear' to clear conversation history.
You: What's my name?
Agent: I don't have any information about your name from our conversation.

You: My name is John
Agent: Nice to meet you, John! I'll remember that.

You: exit
   Exiting chat mode.
```

When you restart agent mode later, it will remember previous conversations. Use `clear` to reset the conversation history 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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cbot-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "cli, productivity, automation, local-first",
    "author": null,
    "author_email": "\"Roberto L. Delgado\" <roberto@delgadodev.xyz>",
    "download_url": "https://files.pythonhosted.org/packages/81/86/365eff411d7f40a6309fa6c30f075be2407b72cbb05da55bd7c59cbf180e/cbot_cli-0.1.8.tar.gz",
    "platform": null,
    "description": "## Cbot-cli Basics\n\nThe 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.\n\n## Installation\n\n## For Development: \n- Clone this repo to your computer using your terminal.\n- `cd ~/<your-directory>/cbot/`\n- Run `pip install -e .` inside your cbot directory\n\n- A \"cbot-cli\" command should be available to use cbot from your CLI, e.g. `cbot-cli -g \"Who was the 45th president of the United States?`\n\n- cbot will automatically store questions and responses in a local SQLite database located at `~/.cbot_cache`\n\n- 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\n\n\n## Model Selection\n  \nYou can choose which Ollama model Cbot uses by passing one of these flags before your question:\n  \n- `-l32` : use `llama3.2` (default)  \n- `-ds`  : use `deepseek-r1`\n- `-oa`: use `openai o4-mini`\n  \nExample:\n  \n```\ncbot-cli -l32 -g \"List files in my home directory\"\ncbot-cli -ds -g \"Explain how a for loop works in Python\"\ncbot-cli -oa -g \"Who is the president of the United States?\"\n```\n\nYou 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.\n\n```\n$> cbot-cli -s nap \"pmset sleepnow\"\n   Saving shortcut nap, will return: pmset sleepnow\n$> cbot-cli -x nap\n   Sleeping now...\n```\n\nTo 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.\n\nCbot 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.\n\n```\n$> cbot-cli -g \"Who was the 23rd president?\"\n  Herbert Hoover\n$> cbot-cli -g \"What is the meaning of life?\"\n   42\n```\n\n## Agent Mode\n\nCbot includes an agent mode with persistent conversation memory using the **-a** flag. In agent mode, the AI maintains context across multiple interactions, remembering your conversation history even between sessions.\n\n```\n$> cbot-cli -a\n   Entering agent mode. Type 'exit' to end the agent chat.\n   Type 'clear' to clear conversation history.\nYou: What's my name?\nAgent: I don't have any information about your name from our conversation.\n\nYou: My name is John\nAgent: Nice to meet you, John! I'll remember that.\n\nYou: exit\n   Exiting chat mode.\n```\n\nWhen you restart agent mode later, it will remember previous conversations. Use `clear` to reset the conversation history if needed.\n\n#### Credits\n\n---\n\nForked by Roberto Delgado. \\\nThanks to Gregory Raiz for the original version. \\\nThis code is free to use under the MIT liscense.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A local-first CLI helper for productivity and automation.",
    "version": "0.1.8",
    "project_urls": {
        "Homepage": "https://github.com/roskideluge/cbot",
        "Issues": "https://github.com/roskideluge/cbot/issues",
        "Repository": "https://github.com/roskideluge/cbot"
    },
    "split_keywords": [
        "cli",
        " productivity",
        " automation",
        " local-first"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9b17e5917caef1ec3233f650b341e6676695b328a657599dfaebbaed104bffac",
                "md5": "810794eccf2e84984629d5075eaa0f53",
                "sha256": "10493581f023bf829ed54cf04a4a427c7293851fd51499f2f001949c1eb536f7"
            },
            "downloads": -1,
            "filename": "cbot_cli-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "810794eccf2e84984629d5075eaa0f53",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8552,
            "upload_time": "2025-07-25T23:21:26",
            "upload_time_iso_8601": "2025-07-25T23:21:26.139467Z",
            "url": "https://files.pythonhosted.org/packages/9b/17/e5917caef1ec3233f650b341e6676695b328a657599dfaebbaed104bffac/cbot_cli-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8186365eff411d7f40a6309fa6c30f075be2407b72cbb05da55bd7c59cbf180e",
                "md5": "9cbd8b192ff29f73352e913c77661342",
                "sha256": "746d2ec0a6eca648f003aff82c14f8e0b82d6eef33d8848a15819df9fcfc1360"
            },
            "downloads": -1,
            "filename": "cbot_cli-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "9cbd8b192ff29f73352e913c77661342",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8110,
            "upload_time": "2025-07-25T23:21:27",
            "upload_time_iso_8601": "2025-07-25T23:21:27.242316Z",
            "url": "https://files.pythonhosted.org/packages/81/86/365eff411d7f40a6309fa6c30f075be2407b72cbb05da55bd7c59cbf180e/cbot_cli-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-25 23:21:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "roskideluge",
    "github_project": "cbot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "pyperclip",
            "specs": []
        },
        {
            "name": "openai",
            "specs": []
        },
        {
            "name": "python-dotenv",
            "specs": []
        }
    ],
    "lcname": "cbot-cli"
}
        
Elapsed time: 0.44687s