mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-11 23:38:09 -05:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8d6d41546 | ||
|
|
44d779d7a7 | ||
|
|
5c6823e2d4 | ||
|
|
820adf1339 | ||
|
|
f5225df224 | ||
|
|
469c312c66 | ||
|
|
2d28b5b185 | ||
|
|
7de5c6ddef | ||
|
|
32b59e947f | ||
|
|
36b329edeb |
21
README.md
21
README.md
@@ -48,15 +48,18 @@
|
||||
<br />
|
||||
|
||||
> [!NOTE]
|
||||
> We are adding functionality to the project so often that you should update often as well. That means: `git pull; ./setup.sh; fabric --update` in the main directory, and then sourcing your shell files and/or restarting your terminal. So exciting!
|
||||
> We are adding functionality to the project so often that you should update often as well. That means: `git pull; pipx upgrade fabric; fabric --update; source ~/.zshrc (or ~/.bashrc)` in the main directory!
|
||||
|
||||
**March 11, 2024** — We just added support for Claude, local models via Ollama, and a number of new Patterns. Be sure to update and check `fabric -h` for the latest!
|
||||
**March 13, 2024** — We just added `pipx` install support, which makes it way easier to install Fabric, support for Claude, local models via Ollama, and a number of new Patterns. Be sure to update and check `fabric -h` for the latest!
|
||||
|
||||
## Introduction video
|
||||
## Introduction videos
|
||||
|
||||
<div align="center">
|
||||
<a href="https://youtu.be/wPEyyigh10g">
|
||||
<img width="972" alt="fabric_intro_video" src="https://github.com/danielmiessler/fabric/assets/50654/1eb1b9be-0bab-4c77-8ed2-ed265e8a3435">
|
||||
<img width="972" alt="fabric_intro_video" src="https://github.com/danielmiessler/fabric/assets/50654/1eb1b9be-0bab-4c77-8ed2-ed265e8a3435"></a>
|
||||
<br /><br />
|
||||
<a href="http://www.youtube.com/watch?feature=player_embedded&v=lEXd6TXPw7E target="_blank">
|
||||
<img src="http://img.youtube.com/vi/lEXd6TXPw7E/mqdefault.jpg" alt="Watch the video" width="972" " />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -148,9 +151,9 @@ git clone https://github.com/danielmiessler/fabric.git
|
||||
cd fabric
|
||||
```
|
||||
|
||||
4. install pipx:
|
||||
4. Install pipx:
|
||||
|
||||
Mac:
|
||||
macOS:
|
||||
|
||||
```bash
|
||||
brew install pipx
|
||||
@@ -162,6 +165,10 @@ Linux:
|
||||
sudo apt intall pipx
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
Use WSL and follow the Linux instructions.
|
||||
|
||||
5. Install fabric
|
||||
|
||||
```bash
|
||||
@@ -176,7 +183,7 @@ fabric --setup
|
||||
|
||||
7. Restart your shell to reload everything.
|
||||
|
||||
8. Now you are up and running! You can test by pulling the help.
|
||||
8. Now you are up and running! You can test by running the help.
|
||||
|
||||
```bash
|
||||
# Making sure the paths are set up correctly
|
||||
|
||||
2
poetry.lock
generated
2
poetry.lock
generated
@@ -3673,4 +3673,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"]
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "134458d32b5a70807e8345abccb792bb0694ce5081d0746be785b70c4a381a54"
|
||||
content-hash = "f2995ca96c32fda2c1567d045cb36422b0f5541e809c47e24ff96025a35ac7b0"
|
||||
|
||||
@@ -25,6 +25,9 @@ pydub = "^0.25.1"
|
||||
ollama = "^0.1.7"
|
||||
anthropic = "^0.18.1"
|
||||
pyperclip = "^1.8.2"
|
||||
python-dotenv = "^1.0.1"
|
||||
jwt = "^1.3.1"
|
||||
flask = "^3.0.2"
|
||||
|
||||
[tool.poetry.group.cli.dependencies]
|
||||
pyyaml = "^6.0.1"
|
||||
|
||||
67
setup.sh
67
setup.sh
@@ -1,67 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if pyproject.toml exists in the current directory
|
||||
if [ ! -f "pyproject.toml" ]; then
|
||||
echo "Poetry could not find a pyproject.toml file in the current directory or its parents."
|
||||
echo "Please navigate to the project directory where pyproject.toml is located and rerun this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Installs poetry-based python dependencies
|
||||
echo "Installing python dependencies"
|
||||
poetry install
|
||||
|
||||
# List of commands to check and add or update alias for
|
||||
# Add 'yt' and 'ts' to the list of commands
|
||||
commands=("fabric" "fabric-api" "fabric-webui" "ts" "yt")
|
||||
|
||||
# Path to the bootstrap file
|
||||
bootstrap_file="$HOME/.config/fabric/fabric-bootstrap.inc"
|
||||
|
||||
# Ensure the directory for the bootstrap file exists
|
||||
mkdir -p "$(dirname "$bootstrap_file")"
|
||||
|
||||
# Start the bootstrap file with a shebang if it doesn't already exist
|
||||
if [ ! -f "$bootstrap_file" ]; then
|
||||
echo "#!/bin/bash" > "$bootstrap_file"
|
||||
fi
|
||||
|
||||
# List of shell configuration files to update
|
||||
config_files=("$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.bash_profile")
|
||||
|
||||
for config_file in "${config_files[@]}"; do
|
||||
# Check if the configuration file exists
|
||||
if [ -f "$config_file" ]; then
|
||||
echo "Checking $config_file"
|
||||
|
||||
# Ensure the bootstrap script is sourced from the shell configuration file
|
||||
source_line="if [ -f \"$bootstrap_file\" ]; then . \"$bootstrap_file\"; fi"
|
||||
if ! grep -qF -- "$source_line" "$config_file"; then
|
||||
echo -e "\n# Load custom aliases\n$source_line" >> "$config_file"
|
||||
echo "Added source command for $bootstrap_file in $config_file."
|
||||
fi
|
||||
sed -i '' '/alias fabric=/d' "$config_file"
|
||||
sed -i '' '/fabric --pattern/d' "$config_file"
|
||||
|
||||
|
||||
else
|
||||
echo "$config_file does not exist."
|
||||
fi
|
||||
done
|
||||
|
||||
# Add aliases to the bootstrap file
|
||||
for cmd in "${commands[@]}"; do
|
||||
CMD_PATH=$(poetry run which $cmd 2>/dev/null)
|
||||
if [ -z "$CMD_PATH" ]; then
|
||||
echo "Command $cmd not found in the current Poetry environment."
|
||||
continue
|
||||
fi
|
||||
|
||||
# Check if the alias already exists in the bootstrap file
|
||||
if ! grep -qF "alias $cmd=" "$bootstrap_file"; then
|
||||
echo "alias $cmd='$CMD_PATH'" >> "$bootstrap_file"
|
||||
echo "Added alias for $cmd to $bootstrap_file."
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Setup completed. Please restart your terminal or source your configuration files to apply changes."
|
||||
Reference in New Issue
Block a user