Metadata-Version: 2.4
Name: tafysh
Version: 0.2.0
Summary: AI-enhanced terminal shell with LLM-powered capabilities
Project-URL: Homepage, https://github.com/TafyLabs/TafySH
Project-URL: Documentation, https://github.com/TafyLabs/TafySH/tree/main/docs
Project-URL: Repository, https://github.com/TafyLabs/TafySH
Project-URL: Issues, https://github.com/TafyLabs/TafySH/issues
Author-email: Bobby Larson <bobby@tafy.ai>
License: Apache-2.0
License-File: LICENSE
Keywords: agent,ai,automation,llm,shell,terminal
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Shells
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Requires-Dist: anthropic>=0.28.0
Requires-Dist: langchain-anthropic>=0.1.0
Requires-Dist: langchain-core>=0.2.0
Requires-Dist: langchain-openai>=0.1.0
Requires-Dist: langgraph>=0.2.0
Requires-Dist: openai>=1.3.0
Requires-Dist: prompt-toolkit>=3.0
Requires-Dist: ptyprocess>=0.7.0
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: structlog>=24.0
Provides-Extra: all
Requires-Dist: bandit>=1.7; extra == 'all'
Requires-Dist: black>=23.0; extra == 'all'
Requires-Dist: chromadb>=0.4.0; extra == 'all'
Requires-Dist: fabric>=3.0; extra == 'all'
Requires-Dist: mypy>=1.5; extra == 'all'
Requires-Dist: paramiko>=3.0; extra == 'all'
Requires-Dist: pip-audit>=2.6.0; extra == 'all'
Requires-Dist: pre-commit>=3.0; extra == 'all'
Requires-Dist: prometheus-client>=0.17.0; extra == 'all'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'all'
Requires-Dist: pytest-cov>=4.0; extra == 'all'
Requires-Dist: pytest-mock>=3.10; extra == 'all'
Requires-Dist: pytest>=7.0; extra == 'all'
Requires-Dist: ruff>=0.1.0; extra == 'all'
Requires-Dist: safety>=2.3.0; extra == 'all'
Requires-Dist: sentence-transformers>=2.2.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: bandit>=1.7; extra == 'dev'
Requires-Dist: black>=23.0; extra == 'dev'
Requires-Dist: mypy>=1.5; extra == 'dev'
Requires-Dist: pip-audit>=2.6.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.10; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Requires-Dist: safety>=2.3.0; extra == 'dev'
Provides-Extra: metrics
Requires-Dist: prometheus-client>=0.17.0; extra == 'metrics'
Provides-Extra: robotics
Provides-Extra: ssh
Requires-Dist: fabric>=3.0; extra == 'ssh'
Requires-Dist: paramiko>=3.0; extra == 'ssh'
Provides-Extra: vector
Requires-Dist: chromadb>=0.4.0; extra == 'vector'
Requires-Dist: sentence-transformers>=2.2.0; extra == 'vector'
Description-Content-Type: text/markdown

# TafySH

**AI-Enhanced Terminal Shell with LLM-Powered Capabilities**

TafySH wraps traditional shells (Bash/Zsh/Fish) with intelligent features:

- Natural language to command translation
- Multi-step autonomous task execution
- Multi-device orchestration (servers, robots, IoT)
- Strong security with human-in-the-loop
- Memory and context management

## Installation

Requires [uv](https://docs.astral.sh/uv/) for dependency management.

```bash
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# From PyPI (when released)
uv pip install tafysh

# From source
git clone https://github.com/TafyLabs/TafySH.git
cd TafySH
uv sync
uv pip install -e ".[dev]"
```

## Quick Start

```bash
# Set your API key
export ANTHROPIC_API_KEY="your-key-here"

# Start TafySH
uv run tafysh

# Or with custom config
uv run tafysh --config ~/.tafysh/config.yaml
```

## Usage

Inside the TafySH shell:

```bash
# Regular shell commands work normally
ls -la
git status

# AI-powered requests (prefix with 'ai ')
ai list all python files modified today
ai explain what this git command does: git rebase -i HEAD~3
ai help me set up a Python virtual environment

# Force shell execution (prefix with !)
!echo "force shell mode"
```

## Configuration

Create `~/.tafysh/config.yaml`:

```yaml
llm:
  provider: anthropic
  model: claude-sonnet-4-20250514

shell:
  backend: zsh
  ai_prefix: "ai "

security:
  mode: normal
  require_confirmation: true

log_level: INFO
```

See `examples/config.yaml` for full options.

## Development

```bash
# Install dev dependencies
make dev

# Or manually with uv
uv pip install -e ".[dev,all]"

# Run tests
make test

# Run linters
make lint

# Run type checks
make type-check

# Run all checks
make check

# Sync dependencies
make sync

# Update lock file
make lock
```

## Architecture

TafySH is built with a modular architecture:

```
tafysh/
├── shell/         # User I/O, PTY management
├── agent/         # LLM client, planning, execution
├── tools/         # Tool interface, registry
├── workflows/     # LangGraph orchestration
├── memory/        # Session & persistent storage
├── security/      # Risk classification, RBAC
├── telemetry/     # Logging, metrics, health
├── orchestrator/  # Multi-device, SSH, MCP
├── plugins/       # Extensible toolsets
└── config/        # Configuration management
```

See [docs/ARCHITECTURE_SUMMARY.md](docs/ARCHITECTURE_SUMMARY.md) for details.

## Implementation Status

| Phase | Component | Status |
|-------|-----------|--------|
| 0 | Foundation | ✅ Complete |
| 1 | Shell Wrapper | ✅ Complete |
| 2 | LLM Integration | ✅ Complete |
| 3 | Security | ✅ Complete |
| 4 | Tool Interface | ✅ Complete |
| 5 | Workflows | ✅ Complete |
| 6 | Memory | ✅ Complete |
| 7 | Telemetry | ✅ Complete |
| 8 | Orchestration | ✅ Complete |
| 9 | Robotics | ✅ Complete |
| 10 | Polish | ✅ Complete |
| 11 | Testing & Coverage | ✅ Complete |
| 12 | Release & Distribution | ✅ Complete |

See [docs/IMPLEMENTATION_CHECKLIST.md](docs/IMPLEMENTATION_CHECKLIST.md) for details.

## Security

TafySH includes multiple security layers:

- **Risk Classification**: Commands classified as SAFE, MEDIUM, HIGH, CRITICAL
- **RBAC**: Role-based access control (VIEWER, OPERATOR, ADMIN)
- **Human-in-the-Loop**: Approval required for dangerous operations
- **Audit Logging**: All actions logged for compliance

## Contributing

Contributions are welcome! Please read the documentation and submit PRs.

## License

Apache License 2.0 - see [LICENSE](LICENSE) for details.
