PipeBot is a command-line interface tool that allows you to interact with models using AWS Bedrock. It's designed for expert users working with Linux, AWS, Kubernetes, Helm, and Python.
____ ________ __________ ____ ______ / __ \/ _/ __ \/ ____/ __ )/ __ \/_ __/ / /_/ // // /_/ / __/ / __ / / / / / / / ____// // ____/ /___/ /_/ / /_/ / / / /_/ /___/_/ /_____/_____/\____/ /_/ +-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+ |p|o|w|e|r|e|d| |b|y| |B|e|d|r|o|c|k| +-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+
Clone this repository:
git clone https://github.com/njfsmallet/pipebot.git
Install the required Python libraries:
pip3 install boto3 colored chromadb requests beautifulsoup4 prettytable urllib3
Configure your AWS credentials:
aws configure
Set up the pb
alias:
To simplify the usage of PipeBot, you can set up an alias in your shell configuration file (e.g., ~/.bashrc
or ~/.zshrc
):
alias pb='PYTHONPATH="/home/ec2-user/llm/pipebot" python3 /home/ec2-user/llm/pipebot/pipebot/main.py'
After adding the alias, reload your shell configuration:
source ~/.bashrc # or source ~/.zshrc
echo hi | pb
or
uname -a | pb
In interactive mode:
git diff | pb --non-interactive
--non-interactive
: Run in non-interactive mode (exit after first response)--no-memory
: Disable conversation memory--clear
: Clear conversation memory and exit--debug
: Enable debug mode--scan
: Scan and index knowledge base documents--status
: Show knowledge base status and list indexed files--smart
: Use enhanced model capabilitiesPipeBot now includes a memory management feature that stores and retrieves relevant parts of past conversations. This allows for improved context retention across multiple interactions.
The memory database is stored in ~/.pipebot/memory
by default.
PipeBot includes a knowledge base feature that provides offline access to documentation for various Kubernetes-related tools. The knowledge base is managed using two commands:
The knowledge_base.sh
script downloads and organizes documentation from official repositories:
./knowledge_base.sh
Currently supported documentation sources:
After downloading documentation, index it using:
pb --scan
This command:
~/.pipebot/kb
The knowledge base helps PipeBot provide more accurate and detailed responses about:
~/.pipebot/memory
.~/.pipebot/kb
.SERPER_API_KEY
.PipeBot can execute read-only AWS CLI commands for allowed services. Supported services include:
acm, autoscaling, cloudformation, cloudfront, cloudtrail, cloudwatch, directconnect, ebs, ec2, ecr, ecs, efs, eks, elb, elbv2, iam, kafka, kms, lambda, logs, rds, route53, s3, secretsmanager, sns, sqs, and ce.
Only commands starting with 'describe', 'get', 'list', 'search', 'lookup-events', or 'filter-log-events' are allowed.
PipeBot can execute read-only kubectl commands. Supported kubectl operations include:
Allowed resources for get and describe include: pods, services, deployments, replicasets, nodes, namespaces, configmaps, secrets, persistentvolumes, persistentvolumeclaims, events, ingresses, jobs, cronjobs, roles, rolebindings, clusterroles, clusterrolebindings, serviceaccounts, networkpolicies, crds (customresourcedefinitions), ec2nodeclasses, and nodepools.
PipeBot can execute read-only Helm commands. Supported Helm operations include:
PipeBot can perform web searches using Serper, a Google Search API. This feature provides:
To use the web search feature:
export SERPER_API_KEY='your_api_key_here'
Example usage:
echo "Search for Kubernetes best practices" | pb
Search results are limited to the top 5 most relevant matches to keep responses focused and concise.
PipeBot includes a secure Python code execution environment that allows you to run Python code snippets with access to common data science and mathematical libraries. This feature is designed with security in mind and only allows access to safe, read-only operations.
Supported libraries include:
Security features:
Example usage:
echo "Calculate fibonacci sequence using Python" | pb
Get information about EC2 instances:
echo "List all clusters EKS" | pb
Describe a specific Kubernetes deployment:
echo "Describe the nginx deployment in kube-system" | pb
List Helm releases:
echo "List all Helm releases" | pb
Search for technical documentation:
echo "Find documentation about AWS EKS best practices" | pb
~/.pipebot/
├── memory/ # Conversation history database
└── kb/ # Knowledge base documentation
└── kubernetes/ # Kubernetes documentation
This project is licensed under the MIT License - see the LICENSE file for details.
There are no models linked
There are no datasets linked
There are no models linked
There are no datasets linked