Container CLI is a powerful tool designed to install and execute containerized projects as local commands seamlessly. This document will provide steps on installing, using, and maintaining this CLI tool effectively.
- Navigate to the Container CLI Releases.
- Download the appropriate release for your operating system.
- Open a terminal and navigate to the directory where the release file is downloaded.
- Extract the downloaded tar file:
tar -xvf ~/Downloads/container-cli_Linux_x86_64.tar.gz
- Execute the binary file to install
container-cli
:./container-cli install
-
Run the following command to install a project:
ccli project install \ --name <project_name> \ --url <git_url> \ --dest <destination_path> \ --command <default_command> \ --alias <command_alias>
Example:
ccli project install \ --name big-salad \ --url ssh://git@gitlab.com/locke-codes/big-salad.git \ --dest ~/.local/share \ --command bs \ --alias bs
-
Replace
<project_name>
,<git_url>
,<destination_path>
,<default_command>
,<command_alias>
with appropriate values. -
Run the command using the command alias like:
bs --help
. NOTE: If you do not pass the alias flag the command will default to the project name
You can use the interactive mode to install a new project. This allows you to input the required fields step-by-step directly in the terminal.
Run the following command:
ccli project install
You will then be prompted to enter the required details interactively, such as:
- Project Name: Enter the name of the project.
- Git URL: Provide the repository's Git URL.
- Destination Path: Specify the path where the project should be installed.
- Command: The default command to execute in the docker container
For example, the session may look like:
❯ ccli project install
Enter Project Name: big-salad
Enter Git URL: ssh://git@gitlab.com/locke-codes/big-salad.git
Enter Destination Path: /home/user/projects
Enter Command: bs
Once all inputs are provided, the project will be installed and can be executed using the specified alias.
Example:
big-salad format yaml test.yaml
After installing a project, you can run it using the alias command you specified during installation. For example:
big-salad format yaml test.yaml
To update Container CLI to the latest version:
ccli update
To check the current version of Container CLI:
ccli version
Below are some of the primary commands for ccli
:
Command | Description |
---|---|
install |
Installs the ContainerCLI binary. |
update |
Updates the CLI tool to the latest version. |
version |
Displays the current version of the CLI. |
project |
Manage projects (install, remove, etc.). |
help |
Shows help for commands or a list of commands. |
- golangci-lint
- pre-commit
Once pre-commit is installed run pre-commit install-hooks
- Add Makefile targets for usage during ci/cd to run tests etc. Bring back Dockerfile was it is useful
- Add more complete unit testing
- Create and include a usage demonstration video.