Registry¶
In this section, we will demonstrate how to register a new package to the KnitPkg Registry using the barhelper project created earlier. See Registry to check out what the registry is.
Registering a New Project¶
To register a project to the registry, follow these steps:
-
Prepare the project for registration:
- Ensure the
knitpkg.yamlmanifest is complete and up to date. - For packages, run
kp checkinstallto validate all@knitpkg:includedirectives. - Add a short description of the current version in the
version_descriptionfield. For new projects, use something like"Initial creation". - Make sure your manifest includes metadata that improves discoverability (see next section).
- Ensure the
-
Commit and push to a public Git repository:
- Your repository must be public to be registered in the Free tier.
-
Run
kp registerto register the project.
Improving Discoverability in the Registry¶
To make your project easier to find via kp search, configure the following fields in your knitpkg.yaml:
description: A short summary of what your project does.keywords: Add relevant tags to improve searchability.
How Registry Search Works¶
The KnitPkg Registry supports flexible search capabilities via kp search:
- Generic search:
--querysearches acrossname,keywords, anddescription(in that order). - Filters: Use
--organization,--type,--author, or--licenseto narrow results. - Sorting: Use
--sort-byand--sort-orderto control result order. - Pagination: Use
--pageand--page-sizeto control result size and navigation.
Example: Registering barhelper¶
First, check the Git status:
Expected output:
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
LICENSE
README.md
knitpkg.yaml
knitpkg/
tests/
nothing added to commit but untracked files present (use "git add" to track)
If you didn’t initialize Git during kp init, run git init first.
Now stage and commit the files:
Switch to the default branch (main for example) and push to the remote:
git switch -c main
git remote add origin https://forge.mql5.io/DouglasRechia/barhelper.git
git push -u origin main
Now the code is also in the remote repository, see it here.
Ensure the repository is public. Private repositories are not supported in the Free tier.
Logging in to the Registry¶
Before registering, log in using your Git provider credentials with kp login:
This opens a browser window for secure OAuth authentication.
To check your current session:
Example output:
👤 User Information
ID: 3
Username: ---------
Provider: mql5forge
Email: -----@--------
Subscription Tier: FREE
Registering the Project¶
Run:
You should see output like this:

KnitPkg will verify:
- The repository is public
- You have push access to the repository
Only users with write access can register a project.
Note
By registering a project, you agree to the Terms of Service.
To confirm the project was registered:

Searching the Registry¶
To search for projects:
Try different queries and filters. See more options in the kp search CLI reference.
To inspect project versions:
Yank a Version¶
If you discover a critical issue in a released version, you can yank it:
Yanked versions:
- Are not resolved by version ranges
- Can still be resolved via exact match or with
--locked
Other Useful Registry Commands¶
kp logout: Logs out from the registrykp status: Show registry status and configuration along with supported Git providerskp get: Download and build a project in one step
See the CLI reference and Registry concepts for more details.