| commit | 5e227dd8f494194284b4b545c02e09bc79909d41 | [log] [tgz] |
|---|---|---|
| author | Philip Zeyliger <philip.zeyliger@gmail.com> | Mon Apr 21 15:55:29 2025 -0700 |
| committer | Philip Zeyliger <philip.zeyliger@gmail.com> | Mon Apr 21 20:04:53 2025 -0700 |
| tree | cbe3fb6cb160fea4379e822fcca2cfcbe5bc51cf | |
| parent | e8d6b80c8804353641c0d999d1897e29b068bbdc [diff] |
sketch: Linux support Together with 8a89e1cbd3e7c9bbe1c561e88141527a0c894e06, this should resolve https://github.com/boldsoftware/sketch/issues/3, in supporting Linux. To test on a Mac, run "limactl shell default go run ./cmd/sketch -verbose", assuming you have a lima default VM with sketch's dependencies already prepped. The issues we encountered were: 1. Explicit checks for "is Colima installed", "is docker installed", etc. Easy enough to fix these. 2. When go's toolchain builds, it puts the output in different places depending whether it's cross-compiled or not. Fine, we adapt. Note that os.Rename() doesn't always work, and we fall back to copy/delete. Mode has to be set appropriately to, to make the /bin/sketch executable executable. Re-building is kind of silly: we could use /proc/self/exe, for example, or cross-mount the binary into the container, or any number of other things. That said, here we keep the paths the same. 3. Docker networking setup for the git server. The host git repo is served with git's cgi-bin wrapper. host.docker.internal seems to work different in colima vs Ubuntu's docker.io, so an extra command line flag to docker was added. Then, it turns out that our git server checks that the remote is 127.0.0.1, which seems to be how Colima does its networking, but isn't the case for Docker in general. To handle this, we use HTTP Basic Auth with a random password. (Git also has an "http.extraHeader" configuration, but basic auth seems just as good and more obvious.) Incidentally, I'm also adding the git remote as a git remote named "sketch-host" to make it easier to work with in the terminal, if necessary.
Sketch is an agentic coding tool focused on the Go programming language. Sketch runs in your terminal, has a web UI, understands your code, and helps you get work done. To keep your environment pristine, sketch starts a docker container and outputs its work onto a branch in your host git repository.
To get started:
go install sketch.dev/cmd/sketch@latest sketch
Currently sketch only runs on macOS. It uses docker/colima (installable via homebrew) for containers.
The sketch.dev service is used to provide access to an LLM service and give you a way to access the web UI from anywhere.
We have a discord server to discuss sketch.
Join if you want! https://discord.gg/2xG3KEG3
Sketch is open source. It is right here in this repository! Have a look around and mod away.
If you want to run sketch entirely without the sketch.dev service, you can set the flag -skaband-addr="" and then provide an ANTHROPIC_API_KEY environment variable. (More LLM services coming soon!)