danielmiessler / fabric

fabric is an open-source framework for augmenting humans using AI. It provides a modular framework for solving specific problems using a crowdsourced set of AI prompts that can be used anywhere.
https://danielmiessler.com/p/fabric-origin-story
MIT License
25.35k stars 2.69k forks source link

PROBLEM trying to install the "yt tool". #921

Closed SME6 closed 1 month ago

SME6 commented 2 months ago

What is your question?

When putting "go install github.com/danielmiessler/yt@latest" in terminal I received the message that "go cannot find GOROOT directory: /usr/local/go." Any idea on how I could fix this issue? I would really appreciate if you could give any help to pull this off. Many thanks! I tried this, this, and that.

Geelhem commented 2 months ago

did you install go ? im having some issue too but not that one.

SME6 commented 2 months ago

Yes I did. Everything else worked perfect, but it seems that this specific file wasn't installed because go cannot find it in my directory

charlie-romeo commented 2 months ago

I had the same issue, I hadn't set up the Environmental Variables yet. I got a little ahead of myself.
check with echo $GOROOT it should be /usr/local/go on linux/mac. not sure about windows

good luck

yousecjoe commented 2 months ago

Same issue here. I had to use sudo to get it to work. That should not be the case.

yousecjoe commented 2 months ago

After installation, it will still not work if you follow the documentation. The docs need improvements. As others said, you must not use --transcript, and your URL must be in double quotes. That got it to work for me.

eugeis commented 1 month ago

Meanwhile yt is integrated to fabric directly, so you could use fabric -y... -p....

Here help page:

`I can't reproduce it, please try again.

Here my output:

`❯ go install github.com/danielmiessler/fabric@latest go: downloading github.com/danielmiessler/fabric v1.4.21

~ via 🐹 v1.23.1 took 14s ❯ fabric no session, pattern or user messages provided

~ via 🐹 v1.23.1 ❯ fabric -h Usage: fabric [OPTIONS]

Application Options: -p, --pattern= Choose a pattern -v, --variable= Values for pattern variables, e.g. -v=$name:John -v=$age:30 -C, --context= Choose a context --session= Choose a session -S, --setup Run setup --setup-skip-update-patterns Skip update patterns at setup -t, --temperature= Set temperature (default: 0.7) -T, --topp= Set top P (default: 0.9) -s, --stream Stream -P, --presencepenalty= Set presence penalty (default: 0.0) -r, --raw Use the defaults of the model without sending chat options (like temperature etc.) and use the user role instead of the system role for patterns. -F, --frequencypenalty= Set frequency penalty (default: 0.0) -l, --listpatterns List all patterns -L, --listmodels List all available models -x, --listcontexts List all contexts -X, --listsessions List all sessions -U, --updatepatterns Update patterns -c, --copy Copy to clipboard -m, --model= Choose model -o, --output= Output to file -n, --latest= Number of latest patterns to list (default: 0) -d, --changeDefaultModel Change default pattern -y, --youtube= YouTube video url to grab transcript, comments from it and send to chat --transcript Grab transcript from YouTube video and send to chat --comments Grab comments from YouTube video and send to chat --dry-run Show what would be sent to the model without actually sending it -u, --scrape_url= Scrape website URL to markdown using Jina AI -q, --scrape_question= Search question using Jina AI

Help Options: -h, --help Show this help message``

yousecjoe commented 1 month ago

Meanwhile yt is integrated to fabric directly, so you could use fabric -y... -p....

I realized the YT integration was there very recently. I have been testing the direct integration for the last few nights, and it's working great! I've got some examples that could be used to improve the documentation.

eugeis commented 1 month ago

If you like, please update in a PR READMe.md with the decsription and some examples.

pedroibl commented 2 days ago

I have the yt command set up in two ways:

  1. I pasted the function into my .zshrc file, and it works successfully.

  2. Alternatively, you can create a file, make it executable with chmod +x, and move it to /usr/local/bin.

!/bin/zsh

YouTube transcript command

yt() { local video_link="$1" fabric -y "$video_link" --transcript }