Fabric icon indicating copy to clipboard operation
Fabric copied to clipboard

[Feature request]: Default output file location with further directory calling

Open Uddhav07 opened this issue 1 year ago • 1 comments

What do you need?

i want to not have to write long dir or go to it to copy

Uddhav07 avatar Aug 23 '24 17:08 Uddhav07

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.

paulrobello avatar Aug 26 '24 17:08 paulrobello

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

ksylvan avatar Aug 19 '25 04:08 ksylvan