Command line interface for the Replicate API, powered by Go.
Run open source AI models from the command line using Replicate.com's hardware.
Version 0.2.2 - Expanded model support + chaining
- Run models
- Chaining: pass the output of one model to another replicate command
- URL or Local file support
- Get model info
- Get model input parameters
- Get model versions
- Go 1.19
- Replicate API Token, get yours here.
go is required.
go install github.com/jamiesteven/replicate-cli/cmd/replicate@latest
replicate
rm $GOPATH/bin/replicate
The Replicate API requires an API token. Get one here.
Set a REPLICATE_TOKEN
environment variable, or use --token <your key here>
.
replicate --token <your key here>
Input parameters use the shorthand format, separated by comma.
image:https://picsum.photos/512/512, fidelity:0.4
replicate run [model] [inputs]
replicate run stability-ai/stable-diffusion prompt:photo of a cat
replicate run jingyunliang/swinir image:https://picsum.photos/512/512
replicate run jingyunliang/swinir image:/path/to/file.png
Pipe the output of one replicate command to another:
replicate run stability-ai/stable-diffusion prompt:photo of a smiling person \
| replicate run jingyunliang/swinir image: \
| replicate run sczhou/codeformer codeformer_fidelity:0.4, upscale:1, image:
replicate info [model]
replicate info stability-ai/stable-diffusion
replicate inputs [model] [?version]
replicate inputs jingyunliang/swinir
replicate inputs jingyunliang/swinir 9d91795e944f3a585fa83f749617fc75821bea8b323348f39cf84f8fd0cbc2f7
replicate versions [model]
replicate versions jingyunliang/swinir
Pull requests welcome!
replicate-cli uses the following packages:
Copyright (c) 2022 Jamie Steven. Licensed Under Apache 2.0.