image_service_cli/README.md
2025-07-16 07:23:13 +02:00

41 lines
1 KiB
Markdown

# Image Service CLI
A simple tool to upload images to s3 and provide image service transformation urls.
Written in Clojure via Babashka. Interactive elements are powered by [Gum](https://github.com/charmbracelet/gum).
Uses a gum wrapper lib I write [com.travisshears.gum-utils](https://git.travisshears.com/travisshears/gum-utils).
## Commands
`gen` - Pick a recently uploaded image and generate a image service url with max dimension
`index` - Scrape s3 for images and add them to local db
`upload file-path dir?` - Uploads an image to s3. If on dir supplied to cli command it will prompt for one. Gives option after upload to gen url.
## Run dev
To run commands:
```shell
$ bb -m image-service-cli.main gen
```
Or to play around and call individual functions using the REPL:
```shell
$ rlwrap bb repl
user=> (require '[image-service-cli.index])
user=> (image-service-cli.index/run)
...
```
## Install
Clone repo and manually create alias.
Add this to `.zshrc` for example:
```bash
alias image-service="/Users/xxxxxxxx/image_service_cli/image_service.bb"
```