# Packages
No description provided by the author
# README
Appender
Appender is a CLI tool designed to make interacting with Chat LLMs like Claude.ai easier when writing code. The goal is to capture the filename and contents of files in to feed into a prompt in order to give the current state of the codebase we are working in.
TODO
[X] add validation and don't select binaries [] add tests - teatest - https://github.com/charmbracelet/bubbletea/blob/main/examples/simple/main_test.go [] add cohesive styling
Expected Behavior
- cli
$ appender
- when called from the command line without any arguments, `appender` will assume that the `workDir` is the current working directory
- if called with an argument, appender will use the path as the `workDir`
$ appender ./path/to/dir
- the output of the cli will be the directory tree
$ appender
.
├── README.md
├── flake.lock
├── flake.nix
├── go.mod
├── go.work
├── go.work.sum
├── justfile
├──+ tools
│ └─+ appender
│ ├── README.md
│ ├── go.mod
│ ├── go.sum
│ └── main.go
└── vendor
- The user should be able to navigate up and down each line using
j
andk
and select the line usingspace
. If a file is selected, it should have a added to the end of the line like the following (assume README.md was selected using thespace
key):
$ appender
.
├── README.md
├── flake.lock
├── flake.nix
├── go.mod
├── go.work
├── go.work.sum
├── justfile
├──+ tools
│ └─+ appender
│ ├── README.md
│ ├── go.mod
│ ├── go.sum
│ └── main.go
└── vendor
- If a directory is selected, then the directory and all files and folders within the directory should have a added to the end of the line like the following (assume tools was selected using the
space
key):
$ appender
.
├── README.md
├── flake.lock
├── flake.nix
├── go.mod
├── go.work
├── go.work.sum
├── justfile
├──+ tools
│ └─+ appender
│ ├── README.md
│ ├── go.mod
│ ├── go.sum
│ └── main.go
└── vendor
- Lines with indicate a directory that is expanded. That will be the default. If the user presses
l
orh
key on a line with a directory, then the will turn into and all of the directories and files within that directory will disappear. Pressingl
orh
key will toggle them back into view and return the to (see the vendor line as a directory that is not in expanded mode):
$ appender
.
├── README.md
├── flake.lock
├── flake.nix
├── go.mod
├── go.work
├── go.work.sum
├── justfile
├──+ tools
│ └─+ appender
│ ├── README.md
│ ├── go.mod
│ ├── go.sum
│ └── main.go
└── vendor
- When the user presses
enter
key, the program will register the selected files and create a new file calledoutput.txt
that includes each selected file along with it's relative path in a comment.
$ appender
.
├── README.md
├── flake.lock
├── flake.nix
├── go.mod
├── go.work
├── go.work.sum
├── justfile
├──+ tools
│ └─+ appender
│ ├── README.md
│ └── main.go
└── vendor
Will produce a file called output.txt
with the following contents:
# tools/appender/README.md
This is some text
* Bullet 1
* Bullet #2
# tools/appender/main.go
package main
import "fmt"
func main(){
fmt.Println("Hello, World!")
}