Skip to main content

A beautiful and feature-rich AI-powered CLI chatbot using Google Gemini

Project description

๐Ÿค– NexShell - AI-Powered CLI Chatbot

Python Version License: MIT Powered by Gemini

A beautiful, feature-rich, and intelligent AI-powered CLI chatbot using Google Gemini 2.5 Flash.

NexShell Demo

โœจ Features

๐ŸŽจ Beautiful Interface

  • Colorful and animated terminal UI
  • Smooth loading animations
  • Typing effect for bot responses
  • Color-coded syntax highlighting

๐Ÿค– Multi-Mode AI System

  • Normal Mode - Balanced responses for general chat
  • Code Mode - Expert programming assistance
  • Creative Mode - Artistic and imaginative responses
  • Concise Mode - Brief, to-the-point answers

๐Ÿ’ป System Integration

  • Execute system commands directly from chat
  • View real-time session statistics
  • Auto-save conversations to files
  • Cross-platform support (Windows, Linux, Mac)

๐Ÿš€ Advanced Features

  • Context-aware conversations
  • Chat history management
  • Word and message counting
  • Session duration tracking
  • Comprehensive help system

๐Ÿ“ฆ Installation

Quick Install

pip install nexshell

From Source

git clone https://github.com/yourusername/nexshell.git
cd nexshell
pip install -e .

For detailed installation instructions, see INSTALL.md

๐Ÿ”‘ Setup

  1. Get your Gemini API key from Google AI Studio

  2. Set your API key:

    # Windows PowerShell
    $env:GEMINI_API_KEY = "your_api_key_here"
    
    # Linux/Mac
    export GEMINI_API_KEY="your_api_key_here"
    
  3. Run NexShell:

    nexshell
    

๐ŸŽฎ Usage

Quick Start

nexshell

๐Ÿ’ก Commands

Command Description
/mode [type] Switch AI mode (normal/code/creative/concise)
/cmd [command] Execute system commands
/save Export conversation to file
/stats View session statistics
/history Show conversation summary
/clear Clear conversation history
/help Display help information
/exit or /quit Exit NexShell

๏ฟฝ AI Modes

  • ๐Ÿค– Normal - Balanced AI for general conversations
  • ๐Ÿ’ป Code - Programming expert with detailed examples
  • ๐ŸŽจ Creative - Imaginative and artistic responses
  • โšก Concise - Brief, bullet-point answers

๐Ÿ“ Example Session

[normal] You โ–บ /mode code
โœ“ Switched to ๐Ÿ’ป Code Assistant Mode

[code] You โ–บ How do I read a file in Python?

NexShell โ–บ Here's how to read a file in Python:

```python
# Method 1: Using with statement (recommended)
with open('file.txt', 'r') as file:
    content = file.read()
    print(content)

# Method 2: Read line by line
with open('file.txt', 'r') as file:
    for line in file:
        print(line.strip())

[code] You โ–บ /cmd python --version โš™๏ธ Executing: python --version Python 3.11.0

[code] You โ–บ /stats

๐Ÿ“Š Session Statistics โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿค– Current Mode: ๐Ÿ’ป Code Assistant Mode ๐Ÿ’ฌ Messages Exchanged: 3 ๐Ÿ“ Total Words: 156 โฑ๏ธ Session Duration: 2m 34s


## ๐Ÿ”ง Configuration

NexShell uses:
- **Model**: Google Gemini 2.5 Flash
- **Features**: Multi-turn conversations, context awareness, code execution
- **Customization**: Modify `nexshell/cli.py` for advanced settings

## ๐Ÿ“ฆ Project Structure

nexshell/ โ”œโ”€โ”€ nexshell/ โ”‚ โ”œโ”€โ”€ init.py # Package initialization โ”‚ โ””โ”€โ”€ cli.py # Main chatbot application โ”œโ”€โ”€ .env.example # Example environment file โ”œโ”€โ”€ .gitignore # Git ignore rules โ”œโ”€โ”€ LICENSE # MIT License โ”œโ”€โ”€ MANIFEST.in # Package manifest โ”œโ”€โ”€ README.md # This file โ”œโ”€โ”€ INSTALL.md # Detailed installation guide โ”œโ”€โ”€ requirements.txt # Python dependencies โ”œโ”€โ”€ setup.py # Package setup script โ””โ”€โ”€ pyproject.toml # Modern Python packaging


## ๐Ÿ›ก๏ธ Security

- โœ… API keys stored in environment variables
- โœ… No sensitive data in code
- โœ… `.gitignore` protects credentials
- โœ… Secure command execution with timeout
- โš ๏ธ Never share your API key publicly

## ๐Ÿค Contributing

Contributions are welcome! Here's how:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## ๐Ÿ› Bug Reports & Feature Requests

- ๐Ÿ› [Report bugs](https://github.com/yourusername/nexshell/issues)
- ๐Ÿ’ก [Request features](https://github.com/yourusername/nexshell/issues)
- ๐Ÿ’ฌ [Join discussions](https://github.com/yourusername/nexshell/discussions)

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐ŸŒŸ Star History

If you find NexShell useful, please consider giving it a star! โญ

## ๐Ÿ™ Acknowledgments

- Powered by [Google Gemini 2.5 Flash](https://ai.google.dev/)
- Built with Python ๐Ÿ
- Inspired by modern CLI tools
- Made with โค๏ธ by the community

## ๐Ÿ“ž Support

- ๐Ÿ“– [Documentation](https://github.com/yourusername/nexshell#readme)
- ๐Ÿ’ฌ [Community Chat](https://discord.gg/nexshell)
- ๐Ÿ“ง Email: support@nexshell.dev
- ๐Ÿฆ Twitter: [@nexshell](https://twitter.com/nexshell)

---

<div align="center">

**โญ Star us on GitHub โ€” it motivates us a lot! โญ**

[Website](https://nexshell.dev) โ€ข [Documentation](https://docs.nexshell.dev) โ€ข [Blog](https://blog.nexshell.dev)

Made with ๏ฟฝ by developers, for developers

</div>

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

nexshell-1.0.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

nexshell-1.0.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file nexshell-1.0.0.tar.gz.

File metadata

  • Download URL: nexshell-1.0.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for nexshell-1.0.0.tar.gz
Algorithm Hash digest
SHA256 831bc0c6d1f6f51cd0cb8e1fa1cdab88b6a01053761c22bbb58b6cc75ecfdaf1
MD5 0e0f67cd3d56c4cb02da76ab4a22a893
BLAKE2b-256 06db2c8ffea1412083ba0b31c44e83638a5c09a2dacb3add014d8e87bff3fe76

See more details on using hashes here.

File details

Details for the file nexshell-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nexshell-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for nexshell-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa9f3812203b2b8a5556e21260fc0ceed520f85a51ead93116854620506c5826
MD5 a7578f761e223115a93de0a8a2165373
BLAKE2b-256 30a2da404cbf18a1a8d4f93d303d8f74364f2d5076c6cc0e3bfedaa20d197938

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