CKli 0.7.0
dotnet tool install --global CKli --version 0.7.0
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local CKli --version 0.7.0
#tool dotnet:?package=CKli&version=0.7.0
nuke :add-package CKli --version 0.7.0
CKli
CKli is a tool for <u>multi-repositories</u> stacks. It allows to automate actions(build, package upgrade, etc...), on <u>Worlds</u> (a group of repositories), and concentrates informations in a single place.
Getting Started
Prerequisites
Installation
CKli is a dotnet tool. You can install it globally by running :
#latest stable
dotnet tool install CKli -g
Run CKli
If you installed CKli globally, you can run ckli
in any command prompt to start it.
⚠️ On Linux, the Path environment variable of your shell need to be updated.
First Run
Since there is no Stack defined yet, CKli initializes one Repository that contains the CK and CK-Build stacks. Both of them are mapped to '/Dev/CK' by default: their repositories will be cloned in this folder. (Note that you can 'run World/SetWorldMapping' command to update this default mapping.)
CK and CK-Build are public Stacks in a Public repository: they should be cloneable by anyone. This is not always the case: CKli can work with private stacks that require authorizations: some secrets will be required (and of course even CK and CK-Build require secrets in order to push code).
CKli manages a KeyVault where all your secrets are stored. You must enter a password to secure this key vault, and every time you start CKli, you will be prompted for your KeyVault password. (If you trust your desktop security, this password doesn't need to be strong.)
Once the required KeyVault password is entered, press enter
:
--------- Worlds ---------
- CK
> 1 CK => /Dev/CK
- CK-Build
> 2 CK-Build => /Dev/CK-Build
> 3 CK-Build[NetCore2] => /Dev/CK-Build[NetCore2]
This lists the available Stacks and their Worlds.
By submiting the number of a World (type the number and press enter
) you can open it.
CKli will clone every missing repository.
Commands
There is 5 <u>basic commands</u> available, that allow you to:
list
and discover available commands.run
one or more of commands.- clear the screen, with
cls
. - manage your
secret
keys. exit
.
These <u>basic commands</u> are available everywhere but the actual commands are the one that you run
and they depend on the context.
run
and list
first parameter is a command name or a pattern with simple wildcards (* and ?).
For example, list home*
will return any command starting with home
:
Available Commands matching 'home*':
Home/Close
Home/DeleteStackRepository
Home/EnsureStackRepository
Home/SetWorldMapping
You can notice that the filtering is <u>case insensitive</u>.
ℹ️ run
will only work on a set of commands with the same payload (parameters).
> run home*
Will output:
> Warn: Pattern 'home*' matches require 4 different payloads.
| - Warn: (stackName, url, isPublic, mappedPath, branchName): Home/EnsureStackRepository
| (stackName): Home/EnsureStackRepository
| (worldFullName, mappedPath): Home/SetWorldMapping
| <No payload>: Home/Close, Home/Refresh
QuickStart: Cloning a World
Gets the URL of the stack you want to clone:
Stack Name | Repository URL | |
---|---|---|
CK | https://github.com/signature-opensource/CK-Stack | Public |
CK-Build | https://github.com/CK-Build/CK-Build-Stack | Public |
Engie | https://invenietis@dev.azure.com/invenietis/Cofely/_git/Engie-Stack | Private |
SC | https://gitlab.com/signature-code/SC-Stack | Private |
SMos | https://gitlab.com/signature-mosaic/SMos-Stack | Private |
SLog | https://gitlab.com/signature-logistic/SLog-Stack | Private |
FirstDown | https://dev.azure.com/invenietis/FirstDown/_git/FirstDown-Stack | Private |
Type run Home/EnsureStackRepository
(or run *ensure*
since there is no other command with Ensure
in its name) and press enter
.
You now need to fill the argument of this command that is the url and whether it is a Public or a Private stack:
[required] - url: #The Url of the stack you are cloning
[required] - isPublic: #true for public stack, false otherwise
If you see any warning, read them carefully: you may have a secret missing (and please note that the Public/Private flag is to handle the secrets requirements only: if you don't have the authorizations to access a repository, it is useless to try to make it Public!).
Type secret
to see all the secrets needed by CKli. You may not need to fill all of these, only those asked in the warning.
To set a secret, type secret set SECRET_NAME
.
Once the required secrets entered, press enter
:
--------- Worlds ---------
- CK
> 1 CK => /Dev/CK
- CK-Build
> 2 CK-Build => /Dev/CK
> 3 CK-Build[NetCore2] => /Dev/CK-Build[NetCore2]
- SC
> 4 SC => C:/dev/CK
Upon opening a World, CKli will clone all the repositories.
To open a world, type its number then press enter
.
Worlds And Stacks
A World is a set of repositories.
A Stack has a default World and zero or more Parallel World.
--------- Worlds ---------
- CK #A Stack
> 1 CK => /Dev/CK #A World (the default one of the CK stack).
- CK-Build #Another Stack...
> 2 CK-Build => /Dev/CK-Build #...and its default World...
> 3 CK-Build[NetCore2] => /Dev/CK-Build[NetCore2] #...and a Parallel World.
You can list the worlds by simply pressing enter
instead of typing a command.
To open a World, type its number then press enter
.
To close a world, run Home/Close
.
To add a Stack, use the command Home/EnsureStackRepository
Note: Stack definitions, mappings to local directories, world states, etc. are simple xml or text files. It is not recommended to interact with them directly, but having a look at them helps understand CKli.
- On Windows: explore
%LocalAppData%/CKli
folder. - On Unix:
cd $HOME/.local/share/CKli
.
Add an existing Stack
CKli does not know where your stack are defined.
Ensure Stack Repository
In this example, we will add the stack SC (Signature-Code).
SC is a private stack, if you don't have access to https://gitlab.com/signature-code/signature-code-stack, you can not reproduce this example.
Run Home/EnsureStackRepository
Fill the parameters of the command like below :
> SC #stack's name
> https://gitlab.com/signature-code/signature-code-stack #Git URL containing the stack
> false #Whether the stack is public
> C:/dev/CK #local mapping
> #leave empty
> y #Confirm
ℹ️ The local mapping is the location where the Stack will be cloned on your PC.
Signature-Code being a private stack, CKli will not be able to clone the repository automatically.
Press Enter
to see the Worlds list. You can see that that CKli couldn't clone automatically the repository, because the PAT(Personal Access Token) for GitLab is missing.
Add the GitLab PAT
Create your PAT on GitLab: https://gitlab.com/profile/personal_access_tokens
For Your Information, here are the URLs to create your PATs on other git services:
Azure
- Invenietis: https://dev.azure.com/invenietis/_usersSettings/tokens
- Signature-OpenSource: https://dev.azure.com/Signature-OpenSource/_usersSettings/tokens
- Signature-Code: https://dev.azure.com/Signature-Code/_usersSettings/tokens
Run secret set GITLAB_GIT_WRITE_PAT
Paste the previously obtained token
Enter 'GITLAB_GIT_WRITE_PAT' secret (empty to cancel): I2MjVkYzIxZWYwNWY2YWQ0ZGRmNDdjNWYy
Then press enter, and you secret is now stored in your KeyVault.
The new stack will now be displayed:
--------- Worlds ---------
- CK
> 1 CK => /Dev/CK
- CK-Build
> 2 CK-Build => /Dev/CK
> 3 CK-Build[NetCore2] => /Dev/CK-Build[NetCore2]
- SC
> 4 SC => C:/dev/CK
To open a World, you can type its number and press enter
: CKli will automatically clone all
the repositories of SC. Press enter
again and (since you are inside the SC stack) the SC's
repositories with their respective statuses are listed.
🎉 You are now ready to operate on a World. To see what you can do, please head to the Common Usages.
See Also
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
0.7.0 | 349 | 3/7/2023 |
0.6.0 | 381 | 12/22/2022 |
0.5.3 | 524 | 7/17/2022 |
0.5.2 | 511 | 7/12/2022 |
0.5.1 | 644 | 6/22/2022 |
0.5.0 | 557 | 6/22/2022 |
0.5.0-r12 | 277 | 4/28/2022 |
0.5.0-r11 | 373 | 4/26/2022 |
0.5.0-r07 | 365 | 2/2/2022 |
0.5.0-r06 | 340 | 1/26/2022 |
0.5.0-r05 | 315 | 1/25/2022 |
0.5.0-r04 | 350 | 1/23/2022 |
0.5.0-r03 | 281 | 1/14/2022 |
0.5.0-r02 | 388 | 1/11/2022 |
0.5.0-r01 | 298 | 1/5/2022 |
0.5.0-r | 322 | 12/27/2021 |
0.4.15 | 580 | 1/10/2021 |
0.4.14 | 533 | 1/7/2021 |
0.4.13 | 519 | 1/4/2021 |
0.4.12 | 466 | 1/4/2021 |
0.4.11 | 460 | 12/21/2020 |
0.4.10 | 605 | 11/7/2020 |
0.4.9 | 574 | 9/18/2020 |
0.4.8 | 576 | 8/27/2020 |
0.4.7 | 528 | 7/28/2020 |
0.4.6 | 622 | 7/27/2020 |
0.4.5 | 599 | 7/19/2020 |
0.4.4 | 637 | 5/27/2020 |
0.4.3 | 588 | 5/23/2020 |
0.4.2 | 540 | 5/22/2020 |
0.4.1 | 527 | 5/16/2020 |
0.4.0 | 583 | 5/10/2020 |
0.3.5 | 573 | 4/26/2020 |
0.3.4 | 641 | 4/14/2020 |
0.3.3 | 595 | 4/8/2020 |
0.3.2 | 651 | 4/7/2020 |
0.3.1 | 663 | 3/14/2020 |
0.3.0 | 608 | 3/11/2020 |
0.2.0 | 785 | 2/20/2020 |
0.1.8 | 550 | 12/2/2019 |
0.1.7 | 554 | 11/13/2019 |
0.1.6 | 602 | 11/12/2019 |
0.1.6-a | 413 | 11/4/2019 |
0.1.5 | 603 | 10/30/2019 |
0.1.4 | 581 | 10/29/2019 |
0.1.3 | 582 | 10/29/2019 |
0.1.2 | 587 | 10/29/2019 |
0.1.1 | 609 | 10/25/2019 |
0.1.1-a | 425 | 10/22/2019 |
0.1.0 | 655 | 10/16/2019 |
0.1.0-a | 484 | 8/30/2019 |