This repository is a template for an example plugin in rust for the Atlas CLI.
For more information on how Atlas CLI plugins work, please see the Atlas CLI plugin ocumentation.
Important note: This template needs Atlas CLI 1.35.0+ to work (which is not yet released as of today 2024-12-19, this commit is needed: https://github.com/mongodb/mongodb-atlas-cli/commit/0c757933bcb6580141ab7b5f6f06d58a741cb5c1)
This repository is a template repository.
- Press "Use this template" button to create a new repository from this template.
- Update
Cargo.toml
with your plugin information.name
: The name of your plugin.description
: A short description of your plugin.repository
: The URL of your GitHub repository.version
: The version of your plugin.
- Update
manifest.template.yml
with your plugin information.name
: The name of your plugin.description
: A short description of your plugin.commands
: A list of commands for your plugin. Update this after updating the source code.
- Update the source code with your plugin logic.
Once you have updated the source code, you can create a new release.
This template has github actions setup to create a new release when a new tag is created.
This example will describe how to create a new release with version number 1.0.0
.
- Bump the version number in
Cargo.toml
.- update the version number to
1.0.0
- commit the change
- update the version number to
- Create a tag which matches the version number.
git tag v1.0.0
git push --tags
- Go to the actions tab of your repository and follow the action which creates a new release.
- After a few minutes, you should see a new release in the releases tab.
You can run your plugin with the following steps:
- Install the Atlas CLI plugin.
atlas plugin install [your-username]/[your-plugin-repository]
- Verify the plugin is installed.
atlas plugin list
- Run the plugin.
atlas [your-plugin-command]