hanzo-cli


Namehanzo-cli JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryUnified CLI for Hanzo AI - Local, Private, Free AI Infrastructure
upload_time2025-07-26 02:46:49
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords agents ai cli hanzo llm local-ai mcp private-ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Hanzo CLI

Unified command-line interface for Hanzo AI - Local, Private, Free AI Infrastructure.

## Features

- 🤖 **AI Chat** - Interactive chat with multiple LLM providers
- 🛠️ **MCP Tools** - Access to 70+ Model Context Protocol tools
- 🌐 **Agent Networks** - Distributed AI agent orchestration
- ⛏️ **Mining** - Contribute compute and earn rewards
- 🔐 **Authentication** - Secure access with Hanzo IAM
- 📊 **Monitoring** - Real-time cluster and agent status
- 🎨 **Beautiful UI** - Rich terminal interface with syntax highlighting

## Installation

```bash
# Basic installation
pip install hanzo

# With all features
pip install hanzo[all]

# With specific features
pip install hanzo[repl]     # Interactive REPL
pip install hanzo[cluster]  # Local AI cluster
pip install hanzo[network]  # Agent networks
```

## Quick Start

### Authentication

```bash
# Login with email/password
hanzo auth login

# Use API key
export HANZO_API_KEY=your-key
hanzo auth status
```

### AI Chat

```bash
# Interactive chat
hanzo chat

# Quick question
hanzo ask "What is the capital of France?"

# With specific model
hanzo chat --model claude-3.5-sonnet

# Start REPL (like Claude Code)
hanzo chat --repl
```

### Local AI Cluster

```bash
# Start local cluster
hanzo serve

# Or with options
hanzo cluster start --models llama-3.2-3b --port 8000

# Check status
hanzo cluster status

# Start as node
hanzo cluster node start --blockchain --network
```

### MCP Tools

```bash
# List available tools
hanzo mcp tools

# Run a tool
hanzo mcp run read_file --arg file_path=README.md

# Start MCP server
hanzo mcp serve

# Install in Claude Desktop
hanzo mcp install
```

### Agent Networks

```bash
# Dispatch work to network
hanzo network dispatch "Analyze this codebase and suggest improvements"

# Start local swarm
hanzo network swarm --agents 5

# List available agents
hanzo network agents
```

### Mining

```bash
# Start mining
hanzo miner start --wallet 0x... --models llama-3.2-3b

# Check earnings
hanzo miner earnings --wallet 0x...

# View leaderboard
hanzo miner leaderboard
```

## Configuration

### Environment Variables

```bash
# API Keys
export HANZO_API_KEY=your-hanzo-key
export ANTHROPIC_API_KEY=your-anthropic-key
export OPENAI_API_KEY=your-openai-key

# Preferences
export HANZO_DEFAULT_MODEL=claude-3.5-sonnet
export HANZO_USE_LOCAL=true
```

### Configuration File

```bash
# Initialize config
hanzo config init

# Set values
hanzo config set default_model claude-3.5-sonnet
hanzo config set mcp.allowed_paths /home/user/projects

# View config
hanzo config show
```

## Advanced Usage

### Interactive REPL

The REPL provides direct access to all MCP tools and AI capabilities:

```bash
# Start REPL
hanzo repl start

# With IPython interface
hanzo repl start --ipython

# With TUI interface
hanzo repl start --tui
```

In the REPL:
```python
# Direct tool access
>>> read_file(file_path="config.json")
>>> search(query="TODO", path=".")

# Chat with AI
>>> chat("Create a FastAPI server with authentication")

# AI uses tools automatically
>>> chat("Find all Python files and create a dependency graph")
```

### Tool Management

```bash
# Install custom tools
hanzo tools install my-tool

# Create new tool
hanzo tools create my-custom-tool

# List installed tools
hanzo tools list --installed
```

### Dashboard

```bash
# Start interactive dashboard
hanzo dashboard
```

## Command Reference

### Main Commands

- `hanzo auth` - Authentication management
- `hanzo chat` - Interactive AI chat
- `hanzo cluster` - Local AI cluster management
- `hanzo mcp` - Model Context Protocol tools
- `hanzo agent` - Agent management
- `hanzo network` - Agent network operations
- `hanzo miner` - Mining operations
- `hanzo tools` - Tool management
- `hanzo config` - Configuration management
- `hanzo repl` - Interactive REPL

### Quick Aliases

- `hanzo ask <question>` - Quick AI question
- `hanzo serve` - Start local cluster
- `hanzo dashboard` - Open dashboard

## Examples

### Complex Workflows

```bash
# Analyze project and create documentation
hanzo network dispatch "Analyze this Python project and create comprehensive documentation" --agents 3

# Start mining with specific configuration
hanzo miner start --wallet 0x123... --models "llama-3.2-3b,mistral-7b" --min-stake 100

# Create and deploy an agent
hanzo agent create researcher --model gpt-4
hanzo agent start researcher --task "Research best practices for API security"
```

### Integration with Other Tools

```bash
# Use with pipes
echo "Explain this error" | hanzo chat --once

# Process files
find . -name "*.py" | xargs hanzo mcp run analyze_code

# Combine with jq
hanzo network jobs --json | jq '.[] | select(.status=="completed")'
```

## Troubleshooting

### Common Issues

1. **No LLM provider configured**
   ```bash
   export ANTHROPIC_API_KEY=your-key
   # or
   hanzo auth login
   ```

2. **Local cluster not running**
   ```bash
   hanzo cluster start
   # or
   hanzo serve
   ```

3. **Permission denied for MCP tools**
   ```bash
   hanzo config set mcp.allowed_paths /path/to/allow
   ```

### Debug Mode

```bash
# Enable debug output
export HANZO_DEBUG=true
hanzo chat

# Verbose logging
hanzo --verbose chat
```

## Contributing

See the main [Hanzo Python SDK](https://github.com/hanzoai/python-sdk) repository.

## License

BSD-3-Clause - see LICENSE file for details.
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "hanzo-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "agents, ai, cli, hanzo, llm, local-ai, mcp, private-ai",
    "author": null,
    "author_email": "Hanzo AI <dev@hanzo.ai>",
    "download_url": "https://files.pythonhosted.org/packages/c9/21/ccd766080d41bbefeb9b39ddf7c816db049ecffcb2021f6fa3301a26e4a5/hanzo_cli-0.1.0.tar.gz",
    "platform": null,
    "description": "# Hanzo CLI\n\nUnified command-line interface for Hanzo AI - Local, Private, Free AI Infrastructure.\n\n## Features\n\n- \ud83e\udd16 **AI Chat** - Interactive chat with multiple LLM providers\n- \ud83d\udee0\ufe0f **MCP Tools** - Access to 70+ Model Context Protocol tools\n- \ud83c\udf10 **Agent Networks** - Distributed AI agent orchestration\n- \u26cf\ufe0f **Mining** - Contribute compute and earn rewards\n- \ud83d\udd10 **Authentication** - Secure access with Hanzo IAM\n- \ud83d\udcca **Monitoring** - Real-time cluster and agent status\n- \ud83c\udfa8 **Beautiful UI** - Rich terminal interface with syntax highlighting\n\n## Installation\n\n```bash\n# Basic installation\npip install hanzo\n\n# With all features\npip install hanzo[all]\n\n# With specific features\npip install hanzo[repl]     # Interactive REPL\npip install hanzo[cluster]  # Local AI cluster\npip install hanzo[network]  # Agent networks\n```\n\n## Quick Start\n\n### Authentication\n\n```bash\n# Login with email/password\nhanzo auth login\n\n# Use API key\nexport HANZO_API_KEY=your-key\nhanzo auth status\n```\n\n### AI Chat\n\n```bash\n# Interactive chat\nhanzo chat\n\n# Quick question\nhanzo ask \"What is the capital of France?\"\n\n# With specific model\nhanzo chat --model claude-3.5-sonnet\n\n# Start REPL (like Claude Code)\nhanzo chat --repl\n```\n\n### Local AI Cluster\n\n```bash\n# Start local cluster\nhanzo serve\n\n# Or with options\nhanzo cluster start --models llama-3.2-3b --port 8000\n\n# Check status\nhanzo cluster status\n\n# Start as node\nhanzo cluster node start --blockchain --network\n```\n\n### MCP Tools\n\n```bash\n# List available tools\nhanzo mcp tools\n\n# Run a tool\nhanzo mcp run read_file --arg file_path=README.md\n\n# Start MCP server\nhanzo mcp serve\n\n# Install in Claude Desktop\nhanzo mcp install\n```\n\n### Agent Networks\n\n```bash\n# Dispatch work to network\nhanzo network dispatch \"Analyze this codebase and suggest improvements\"\n\n# Start local swarm\nhanzo network swarm --agents 5\n\n# List available agents\nhanzo network agents\n```\n\n### Mining\n\n```bash\n# Start mining\nhanzo miner start --wallet 0x... --models llama-3.2-3b\n\n# Check earnings\nhanzo miner earnings --wallet 0x...\n\n# View leaderboard\nhanzo miner leaderboard\n```\n\n## Configuration\n\n### Environment Variables\n\n```bash\n# API Keys\nexport HANZO_API_KEY=your-hanzo-key\nexport ANTHROPIC_API_KEY=your-anthropic-key\nexport OPENAI_API_KEY=your-openai-key\n\n# Preferences\nexport HANZO_DEFAULT_MODEL=claude-3.5-sonnet\nexport HANZO_USE_LOCAL=true\n```\n\n### Configuration File\n\n```bash\n# Initialize config\nhanzo config init\n\n# Set values\nhanzo config set default_model claude-3.5-sonnet\nhanzo config set mcp.allowed_paths /home/user/projects\n\n# View config\nhanzo config show\n```\n\n## Advanced Usage\n\n### Interactive REPL\n\nThe REPL provides direct access to all MCP tools and AI capabilities:\n\n```bash\n# Start REPL\nhanzo repl start\n\n# With IPython interface\nhanzo repl start --ipython\n\n# With TUI interface\nhanzo repl start --tui\n```\n\nIn the REPL:\n```python\n# Direct tool access\n>>> read_file(file_path=\"config.json\")\n>>> search(query=\"TODO\", path=\".\")\n\n# Chat with AI\n>>> chat(\"Create a FastAPI server with authentication\")\n\n# AI uses tools automatically\n>>> chat(\"Find all Python files and create a dependency graph\")\n```\n\n### Tool Management\n\n```bash\n# Install custom tools\nhanzo tools install my-tool\n\n# Create new tool\nhanzo tools create my-custom-tool\n\n# List installed tools\nhanzo tools list --installed\n```\n\n### Dashboard\n\n```bash\n# Start interactive dashboard\nhanzo dashboard\n```\n\n## Command Reference\n\n### Main Commands\n\n- `hanzo auth` - Authentication management\n- `hanzo chat` - Interactive AI chat\n- `hanzo cluster` - Local AI cluster management\n- `hanzo mcp` - Model Context Protocol tools\n- `hanzo agent` - Agent management\n- `hanzo network` - Agent network operations\n- `hanzo miner` - Mining operations\n- `hanzo tools` - Tool management\n- `hanzo config` - Configuration management\n- `hanzo repl` - Interactive REPL\n\n### Quick Aliases\n\n- `hanzo ask <question>` - Quick AI question\n- `hanzo serve` - Start local cluster\n- `hanzo dashboard` - Open dashboard\n\n## Examples\n\n### Complex Workflows\n\n```bash\n# Analyze project and create documentation\nhanzo network dispatch \"Analyze this Python project and create comprehensive documentation\" --agents 3\n\n# Start mining with specific configuration\nhanzo miner start --wallet 0x123... --models \"llama-3.2-3b,mistral-7b\" --min-stake 100\n\n# Create and deploy an agent\nhanzo agent create researcher --model gpt-4\nhanzo agent start researcher --task \"Research best practices for API security\"\n```\n\n### Integration with Other Tools\n\n```bash\n# Use with pipes\necho \"Explain this error\" | hanzo chat --once\n\n# Process files\nfind . -name \"*.py\" | xargs hanzo mcp run analyze_code\n\n# Combine with jq\nhanzo network jobs --json | jq '.[] | select(.status==\"completed\")'\n```\n\n## Troubleshooting\n\n### Common Issues\n\n1. **No LLM provider configured**\n   ```bash\n   export ANTHROPIC_API_KEY=your-key\n   # or\n   hanzo auth login\n   ```\n\n2. **Local cluster not running**\n   ```bash\n   hanzo cluster start\n   # or\n   hanzo serve\n   ```\n\n3. **Permission denied for MCP tools**\n   ```bash\n   hanzo config set mcp.allowed_paths /path/to/allow\n   ```\n\n### Debug Mode\n\n```bash\n# Enable debug output\nexport HANZO_DEBUG=true\nhanzo chat\n\n# Verbose logging\nhanzo --verbose chat\n```\n\n## Contributing\n\nSee the main [Hanzo Python SDK](https://github.com/hanzoai/python-sdk) repository.\n\n## License\n\nBSD-3-Clause - see LICENSE file for details.",
    "bugtrack_url": null,
    "license": null,
    "summary": "Unified CLI for Hanzo AI - Local, Private, Free AI Infrastructure",
    "version": "0.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/hanzoai/python-sdk/issues",
        "Changelog": "https://github.com/hanzoai/python-sdk/blob/main/pkg/hanzo-cli/CHANGELOG.md",
        "Documentation": "https://docs.hanzo.ai/cli",
        "Homepage": "https://hanzo.ai",
        "Repository": "https://github.com/hanzoai/python-sdk"
    },
    "split_keywords": [
        "agents",
        " ai",
        " cli",
        " hanzo",
        " llm",
        " local-ai",
        " mcp",
        " private-ai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f72da97279cc3c3e1057f17221d2d12378932a8d92d50b03e2847cb8a01c3f12",
                "md5": "4ba562674ebf4a9a9fe648f0289cdc94",
                "sha256": "3e8697dd10da1616f1061dcf389f699cd30347d59ea4fb9ea846a11dcfeb6064"
            },
            "downloads": -1,
            "filename": "hanzo_cli-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4ba562674ebf4a9a9fe648f0289cdc94",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 37258,
            "upload_time": "2025-07-26T02:46:48",
            "upload_time_iso_8601": "2025-07-26T02:46:48.264345Z",
            "url": "https://files.pythonhosted.org/packages/f7/2d/a97279cc3c3e1057f17221d2d12378932a8d92d50b03e2847cb8a01c3f12/hanzo_cli-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c921ccd766080d41bbefeb9b39ddf7c816db049ecffcb2021f6fa3301a26e4a5",
                "md5": "5bd93ca77578684f48f4a098442fae6a",
                "sha256": "006e7e6938fc8433c10031af52c0363987916af32cc417487013abb75dd90610"
            },
            "downloads": -1,
            "filename": "hanzo_cli-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5bd93ca77578684f48f4a098442fae6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 27164,
            "upload_time": "2025-07-26T02:46:49",
            "upload_time_iso_8601": "2025-07-26T02:46:49.222413Z",
            "url": "https://files.pythonhosted.org/packages/c9/21/ccd766080d41bbefeb9b39ddf7c816db049ecffcb2021f6fa3301a26e4a5/hanzo_cli-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-26 02:46:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hanzoai",
    "github_project": "python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hanzo-cli"
}
        
Elapsed time: 1.79020s