https://github.com/bitcoin-balancer/cli-lite
The cli-lite is a lightweight yet powerful command-line interface designed to make managing Balancer's infrastructure effortless, even for non-technical users.
https://github.com/bitcoin-balancer/cli-lite
bitcoin dca dollar-cost-averaging investment open-source profit strategy trading trading-strategy value-averaging
Last synced: 6 months ago
JSON representation
The cli-lite is a lightweight yet powerful command-line interface designed to make managing Balancer's infrastructure effortless, even for non-technical users.
- Host: GitHub
- URL: https://github.com/bitcoin-balancer/cli-lite
- Owner: bitcoin-balancer
- License: other
- Created: 2025-01-28T19:28:56.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-21T15:57:01.000Z (8 months ago)
- Last Synced: 2025-02-21T16:25:46.367Z (8 months ago)
- Topics: bitcoin, dca, dollar-cost-averaging, investment, open-source, profit, strategy, trading, trading-strategy, value-averaging
- Language: TypeScript
- Homepage: https://balancer.jesusgraterol.dev/
- Size: 141 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `cli-lite`
The `cli-lite` is a lightweight yet powerful command-line interface designed to make managing Balancer's infrastructure effortless, even for non-technical users. It enables you to:
* **Quickly set up your instance** – Scaffold your Balancer instance safely and efficiently, following best practices
* **Automate infrastructure tasks** – Seamlessly handle provisioning, scaling, and monitoring with minimal effort
* **Securely access remote servers** – Connect to your production environment via secure SSH connections on [DigitalOcean](https://www.digitalocean.com/)
* **And more!**With its intuitive syntax and comprehensive functionality, `cli-lite` streamlines complex operations, saves time, and ensures consistency in infrastructure management.
## Usage
Navigate into `cli-lite` directory and start the program:
```bash
cd cli-lite && npm start
```
## Requirements
### Software
- UNIX-like OS
- git `^v2.43.0`
- Node.js `^v22.11.0`
- npm `^v10.9.0`
- Docker Engine `^v27.3.1`
- Docker Compose `^v2.29.7`### Hardware
- 1 Shared CPU
- 1 GB Memory
- 25 GB Storage (Regular SSD)
## Getting Started
1. [Setup a virtual machine (DigitalOcean)](./docs/setup-vm/index.md)
2. [Install dependencies](./docs/install-dependencies/index.md)
3. [Install and configure `cli-lite`](./docs/install-configure-cli-lite/index.md)
4. [Setup Telegram (Optional)](./docs/setup-telegram/index.md)
## CLI Actions
### Docker Compose
up
Generates the environment assets and the `compose.yaml` file. Next, it prunes docker objects and restarts the daemon. Finally, it pulls the latest images from the registry, creates and starts the containers.
When executed, after generating the environment assets and the `compose.yaml` file, it runs:
```bash
docker system prune --all --forcesystemctl restart docker
docker compose up --pull always --no-build --detach
```
down
Stops containers and removes containers, networks, volumes, and images created by
up
.
When executed, it runs:
```bash
docker compose down
```
down-up
Stops containers and removes containers, networks, volumes, and images created by
up
with:
```bash
docker compose down
```
Finally, it generates the environment assets, the `compose.yaml` file and runs:
```bash
docker system prune --all --forcesystemctl restart docker
docker compose up --pull always --no-build --detach
```
restart
Restarts all stopped and running services with:
```bash
docker compose restart
```
logs
Displays and subscribes to the log output from all services. If a variation is provided, it narrows down the logs to a specific service.
```bash
docker compose logs -f# if a variation is provided
docker compose logs -f
```
The following variations are supported:
-
logs:postgres
displays log output from the postgres service-
logs:api
displays log output from the api service-
logs:gui
displays log output from the gui service-
logs:ct
displays log output from the cloudflared service
prune
Removes all unused containers, networks and images (both dangling and unused) with:
```bash
docker system prune --all --force
```
restart-daemon
Restarts the Docker service on the host machine with:
```bash
systemctl restart docker
```
### Configuration
view-config
Displays the data stored in the `config.json` file.
update-config-*
Updates the mutable properties in the `config.json` file one at a time. The following properties are mutable and can be changed by this action:
- `GUI_URL`
- `TELEGRAM`
- `EXCHANGE_*`
- `TUNNEL_TOKEN`
### CLI Management
update-cli
Downloads the latest version of `cli-lite`, installs its dependencies, and compiles it.
When executed, it runs:
```bash
git pull origin mainnpm ci
npm run build
```
### Database Management
psql
Starts the terminal-based front-end to PostgreSQL.
When executed, it runs:
```bash
docker compose exec -it postgres psql -U postgres
```
## Docker Images
- [postgres](https://hub.docker.com/_/postgres)
- [jesusgraterol/balancer-api](https://hub.docker.com/r/jesusgraterol/balancer-api)
- [jesusgraterol/balancer-gui](https://hub.docker.com/r/jesusgraterol/balancer-gui)
- [jesusgraterol/balancer-ct](https://hub.docker.com/r/jesusgraterol/balancer-ct)
## Tests
```bash
# run the integration tests
npm run test:integration# run the unit tests
npm run test:unit
```
## License
[Apache v2.0](https://www.apache.org/licenses/LICENSE-2.0)