{"id":19815951,"url":"https://github.com/replicate/cli","last_synced_at":"2025-10-30T08:36:53.197Z","repository":{"id":187702336,"uuid":"677371907","full_name":"replicate/cli","owner":"replicate","description":"CLI for Replicate","archived":false,"fork":false,"pushed_at":"2024-09-16T18:01:48.000Z","size":860,"stargazers_count":75,"open_issues_count":9,"forks_count":11,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-02-28T09:18:32.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://replicate.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/replicate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-11T12:07:07.000Z","updated_at":"2025-02-11T12:50:19.000Z","dependencies_parsed_at":"2024-01-08T18:50:16.356Z","dependency_job_id":"a8c270ce-e2e9-4e44-9162-4ae676ad124b","html_url":"https://github.com/replicate/cli","commit_stats":null,"previous_names":["replicate/cli"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/replicate","download_url":"https://codeload.github.com/replicate/cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243769980,"owners_count":20345217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T10:07:50.192Z","updated_at":"2025-10-30T08:36:48.153Z","avatar_url":"https://github.com/replicate.png","language":"Go","funding_links":[],"categories":["AI and ML"],"sub_categories":[],"readme":"# Replicate CLI\n\n![demo](demo.gif)\n\n## Install\n\nIf you're using macOS, you can install the Replicate CLI using Homebrew:\n\n```console\nbrew tap replicate/tap\nbrew install replicate\n```\n\nOr you can build from source and install it with these commands\n(requires Go 1.20 or later):\n\n```console\nmake\nsudo make install\n```\n\n## Upgrade\n\nIf you previously installed the CLI with Homebrew,\nyou can upgrade to the latest version by running the following command:\n\n```console\nbrew upgrade replicate\n```\n\n## Usage\n\nGrab your API token from [replicate.com/account](https://replicate.com/account)\nand set the `REPLICATE_API_TOKEN` environment variable.\n\n```console\n$ export REPLICATE_API_TOKEN=\u003cyour token here\u003e\n```\n\n---\n\n```console\nUsage:\n  replicate [command]\n\nCore commands:\n  hardware    Interact with hardware\n  model       Interact with models\n  prediction  Interact with predictions\n  scaffold    Create a new local development environment from a prediction\n  training    Interact with trainings\n\nAlias commands:\n  run         Alias for \"prediction create\"\n  stream      Alias for \"prediction create --stream\"\n  train       Alias for \"training create\"\n\nAdditional Commands:\n  completion  Generate the autocompletion script for the specified shell\n  help        Help about any command\n\nFlags:\n  -h, --help      help for replicate\n  -v, --version   version for replicate\n\nUse \"replicate [command] --help\" for more information about a command.```\n```\n\n---\n\n### Create a prediction\n\nGenerate an image with [SDXL].\n\n```console\n$ replicate run stability-ai/sdxl \\\n      prompt=\"a studio photo of a rainbow colored corgi\"\nPrediction created: https://replicate.com/p/jpgp263bdekvxileu2ppsy46v4\n```\n\n### Stream prediction output\n\nRun [LLaMA 2] and stream output tokens to your terminal.\n\n```console\n$ replicate run meta/llama-2-70b-chat --stream \\\n    prompt=\"Tell me a joke about llamas\"\nSure, here's a joke about llamas for you:\n\nWhy did the llama refuse to play poker?\n\nBecause he always got fleeced!\n```\n\n### Create a local development environment from a prediction\n\nCreate a Node.js or Python project from a prediction.\n\n```console\n$ replicate scaffold https://replicate.com/p/jpgp263bdekvxileu2ppsy46v4 --template=node\nCloning starter repo and installing dependencies...\nCloning into 'jpgp263bdekvxileu2ppsy46v4'...\nWriting new index.js...\nRunning example prediction...\n[\n  'https://replicate.delivery/pbxt/P79eJmjeJsql40QpRbWVDtGJSoTtLTdJ494kpQexSDhYGy0jA/out-0.png'\n]\nDone!\n```\n\n### Chain multiple predictions\n\nGenerate an image with [SDXL] and upscale that image with [ESRGAN].\n\n```console\n$ replicate run stability-ai/sdxl \\\n      prompt=\"a studio photo of a rainbow colored corgi\" | \\\n  replicate run nightmareai/real-esrgan --web \\\n      image={{.output[0]}}\n# opens prediction in browser (https://replicate.com/p/jpgp263bdekvxileu2ppsy46v4)\n```\n\n### Create a model\n\nCreate a new model on Replicate.\n\n```console\n$ replicate model create yourname/model --private --hardware gpu-a40-small\n```\n\nTo list available hardware types:\n\n```console\n$ replicate hardware list\n```\n\nAfter creating your model, you can [fine-tune an existing model](https://replicate.com/docs/fine-tuning) or [build and push a custom model using Cog](https://replicate.com/docs/guides/push-a-model).\n\n### Fine-tune a model\n\nFine-tune [SDXL] with your own images:\n\n```console\n$ replicate train --destination mattt/sdxl-dreambooth --web \\\n      stability-ai/sdxl \\\n      input_images=@path/to/pictures.zip \\\n      use_face_detection_instead=true\n# opens the training in browser\n```\n\n\u003e [!NOTE]\n\u003e Use the `@` prefix to upload a file from your local filesystem.\n\u003e It works like curl's `--data-binary` option.\n\nFor more information,\nsee [our blog post about fine-tuning with SDXL](https://replicate.com/blog/fine-tune-sdxl).\n\n### View a model's inputs and outputs\n\nGet the schema for [SunoAI Bark]\n\n```console\n$ replicate model schema suno-ai/bark\nInputs:\n- prompt: Input prompt (type: string)\n- history_prompt: history choice for audio cloning, choose from the list (type: )\n- custom_history_prompt: Provide your own .npz file with history choice for audio cloning, this will override the previous history_prompt setting (type: string)\n- text_temp: generation temperature (1.0 more diverse, 0.0 more conservative) (type: number)\n- waveform_temp: generation temperature (1.0 more diverse, 0.0 more conservative) (type: number)\n- output_full: return full generation as a .npz file to be used as a history prompt (type: boolean)\n\nOutput:\n- type: object\n```\n\n[api]: https://replicate.com/docs/reference/http\n[LLaMA 2]: https://replicate.com/replicate/llama-2-70b-chat\n[SDXL]: https://replicate.com/stability-ai/sdxl\n[ESRGAN]: https://replicate.com/nightmareai/real-esrgan\n[SunoAI Bark]: https://replicate.com/suno-ai/bark\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicate%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freplicate%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicate%2Fcli/lists"}