Skip to main content

AI-enhanced terminal shell with LLM-powered capabilities

Project description

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 for dependency management.

# 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

# 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:

# 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:

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

# 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 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 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 for details.

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

tafysh-0.2.4.tar.gz (378.2 kB view details)

Uploaded Source

Built Distribution

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

tafysh-0.2.4-py3-none-any.whl (279.0 kB view details)

Uploaded Python 3

File details

Details for the file tafysh-0.2.4.tar.gz.

File metadata

  • Download URL: tafysh-0.2.4.tar.gz
  • Upload date:
  • Size: 378.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tafysh-0.2.4.tar.gz
Algorithm Hash digest
SHA256 8d3816a261ce2a09c8b161e1915f0fe0bf74d2004a9448761fb7f0953033e1a7
MD5 66b2eea2c3b35c011b6b8203f541f969
BLAKE2b-256 11a70f5c13d08fb7f27283431e9efc14d9834b4582fd36a3a8db114e4b43aa4d

See more details on using hashes here.

File details

Details for the file tafysh-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: tafysh-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 279.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tafysh-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7a7eae8fed8cddb5da47221889d6a5ef397f165503296b6eb0f7907ba5f23ed3
MD5 c4b4a10c90291edcfda6762a9a1d2a66
BLAKE2b-256 fbec855d6c265a6edb9993bb4f6d0e12638d5ce915ccaa12cfc18546525ac97f

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