This is the reference for the Replicate command-line interface. You can also see this in the terminal by running replicate --help
or replicate command --help
.
To install the command-line interface, see the installation instructions.
replicate analytics
– Enable or disable analyticsreplicate checkout
– Copy files from an experiment or checkpoint into the project directoryreplicate diff
– Compare two experiments or checkpointsreplicate feedback
– Submit feedback to the team!replicate ls
– List experiments in this projectreplicate ps
– List running experiments in this projectreplicate rm
– Remove experiments or checkpointreplicate show
– View information about an experiment or checkpointreplicate analytics
The Replicate CLI sends anonymous analytics about commands you run.
The following data is sent on each command line invokation:
To learn more, please refer to https://replicate.ai/docs/learn/analytics
These analytics really help us, and we'd really appreciate it if you left it on. But, if you want to opt out, you can run this command:
replicate analytics off
replicate analytics <on|off> [flags]
-h, --help help for analytics--color Display color in output (default true)-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml-v, --verbose Verbose output
replicate checkout
Copy files from an experiment or checkpoint into the project directory
replicate checkout <experiment or checkpoint ID> [flags]
-f, --force Force checkout without prompt, even if the directory is not empty-h, --help help for checkout-o, --output-directory string Output directory (defaults to working directory or directory with replicate.yaml in it)--path string A specific file or directory to checkout (defaults to all files or directory in checkpoint/experiment)-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)--color Display color in output (default true)-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml-v, --verbose Verbose output
replicate diff
Compare two experiments or checkpoints.
If an experiment ID is passed, it will pick the best checkpoint from that experiment. If a primary metric is not defined in replicate.yaml, it will use the latest checkpoint.
replicate diff <ID> <ID> [flags]
-h, --help help for diff-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)--color Display color in output (default true)-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml-v, --verbose Verbose output
replicate feedback
Submit feedback to the team!
replicate feedback [flags]
-h, --help help for feedback--color Display color in output (default true)-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml-v, --verbose Verbose output
replicate ls
List experiments in this project
replicate ls [flags]
List all experiments in the current project:$ replicate lsList experiments that have run for 50 steps or less:$ replicate ls --filter "step <= 50"List experiments where the parameter "optimizer" is "adam" andthe best "accuracy" metric is greater than 0.8:$ replicate ls --filter "optimizer = adam" --filter "accuracy > 0.8"Sort all stopped experiments by the metric "val_loss":$ replicate ls --sort "val_loss" --filter "status = stopped"
--all Output all params and metrics. Default: only params/metrics that differ-f, --filter stringArray Filters (format: "<name> <operator> <value>")-h, --help help for ls--json Print output in JSON format-q, --quiet Only print experiment IDs-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)-s, --sort string Sort key. Suffix with '-desc' for descending sort, e.g. --sort=started-desc (default "started")--color Display color in output (default true)-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml-v, --verbose Verbose output
replicate ps
List running experiments in this project
replicate ps [flags]
--all Output all params and metrics. Default: only params/metrics that differ-f, --filter stringArray Filters (format: "<name> <operator> <value>")-h, --help help for ps--json Print output in JSON format-q, --quiet Only print experiment IDs-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)-s, --sort string Sort key. Suffix with '-desc' for descending sort, e.g. --sort=started-desc (default "started")--color Display color in output (default true)-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml-v, --verbose Verbose output
replicate rm
Remove experiments or checkpoints.
To remove experiments or checkpoints, pass any number of IDs (or prefixes).
replicate rm <experiment or checkpoint ID> [experiment or checkpoint ID...] [flags]
Delete an experiment and its checkpoints(where a1b2c3d4 is an experiment ID):replicate rm a1b2c3d4Delete all experiments where the metric "val_accuracy" is lessthan 0.2 at the best checkpoints:replicate rm $(replicate ls -q --filter "val_accuracy < 0.2")
-f, --force Force delete without interactive prompt-h, --help help for rm-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)--color Display color in output (default true)-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml-v, --verbose Verbose output
replicate show
View information about an experiment or checkpoint
replicate show <experiment or checkpoint ID> [flags]
-h, --help help for show--json Print output in JSON format-R, --repository string Repository URL (e.g. 's3://my-replicate-bucket' (if omitted, uses repository URL from replicate.yaml)--color Display color in output (default true)-D, --project-directory string Project directory. Default: nearest parent directory with replicate.yaml-v, --verbose Verbose output