upgit
upgit is a free and open source command-line tool for Windows, macOS and Linux that uploads files to many hosting providers, Chevereto included, and gives you back the link. Use it with your Chevereto website to upload files and clipboard images from your computer, or as the image uploader for Typora.
Get upgit
Download the zip file for your system from upgit releases, extract it and save the upgit program (upgit.exe on Windows) somewhere on your computer.
To run it from any folder, add that folder to your PATH environment variable.
TIP
On macOS and Linux, run chmod +x upgit if the program doesn't have permission to run.
Add Chevereto to upgit
You need your API key and the upload URL of your Chevereto website, which is your website address followed by /api/1/upload.
Create a file named config.toml in the same folder as upgit with the following content, and edit it to match your Chevereto website:
default = "chevereto"
[uploaders.chevereto]
key = "your API key goes here" # edit this
upload_url = "https://mysite.com/api/1/upload" # edit thisThe default line makes Chevereto the destination for all uploads. Without it, you can pick Chevereto on each upload with -u chevereto.
Upload files
To upload a file, run:
upgit logo.pngupgit uploads the file to your account and prints its link.
Other useful commands:
| Command | Description |
|---|---|
upgit photo.jpg video.mp4 | Upload multiple files |
upgit https://example.com/image.png | Download a file from a URL, then upload it |
upgit --clipboard | Upload the image on the clipboard as PNG |
upgit --clipboard-files | Upload files copied on the clipboard (Windows only) |
upgit logo.png --output clipboard | Copy the link to the clipboard |
upgit logo.png --output clipboard -f markdown | Copy the link as Markdown image code |
Run upgit -h to see all options.
TIP
On Linux, clipboard uploads need xclip (X11) or wl-clipboard (Wayland).
Use it with Typora
Typora can use upgit to upload the images you add to your documents:
- Go to File > Preferences... > Image
- In Image Uploader select Custom Command
- In Command enter the location of the
upgitprogram - Click Test Uploader to check that everything works
Need help?
Refer to the upgit repository for help about upgit.
