Fabric
Fabric copied to clipboard
[Feature request]: Default output file location with further directory calling
What do you need?
i want to not have to write long dir or go to it to copy
The python version had a "save" helper command you could pipe things into similar to tee it would display the output and save it to a file. It used an env var to determine the root of where to save things. I used it all the time to save things to my Obsidian vault dir. They should port it to the new go version fabric.
Wouldn't setting an environment variable like this do what you need?
export FOD=/my/long/fabric/output/directory
The idea being that FOD represents your Fabric Output Directory
Set it in your shell startup files and then:
pbpaste | fabric -p summarize -o $FOD/my_summary.md
@Uddhav07 @paulrobello
You could even wrap it in an alias/function:
fo() {
[ $# -lt 1 ] && echo "Usage: fo <filename> [fabric args...]" && return 1
fabric "${@:2}" -o "${FOD}/${1}"
}
You'd use it like this:
fo summary.txt --pattern summarize --model gpt-4o < input.txt