[cli] Improve docs (#730)

- Improve CLI installation documentation, as requested in
https://github.com/ente-io/ente/discussions/709.
- Document BuildKit requirement, as requested in
https://github.com/ente-io/ente/issues/712.
This commit is contained in:
Manav Rathi 2024-03-07 13:12:57 +05:30 committed by GitHub
commit 06c4f5791b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 62 additions and 26 deletions

View file

@ -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
```

21
cli/docs/release.md Normal file
View file

@ -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
```