ente/cli/README.md

87 lines
1.4 KiB
Markdown
Raw Normal View History

2023-10-25 11:54:36 +00:00
# Command Line Utility for exporting data from [Ente](https://ente.io)
2023-09-25 08:49:03 +00:00
2023-10-21 08:56:32 +00:00
## Install
You can either download the binary from the [release page](https://github.com/ente-io/cli/releases) or build it yourself.
### Build from source
```shell
2023-10-25 11:54:36 +00:00
go build -o "bin/ente" main.go
2023-10-21 08:56:32 +00:00
```
2023-09-14 07:33:20 +00:00
2023-09-21 12:40:18 +00:00
### Getting Started
2023-10-21 08:56:32 +00:00
Run the help command to see all available commands.
```shell
2023-10-25 11:54:36 +00:00
ente --help
2023-10-21 08:56:32 +00:00
```
2023-09-21 12:40:18 +00:00
2023-10-21 08:56:32 +00:00
#### Accounts
2023-10-25 11:54:36 +00:00
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
```shell
ente account add
```
##### List accounts
```shell
ente account list
```
2023-10-18 07:11:20 +00:00
2023-10-25 11:54:36 +00:00
##### Change export directory
```shell
ente account update --email email@domain.com --dir ~/photos
```
2023-09-21 12:40:18 +00:00
2023-10-21 08:56:32 +00:00
### Export
2023-10-25 11:54:36 +00:00
##### Start export
```shell
ente export
```
---
2023-09-21 12:40:18 +00:00
2023-10-18 12:22:41 +00:00
## Docker
2023-10-25 11:54:36 +00:00
If you fancy Docker, you can also run the CLI within a container.
2023-10-18 12:22:41 +00:00
### Configure
2023-10-25 11:54:36 +00:00
2023-10-18 12:22:41 +00:00
Modify the `docker-compose.yml` and add volume.
``cli-data`` volume is mandatory, you can add more volumes for your export directory.
2023-10-25 11:54:36 +00:00
Build the docker image
```shell
docker build -t ente:latest .
```
Start the container in detached mode
```bash
docker-compose up -d
```
`exec` into the container
2023-10-18 12:22:41 +00:00
```shell
2023-10-25 11:54:36 +00:00
docker-compose exec ente /bin/sh
2023-10-18 12:22:41 +00:00
```
2023-10-25 11:54:36 +00:00
#### Directly executing commands
2023-10-18 12:22:41 +00:00
2023-10-25 11:54:36 +00:00
```shell
docker run -it --rm ente:latest ls
```
2023-10-18 12:22:41 +00:00
2023-10-25 11:54:36 +00:00
---
2023-10-18 12:22:41 +00:00
2023-10-21 08:56:32 +00:00
## Releases
2023-09-14 07:33:20 +00:00
Run the release script to build the binary and run it.
```shell
2023-10-25 11:54:36 +00:00
./release.sh
2023-09-14 07:33:20 +00:00
```