{"id":18622063,"url":"https://github.com/caprover/caprover-cli","last_synced_at":"2025-10-25T10:38:05.622Z","repository":{"id":40462194,"uuid":"165351045","full_name":"caprover/caprover-cli","owner":"caprover","description":"Command Line Interface for https://github.com/caprover/caprover","archived":false,"fork":false,"pushed_at":"2024-12-23T06:02:53.000Z","size":9162,"stargazers_count":72,"open_issues_count":31,"forks_count":41,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-09T04:37:48.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caprover.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-01-12T05:35:57.000Z","updated_at":"2025-04-13T02:33:27.000Z","dependencies_parsed_at":"2024-01-23T21:18:46.007Z","dependency_job_id":"43edda34-e8a9-4135-81a3-6165409befd6","html_url":"https://github.com/caprover/caprover-cli","commit_stats":{"total_commits":780,"total_committers":29,"mean_commits":"26.896551724137932","dds":0.1679487179487179,"last_synced_commit":"66a3be524f2bc2e01fc9013a11ab183075cad7aa"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caprover%2Fcaprover-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caprover%2Fcaprover-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caprover%2Fcaprover-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caprover%2Fcaprover-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caprover","download_url":"https://codeload.github.com/caprover/caprover-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509475,"owners_count":22082891,"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-07T04:15:02.801Z","updated_at":"2025-10-25T10:38:00.561Z","avatar_url":"https://github.com/caprover.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CapRover CLI\n\nCommand Line Interface for CapRover.\n\nCapRover is a modern automated app deployment \u0026 web server manager.\n  - Deploy apps in your own space\n  - Secure your services over HTTPS for FREE\n  - Scale in seconds\n  - Focus on your apps! Not the bells and whistles just to run your apps!\n\nFore more information see CapRover.com\n\nAlways refer to the documentation bundled in CLI as it is the most updated one. You can view the help by `caprover --help` or `caprover deploy --help` or etc.\n\n## Getting started\n\nThis guide assumes that you have started CapRover on a linux server and setup your DNS (see [CapRover Setup](https://caprover.com/docs/get-started.html#caprover-setup)).\n\nYou can use this CLI tool to perform initial CapRover server setup, and to deploy your apps.\n\nBefore anything, install the CLI tool using npm:\n```\nnpm install -g caprover\n```\n\n### Usage\n\nYou can use the CLI by typing `caprover` in your console.\n\nThe CLI has several commands, if invoked without a command it display the usage summary:\n```\nUsage: caprover [options] [command]\n\nCLI tool for CapRover. See CapRover.com for more details.\n\nOptions:\n  -V, --version                output the version number\n  -h, --help                   output usage information\n\nCommands:\n  serversetup|setup [options]  Performs necessary actions to prepare CapRover on your server.\n  login [options]              Login to a CapRover machine. You can be logged in to multiple machines simultaneously.\n  list|ls                      List all CapRover machines currently logged in.\n  logout [options]             Logout from a CapRover machine and clear auth info.\n  deploy [options]             Deploy your app to a specific CapRover machine. You'll be prompted for missing parameters.\n  api [options]                Call a generic API on a specific CapRover machine. Use carefully only if you really know what you are doing!\n```\n\n## Commands\n\nAlmost all commands require some data to work. Data for commands can be provided from different sources:\n- Enviroment variables: using variables names specified in command help (note that variable must be exported, or you have to define it inline before the cli command, eg: `ENV_VAR=value caprover command`);\n- Configuration file: JSON or YAML, specifing the file name with an option or its environment variable (usually `-c, --configFile` and `CAPROVER_CONFIG_FILE`), command options names define the keys of the configuration file;\n- Command options: using command options flags directly on the command line;\n- Input prompt: for those data that is not provided from other sources, but needed for the command to work, you'll be prompted to input them during command execution.\n\nIf the same data is provided from different sources, the priority order reflects the above list (the following ones overwrite the previous ones), except for input prompt that is used only if that data is not provided from others sources.\n\nView help for a command to know more details to that command, by running:\n```\ncaprover [command] --help\n```\n\n### Server Setup\n\nThe very first thing you need to do is to setup your CapRover server. You can either do this by visiting `HTTP://IP_ADDRESS_OF_SERVER:3000` in your browser, or the recommended way which is the command line tool.  \nSimply run:\n```\ncaprover serversetup\n```\n\nFollow the steps as instructed: enter IP address of server and the root domain to be used with this CapRover instance. If you don't know what CapRover root domain is, please visit CapRover.com for documentation. This is a very crucial step.  \nAfter that, you'll be asked to change your CapRover server password, and to enter your email address. This should be a valid email address as it will be used in your SSL certificates.  \nAfter HTTPS is enabled, you'll be asked to enter a name for this CapRover machine, to store auth credential locally. And... Your are done! Go to Deploy section below to read more about app deployment.\n\nFor automation purposes, you can provide necessary data before to be prompted for them, for example using a config file like:\n```json\n{\n  \"caproverIP\": \"123.123.123.123\",\n  \"caproverPassword\": \"captain42\",\n  \"caproverRootDomain\": \"root.domain.com\",\n  \"newPassword\": \"rAnDoMpAsSwOrD\",\n  \"certificateEmail\": \"email@gmail.com\",\n  \"caproverName\": \"my-machine-123-123-123-123\"\n}\n```\nAnd then running:\n```\ncaprover serversetup -c /path/to/config.json\n```\n*Note*: you can also use either YAML or JSON.\n\n### Login\n\n*If you've done the \"Server Setup\" process through the command line, you can skip \"Login\" step because your auth credential are automatically stored in the last step of setup.*\n\nThis command does login to your CapRover server and store your auth credential locally.  \nIt is recommended that at this point you have already set up HTTPS. Login over insecure, plain HTTP is not recommended.\n\nTo login to your CapRover server, simply run the following command and answer the questions:\n```\ncaprover login\n```\n\nIf operation finishes successfully, you will be prompted with a success message.\n\n*Note*: you can be logged in to several CapRover servers at the same time; this is particularly useful if you have separate staging and production servers.\n\nFor automation purposes, you can provide necessary data before to be prompted for them, for example using a config file like:\n```json\n{\n  \"caproverUrl\": \"captain.root.domain.com\",\n  \"caproverPassword\": \"captain42\",\n  \"caproverName\": \"testing-1\"\n}\n```\nAnd then running:\n```\ncaprover login -c /path/to/config.json \n```\n*Note*: you can also use either YAML or JSON.\n\n### Deploy\n\nUse this command to deploy your application. Deploy via caprover CLI supports 4 deployments methods: captain-definition file, Dockerfile, tar file, and image name (see [Captain Definition File](https://caprover.com/docs/captain-definition-file.html) for more info).\n\nSimply run the following command and answers questions:\n```\ncaprover deploy\n```\n\nYou will then see your application being uploaded, after that, your application getting built.\n\n*Note*: based on your deployment method, the build process could take multiple minutes, please be patient!\n\nFor automation purposes, you can provide necessary data before to be prompted for them, for example directly on the command line by running:\n```\ncaprover deploy -n machine-name -a app-name -b branchName\n```\n*Note*: you must be logged in to \"machine-name\".\n\nThis can be useful if you want to integrate to CI/CD pipelines.\n\nSee command help to know more details and deployments methods.\n\n### List\n\nUse this command to see a list of CapRover machines you are currently logged in to.  \nRun the following command:\n```\ncaprover list\n```\n\n### Logout\n\nUse this command to logout from a CapRover machine and clear auth info.  \nRun the following command and choose a CapRover machine:\n```\ncaprover logout\n```\n\n### API\n\nUse this command to call a generic API on a CapRover machine, specifying API path, method (GET or POST), and data. There is no official document for the API commands at this point as it is subject to change at any point. But you can use [ApiManager.ts](https://github.com/caprover/caprover-cli/blob/master/src/api/ApiManager.ts) as a starting point. \n\n```\ncaprover api\n```\n\nFor automation purposes, you can provide necessary data before to be prompted for them, for example using a config file like:\n```json\n{\n  \"caproverName\": \"server-1\",\n  \"path\": \"/user/apps/appDefinitions/unusedImages\",\n  \"method\": \"GET\",\n  \"data\": {\n    \"mostRecentLimit\": \"3\"\n  }\n}\n```\nAnd then running (using environment variable for config file value):\n```\nCAPROVER_CONFIG_FILE='/path/to/config.json' caprover api -o output.json\n```\n\n*Note*: use carefully only if you really know what you are doing!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaprover%2Fcaprover-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaprover%2Fcaprover-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaprover%2Fcaprover-cli/lists"}