finalized readme for win mac linux

This commit is contained in:
mik-tf 2024-10-10 10:42:44 -04:00
parent 6d0781cdc4
commit b7f793c8d1

View File

@ -8,13 +8,10 @@
- [Building and Installing](#building-and-installing) - [Building and Installing](#building-and-installing)
- [Rebuild and Uninstall](#rebuild-and-uninstall) - [Rebuild and Uninstall](#rebuild-and-uninstall)
- [Usage](#usage) - [Usage](#usage)
- [Commands](#commands)
- [OS-Specific Instructions](#os-specific-instructions) - [OS-Specific Instructions](#os-specific-instructions)
- [Linux](#linux) - [Linux](#linux)
- [macOS](#macos) - [macOS](#macos)
- [Windows](#windows) - [Windows](#windows)
- [WSL](#wsl)
- [Native Windows](#native-windows)
- [Troubleshooting](#troubleshooting) - [Troubleshooting](#troubleshooting)
- [Development](#development) - [Development](#development)
- [Contributing](#contributing) - [Contributing](#contributing)
@ -31,34 +28,52 @@ Flist CLI is a tool that turns Dockerfiles and Docker images directly into Flist
### Prerequisites ### Prerequisites
- [V programming language](https://vlang.io/) (latest version) installed on your system - [V programming language](https://vlang.io/) (latest version) installed on your system
- Docker installed and running - Docker Engine installed and running (Linux)
- Docker Desktop installed and running (MacOS+Windows)
- Docker Hub account - Docker Hub account
- TF Hub account and token - TF Hub account and token
### Building and Installing ### Building and Installing
Clone this repository, build the project, and install the CLI: - To clone this repository, build the project, and install the CLI:
``` - MacOS and Linux
git clone https://git.ourworld.tf/tfgrid/flist_cli_v ```
cd flist_cli_v git clone https://git.ourworld.tf/tfgrid/flist_cli_v
make build cd flist_cli_v
``` make build
```
- Windows
```
git clone https://git.ourworld.tf/tfgrid/flist_cli_v
cd flist_cli_v
make build-win
```
This will build the `flist` executable and install it to the appropriate system location. This will build the executable and install it to the appropriate system location.
### Rebuild and Uninstall ### Rebuild and Uninstall
You can use the following Makefile commands: You can use the following Makefile commands:
- To rebuild and reinstall: - To rebuild and reinstall:
``` - MacOS and Linux
make rebuild ```
``` make rebuild
```
- Windows
```
make rebuild-win
```
- To uninstall and remove the binary: - To uninstall and remove the binary:
``` - MacOS and Linux
make delete ```
``` make delete
```
- Windows
```
make delete-win
```
## Usage ## Usage
@ -68,24 +83,13 @@ After installation, you can use the `flist` command followed by various subcomma
flist <command> [arguments] flist <command> [arguments]
``` ```
## Commands Run `flist` or `flist help` to see all available commands for your specific OS.
- `install`: Install the Flist CLI
- `uninstall`: Uninstall the Flist CLI
- `login`: Log in to Docker Hub and save the Flist Hub token
- `logout`: Log out of Docker Hub and remove the Flist Hub token
- `push <image>:<tag>`: Build and push a Docker image, then convert and push it as an flist
- `delete <flist_name>`: Delete an flist from Flist Hub
- `rename <flist_name> <new_flist_name>`: Rename an flist in Flist Hub
- `ls`: List all flists of the current user
- `ls url`: List all flists of the current user with full URLs
- `help`: Display help information
## OS-Specific Instructions ## OS-Specific Instructions
### Linux ### Linux
1. Ensure Docker is installed and the Docker daemon is running. 1. Ensure Docker Engine is installed and running.
2. The `flist` executable will be installed to: 2. The `flist` executable will be installed to:
``` ```
/usr/local/bin/flist /usr/local/bin/flist
@ -101,39 +105,25 @@ flist <command> [arguments]
### Windows ### Windows
#### WSL 1. Ensure Docker Desktop is installed and running.
2. Run the program and installer in an admin PowerShell.
You can use WSL with Ubuntu to deploy the Flist CLI on Windows. 3. The `flist.exe` executable will be installed to:
```
#### Native Windows C:\\Program Files\\flist\\flist.exe
```
When using the make commands, add `-win` to the commands: `make build-win`, `make rebuild-win`, `make delete-win`.
- Run make for Windows on Powershell Admin:
```
git clone https://git.ourworld.tf/tfgrid/flist_cli_v
cd flist_cli_v
make build-win
```
- Run in Powershell Admin the following lines then restart the shell
```
$newPath = 'C:\Program Files\flist'
setx PATH "$($env:PATH);$newPath"
```
## Troubleshooting ## Troubleshooting
- If you encounter permission issues, ensure you're running the command with appropriate privileges (e.g., as administrator on Windows or with `sudo` on Unix-like systems). - If you encounter permission issues, ensure you're running the command with appropriate privileges (e.g., as administrator on Windows or with `sudo` on Unix-like systems).
- Make sure Docker is running before using Flist CLI commands.
- If you face issues with Docker commands, try logging out and logging back in to refresh your Docker credentials. - If you face issues with Docker commands, try logging out and logging back in to refresh your Docker credentials.
- If you encounter compilation errors, ensure you have the latest version of V installed. - If you encounter compilation errors, ensure you have the latest version of V installed. To update v, run `v up`.
## Development ## Development
To modify the Flist CLI: To modify the Flist CLI:
1. Make your changes to the `flist.v` file. 1. Make your changes to the `flist.v` file.
2. Rebuild the project using `make rebuild` 2. Rebuild the project using using the appropriate Make command.
3. Test your changes thoroughly across different operating systems if possible. 3. Test your changes thoroughly across different operating systems if possible.
## Contributing ## Contributing