Skip to main content

A powerful ReAct Python Assistant with AI capabilities

Project description

cyne CLI - Your AI Developer Assistant in the Terminal ๐Ÿš€

Python License Version

cyne-CLI is a powerful ReAct (Reasoning and Acting) Python assistant with AI capabilities, featuring Claude CLI-style tool displays, persistent task management, and professional terminal UI.

Made by Cynerza

โœจ Features

  • ๐Ÿค– AI-Powered Assistant - Advanced reasoning with LangGraph and OpenAI
  • ๐Ÿ“‹ Plan Management - Create, track, and complete tasks with strikethrough formatting
  • ๐Ÿ”ง Multiple Tools - Web search, file operations, bash commands, and more
  • ๐Ÿ’ญ Think Mode - Enhanced reasoning for complex problems
  • ๐ŸŽจ Rich Terminal UI - Beautiful formatting with colors and progress tracking
  • ๐Ÿ’พ Persistent Storage - Plans and session history automatically saved
  • ๐Ÿš€ Multiple Run Methods - CLI command or Python module execution

๐Ÿ“ฆ Installation

From PyPI (Recommended)

pip install cyne-cli

From Source (Development)

git clone https://github.com/Cynerza/cyne-cli.git
cd cyne-cli
pip install -e .

๐Ÿš€ Quick Start

Basic Usage

# Interactive mode
cyne

# Single prompt
cyne "Hello, how can you help me?"

# Think mode for complex reasoning
cyne --think "Analyze this complex problem"

# Show help
cyne --help

# Check version
cyne --version

Python Module Execution

# All commands work with module execution too
python3 -m cyne
python3 -m cyne "Hello world"
python3 -m cyne --think "Complex reasoning task"

๐Ÿ“‹ Plan Management

cyne-CLI includes a powerful plan tool for organizing and tracking tasks with visual progress indicators.

Creating Plans

# Create a plan with multiple tasks
cyne "Create a plan for building a website with tasks: Setup HTML, Add CSS, JavaScript functionality, Testing, Deployment"

Output:

โ€ข Website Project
Build a responsive website

  โ˜ Setup HTML structure
  โ˜ Add CSS styling  
  โ˜ JavaScript functionality
  โ˜ Testing across browsers
  โ˜ Deployment

Progress: 0/5 items completed (0.0%)

Managing Tasks

# Complete a task (adds strikethrough)
cyne "Complete the HTML setup task"

# Add new tasks
cyne "Add a new task: Add responsive design"

# View all plans
cyne "List all my plans"

# Show specific plan
cyne "Show me the website project plan"

Completed tasks show with strikethrough:

โ€ข Website Project
Build a responsive website

  โ˜‘ Setup HTML structure        # โœ… Completed with strikethrough
  โ˜ Add CSS styling
  โ˜ JavaScript functionality
  โ˜ Testing across browsers
  โ˜ Deployment

Progress: 1/5 items completed (20.0%)

Plan Tool Commands

# Direct plan tool usage
cyne "Use plan tool to: create plan \"Project Name\" \"Description\" [\"Task 1\", \"Task 2\"]"
cyne "Use plan tool to: complete item plan_id item_id"
cyne "Use plan tool to: add item plan_id \"New task\""
cyne "Use plan tool to: list plans"

๐Ÿ› ๏ธ Available Tools

Core Tools

  • ๐Ÿง  Think Tool - Advanced reasoning and problem analysis
  • ๐Ÿ“‹ Plan Tool - Task management with progress tracking
  • ๐Ÿ” Web Search - Real-time information retrieval with Brave Search
  • ๐Ÿ“ File Operations - Read, write, and edit files with permission system
  • ๐Ÿ’ป Bash Commands - Execute system commands safely
  • โœ๏ธ File Editing - Smart file editing with diff previews

Tool Examples

# Web search
cyne "Search for latest Python best practices"

# File operations
cyne "Read the config.json file and explain its structure"
cyne "Create a new Python script for data processing"

# System commands
cyne "Check disk usage and system status"

# Complex reasoning
cyne --think "Analyze the pros and cons of different deployment strategies"

๐Ÿ“Š Session Management

History & Statistics

# View session history
cyne --history

# Show usage statistics
cyne --stats

# Resume previous conversation
cyne "Resume our last conversation about the website project"

Data Storage

  • Plans: .cyne_data/plans.json - All task plans and progress
  • Sessions: Stored in memory during runtime
  • Configuration: Automatic environment detection

๐ŸŽฏ Usage Examples

Development Workflow

# 1. Create project plan
cyne "Create a plan for building a Python web scraper with tasks: Setup environment, Design data model, Implement scraper, Add error handling, Write tests, Documentation"

# 2. Work through tasks
cyne "Complete the environment setup task"
cyne "Help me implement the data model for the scraper"

# 3. Track progress
cyne "Show my scraper project progress"

Learning & Research

# Complex analysis with think mode
cyne --think "Explain the differences between async/await and threading in Python, with practical examples"

# Research with web search
cyne "Find the latest best practices for FastAPI development"

# Create learning plan
cyne "Create a learning plan for mastering React with tasks: JSX basics, Components, State management, Hooks, Routing, Testing"

System Administration

# System monitoring
cyne "Check system resources and suggest optimizations"

# File management
cyne "Organize the Downloads folder by file type"

# Documentation
cyne "Create documentation for this Python project based on the code structure"

โš™๏ธ Configuration

Using cyne API (Recommended)

For the best experience, use the official cyne API:

  1. Get API Key: Visit cyne.com and create an API key in Settings
  2. Create Environment File: Create a .env file with your configuration:
# LiteLLM Proxy Configuration
CUSTOM_API_KEY=nut-xxxxxxxxxxxxxxxx
CUSTOM_BASE_URL=https://api-prod.cyne.com
CUSTOM_MODELS=cyne

# Enable custom provider
PROVIDERS=custom
  1. Run with Environment: Use the -e flag to specify your environment file:
cyne -e .env "Your query here"

Alternative: OpenAI API

# Optional: Custom API endpoints
export OPENAI_API_BASE="https://your-api-endpoint.com/"
export OPENAI_API_KEY="your-api-key"

Command Line Options

cyne --help                    # Show all options
cyne --think                   # Enable think mode
cyne --test                    # Run test queries
cyne --history                 # Manage session history
cyne --stats                   # Show usage statistics
cyne --version                 # Show version info

๐ŸŽจ Rich Terminal UI

cyne-CLI provides a beautiful terminal experience with:

  • ๐ŸŽจ Syntax highlighting for code and diffs
  • ๐Ÿ“Š Progress bars for task completion
  • โœ… Strikethrough formatting for completed tasks
  • ๐Ÿ”ง Claude CLI-style tool call displays
  • ๐Ÿ“ฑ Responsive layout that adapts to terminal size

๐Ÿ—๏ธ Architecture

Package Structure

cyne/
โ”œโ”€โ”€ __init__.py              # Package initialization
โ”œโ”€โ”€ __main__.py              # Module execution entry point
โ”œโ”€โ”€ cli.py                   # Command-line interface
โ”œโ”€โ”€ core/                    # Core functionality
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ agent_manager.py     # Agent creation and management
โ”‚   โ”œโ”€โ”€ session_history.py  # Session persistence
โ”‚   โ””โ”€โ”€ prompt_system.py    # System prompts and plan integration
โ””โ”€โ”€ tools/                   # Available tools
    โ”œโ”€โ”€ __init__.py
    โ”œโ”€โ”€ plan_tool.py         # Task management with Rich UI
    โ”œโ”€โ”€ brave_search_tool.py # Web search functionality
    โ”œโ”€โ”€ file_read_tool.py    # File reading operations
    โ”œโ”€โ”€ file_write_tool.py   # File writing with previews
    โ”œโ”€โ”€ file_edit_tool.py    # File editing with diffs
    โ”œโ”€โ”€ bash_run_tool.py     # System command execution
    โ””โ”€โ”€ think_tool.py        # Advanced reasoning

Data Storage

.cyne_data/
โ””โ”€โ”€ plans.json               # Persistent plan storage

Technology Stack

  • LangGraph 0.6.2 - Agent orchestration and state management
  • LangChain - LLM integration and tool management
  • Rich 14.1.0 - Beautiful terminal UI with formatting
  • Pydantic - Data validation and settings
  • OpenAI/Compatible APIs - Language model inference

๐Ÿงช Development

Setting Up Development Environment

# Clone repository
git clone https://github.com/Cynerza/cyne-cli.git
cd cyne-cli

# Install in development mode
pip install -e .

# Run tests
python -m pytest

# Run with development logging
cyne --debug "Test message"

Adding New Tools

  1. Create tool class in cyne/tools/ following the pattern:
from langchain.tools import BaseTool
from pydantic import Field

class MyCustomTool(BaseTool):
    name: str = "my_custom_tool"
    description: str = "Description of what the tool does"
    
    def _run(self, query: str) -> str:
        # Tool implementation
        return result
  1. Add to cyne/tools/__init__.py:
from .my_custom_tool import MyCustomTool
__all__ = [..., "MyCustomTool"]
  1. Import in cyne/core/agent_manager.py and add to tools list

Extending Plan Tool

The plan tool supports rich formatting and persistence:

# Custom plan actions
plan_manager = PlanManager()
plan_id = plan_manager.create_plan("My Plan", "Description", ["Task 1", "Task 2"])
plan_manager.complete_item(plan_id, "item_1")

๐Ÿค Contributing

  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

Development Guidelines

  • Follow PEP 8 style guidelines
  • Add type hints to all functions
  • Write docstrings for public methods
  • Add tests for new functionality
  • Update documentation for new features

๐Ÿ› Troubleshooting

Common Issues

Installation Problems

# If pip install fails, try upgrading pip
pip install --upgrade pip
pip install -e .

Missing API Keys

# Set OpenAI API key
export OPENAI_API_KEY="your-key-here"

# Verify configuration
cyne "Test API connection"

Permission Errors

# Check file permissions
ls -la ~/.cyne_data/

# Reset permissions if needed
chmod 755 ~/.cyne_data/
chmod 644 ~/.cyne_data/plans.json

Debug Mode

# Enable debug logging
cyne --debug "Your query here"

# View detailed error information
cyne --verbose "Your query here"

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support

๐Ÿš€ Roadmap

Upcoming Features

  • ๐Ÿ“ฑ Mobile companion app - Control cyne from your phone
  • ๐Ÿ”Œ Plugin system - Community-driven tool ecosystem
  • ๐ŸŒ Web interface - Browser-based interaction
  • ๐Ÿ“Š Analytics dashboard - Usage insights and productivity metrics
  • ๐Ÿค Team collaboration - Shared plans and project management
  • ๐Ÿ”„ CI/CD integration - Automated workflows and deployments

Version History

  • v1.0.0 - Initial release with plan tool and Rich UI
  • v0.9.0 - Claude CLI-style tool displays
  • v0.8.0 - Package structure and pip distribution
  • v0.7.0 - Think mode and advanced reasoning

Made with โค๏ธ by Cynerza | Explore cynerza.com | Visit cyne.com

Empowering developers with AI-assisted productivity

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

cyne_cli-1.0.0.tar.gz (58.0 kB view details)

Uploaded Source

Built Distribution

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

cyne_cli-1.0.0-py3-none-any.whl (54.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cyne_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 129fdf019ad617223b712e047be4774af35fd3fe34d2d980ca30887a269b80d7
MD5 3aaab96de1b18ec1e05a95394c4a4e1b
BLAKE2b-256 24e236715b28e0b6d743518ae6d7877135d412b90a37c7212b41f6cd7e8b1fd7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cyne_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 558bafdb636a15b8634c42eb6c778d1f5ccbb9263f8d570cb97f11897c6bca5d
MD5 432acb2fd113111fe50919e4b2b9103a
BLAKE2b-256 742fae9130adc9c9a645bbef9eecdfb4b007af14bbbbe79a64a4380c6feda0d9

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