Skip to main content

A powerful CLI agent for system automation and file management.

Project description

ChatShell: Your AI-Powered Terminal Assistant

ChatShell is an intelligent AI assistant designed to streamline your terminal interactions, especially for server deployment and automation tasks. It operates with root permissions, allowing it to execute shell commands (with your explicit confirmation for safety), read and write files, and maintain a persistent chat history across sessions. ChatShell is flexible, supporting both OpenAI/ChatGPT and Google Gemini as its underlying AI model.

Features

  • Intelligent Command Execution: Safely execute shell commands with user confirmation.
  • File System Interaction: Read and write files to manage code, configurations, and data.
  • Persistent Chat History: Maintains conversation context across sessions for a seamless experience.
  • Configurable AI Model: Easily switch between OpenAI/ChatGPT and Google Gemini, with simple API key and model name setup.
  • Modular Architecture: Built with a clean, modular design using sub-agents for specific tasks like command execution and file I/O.

Installation

You can install ChatShell as a Python package using pip.

pip install chatshell

Configuration

Upon its first run, ChatShell will guide you through a one-time setup process to configure your AI model (ChatGPT or Gemini), API key, and desired model name. This configuration is saved in ~/.chatshell/config.json.

You can also set your API keys as environment variables:

  • For OpenAI/ChatGPT: OPENAI_API_KEY
  • For Gemini: GEMINI_API_KEY

Usage

Once installed, you can launch ChatShell directly from your terminal:

chatshell

Basic Interaction

ChatShell acts like a conversational terminal. You can ask it to perform tasks, run commands, or read/write files.

You: List all files in the current directory.
ChatShell: Do you want to Execute `dir`? (Y/N)
You: Y
ChatShell: (output of `dir` command)

Example Commands

  • Read a file:
    You: Read the content of `my_script.py`
    
  • Write to a file:
    You: Write "Hello, World!" to `output.txt`
    
  • Execute a shell command:
    You: Update the system packages.
    ChatShell: Do you want to Execute `sudo apt update && sudo apt upgrade -y`? (Y/N)
    You: Y
    

Exiting ChatShell

To exit the ChatShell session, simply type exit or quit:

You: exit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nuralshell-0.1.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nuralshell-0.1.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file nuralshell-0.1.1.tar.gz.

File metadata

  • Download URL: nuralshell-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for nuralshell-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8cc1781c180f5493cc714716234b1b5f17a191666bf2c42716806bddac0e3add
MD5 c75a28a31ae1eb95b7c46b45ca432c09
BLAKE2b-256 4c8cdde27a5d1884f41e32a5ae043e34f749bf577df12d35e3fd9a6f228cf630

See more details on using hashes here.

File details

Details for the file nuralshell-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nuralshell-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for nuralshell-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 696a2102f01e0988f279439a3c57b4507ee97d9003ced489dc5b4627a58f0c27
MD5 2532343e66285c7aa8e3a9fceb8f75ee
BLAKE2b-256 6f3a28dcbbb34b0edd8c9b7a5c99bf0d7acda74cfc3b6a0012892379ca3e0165

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page