diff --git a/cli/README.md b/cli/README.md index a24f4c131..fc241cb6d 100644 --- a/cli/README.md +++ b/cli/README.md @@ -1,44 +1,65 @@ -# Command Line Utility for exporting data from [Ente](https://ente.io) +# Ente CLI + +The Ente CLI is a Command Line Utility for exporting data from +[Ente](https://ente.io). It also does a few more things, for example, you can +use it to decrypting the export from Ente Auth. ## Install -You can either download the binary from the [GitHub releases -page](https://github.com/ente-io/ente/releases?q=tag%3Acli-v0&expanded=true) or -build it yourself. +The easiest way is to download a pre-built binary from the [GitHub +releases](https://github.com/ente-io/ente/releases?q=tag%3Acli-v0&expanded=true). -### Build from source +You can also build these binaries yourself + +```shell +./release.sh +``` + +Or you can build from source ```shell go build -o "bin/ente" main.go ``` -### Getting Started +The generated binaries are standalone, static binaries with no dependencies. You +can run them directly, or put them somewhere in your PATH. + +There is also an option to use [Docker](#docker). + +## Usage Run the help command to see all available commands. + ```shell ente --help ``` -#### Accounts +### Accounts + If you wish, you can add multiple accounts (your own and that of your family members) and export all data using this tool. -##### Add an account +#### Add an account + ```shell ente account add ``` -##### List accounts +#### List accounts + ```shell ente account list ``` -##### Change export directory +#### Change export directory + ```shell ente account update --email email@domain.com --dir ~/photos ``` ### Export -##### Start export + +#### Start export + ```shell ente export ``` @@ -51,16 +72,22 @@ If you fancy Docker, you can also run the CLI within a container. ### Configure -Modify the `docker-compose.yml` and add volume. -``cli-data`` volume is mandatory, you can add more volumes for your export directory. +Modify the `docker-compose.yml` and add volume. ``cli-data`` volume is +mandatory, you can add more volumes for your export directory. Build the docker image + ```shell docker build -t ente:latest . ``` +Note that [BuildKit](https://docs.docker.com/go/buildkit/) is needed to build +this image. If you face this issue, a quick fix is to add `DOCKER_BUILDKIT=1` in +front of the build command. + Start the container in detached mode -```bash + +```shell docker-compose up -d ``` @@ -69,20 +96,8 @@ docker-compose up -d docker-compose exec ente /bin/sh ``` - #### Directly executing commands ```shell docker run -it --rm ente:latest ls ``` - ---- - -## Releases - -Run the release script to build the binary and run it. - -```shell -./release.sh -``` - diff --git a/cli/docs/release.md b/cli/docs/release.md new file mode 100644 index 000000000..a539e7e5d --- /dev/null +++ b/cli/docs/release.md @@ -0,0 +1,21 @@ +# Releasing + +Tag main, and push the tag. + +```sh +git tag cli-v1.2.3 +git push origin cli-v1.2.3 +``` + +This'll trigger a [GitHub workflow](../../.github/workflows/cli-release.yml) +that creates a new draft GitHub release and attaches all the build artifacts to +it (zipped up binaries for various OS and architecture combinations). + +## Local release builds + +Run the release script to build the binaries for the various OS and architecture +cominations + +```shell +./release.sh +```