civitai-sync is a tool to download your Civitai creations.
Now supports β€οΈ favorite / π liked / π disliked generations, and video.
civtai-sync downloads generations from the Civitai generator. It saves data and media in chronological order, in date-ordered folders. The data is saved as text, so prompts can be searched.
Favorite / liked / disliked generations are saved into separate media folders for quick access, alongside a media folder of all generations. This is configurable. You can also choose to download only data, or only favorite / liked / disliked generations.
Software updates: When a new version is released, you can install it from the program.
See the discussion page, for ideas, issues, new comments: https://civitai.com/articles/5676
You are welcome to leave a comment below, make a review, drop a tip.
Click "Show More" for installation instructions.
The program is a Command Line Interface (CLI). It runs in your computer terminal or command prompt.
Download it
Download the tool from this page. It's a zip file.
On your computer, Unzip (or βExtractβ) the file. It will create a new folder; rename it βcivitai-syncβ. Move the folder wherever you want to keep it.
Install Node.js, download it from: https://nodejs.org β if you already have Node, it needs version 18 or above.
If you have a nice new shiny clickable Node.js icon on your desktop or menu, donβt click it. You donβt need to. Thatβs for something else. Do this:
Install it
If updating from an earlier version, see "Manual software update" below.
On Windows, double-click the "install_win" file to install. This will open a command prompt, install the software dependencies and then close. Or, install manually with the steps below.
On Linux, Mac, open your Terminal app.
On Windows, your βCommand Promptβ.Inside the terminal, change directory (β
cd
β)
to the unzipped βcivitai-syncβ folder. Ensure this matches the name and location on your system. For example:
cd Downloads/civitai-sync
On Windows, use backslashes, not forward-slashes:
cd C:\Downloads\civitai-syncInstall the software dependencies by typing:
npm install
Run it
Now you can run the program.
On Windows:
Double-click the "Civitai-Sync" file.
To add it as a Desktop shortcut icon, right-click on it > "Send to" > "Desktop (create shortcut)".
On Linux, Mac, or Windows:
In the terminal app, change directory ("
cd
β)Run it by typing:
npm run cli
Manual software update
From v4, software updates are automatically detected. When a new version is released, you will see an option to install the update.
To upgrade from an earlier version:
Download the zip file, unzip it.
Copy the unzipped files into your existing βcivitai-syncβ program folder, overwriting the older files.
In the terminal app, change directory ("
cd
β)Type: β
npm install
β.
On Windows, double-click on βinstall_winβ.
Create an API key
For access to your account, you need a Civitai API key.
In Account Settings, see βAPI Keysβ near the bottom of the page: https://civitai.com/user/account
Click βAdd API keyβ. Name it, e.g. βcivitai-syncβ. Click βSaveβ.
You will be shown the key only once > Copy it.
In civitai-sync, choose "Set API key", and paste the key.
(To paste, right-click > "Paste", or press "Ctrl+V" or "Ctrl+Shift+V")
Password protection
You can set a password to encrypt your API key, e.g. if you are on a shared computer. You'll enter the password each time you run the program. Or press "Enter" for no password.
Download generations
When your key is saved, you can choose "Download generations".
See the βOptionsβ to choose which types of generation to download. Downloads are saved inside the program folder in "generations"; you can change this to another directory.
Click βLatestβ to download your most recent creations. On its first run, everything will be downloaded from the onsite generator. You can choose to download just βFavorite/Liked/Dislikedβ generations.
Generation data
Data from Civitai's API is saved as text files (in βJSONβ format). You can search the βgenerations/dataβ folder from your file explorer to find specific prompts.
Prompts and metadata are already embedded in the image EXIF data. Some ways to view it:
Chrome browser extension:
https://chromewebstore.google.com/detail/exif-metadata-viewer/Stable Diffusion Prompt Reader:
https://github.com/receyuki/stable-diffusion-prompt-readerWindows: In Explorer, click on image > properties > select tab with details > select "comments"
Multiple accounts
The program is normally run as:npm run cli
To download from an alternative account, specify a unique name for it:
npm run cli bob
You will probably want to change the download directory, to be different for each account.
Problems? Thoughts? Get in touch
Make a comment, start a chat.
@monkeypuzzle