# \[SHOWCASE\] Script Plugin

**URL:** <https://community.cloudogu.com/t/showcase-script-plugin/233>\
**Category:** SCM-Manager (General)\
**Tags:** showcase\
**Created:** [September 28, 2021, 12:38pm UTC](https://community.cloudogu.com/t/showcase-script-plugin/233 "2021-09-28T12:38:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eheimbuch](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/eheimbuch/32/18_2.png) [@eheimbuch](https://community.cloudogu.com/u/eheimbuch)\
**Post date:** [September 28, 2021, 12:38pm UTC](https://community.cloudogu.com/t/showcase-script-plugin/233/1 "2021-09-28T12:38:09Z")

</div>

# Script collection

## Introduction

The [Script Plugin](https://scm-manager.org/plugins/scm-script-plugin/docs/latest/en/run/) allows you to use the internal SCM-Manager API, which is not accessible to the REST API or other clients. Scripts are especially useful when you want to do something after a specific event is triggered. You can also change multiple repositories, users, or groups at once.

## How to use

If you want to try it out, install the Script Plugin and simply paste the contents of any sample script into the `Run` field and start the script.

 ![Screenshot from 2021-09-28 14-41-21](https://europe1.discourse-cdn.com/flex013/uploads/cloudogu2/original/1X/6e99298f216d3baadc215b69e5e86fb276330b01.png)

## Examples

To give you an idea what you could do with the script plugin:

- [Rename a whole namespace](https://cloudogu.windcloud.de/scm/repo/showcase/script-plugin/code/sources/main/rename-namespace.groovy/)
- [Delete a whole namespace](https://cloudogu.windcloud.de/scm/repo/showcase/script-plugin/code/sources/main/delete-namespace.groovy/)
- [Create a new user](https://cloudogu.windcloud.de/scm/repo/showcase/script-plugin/code/sources/main/create-user.groovy/)
- [Reverse Mirror](https://cloudogu.windcloud.de/scm/repo/showcase/script-plugin/code/sources/main/reverse-mirror.groovy/) =\> Push every change to a remote repository

### Other possibilities

- Set all Subversion repositories to `archived`
- Delete all inactive users
- Send a notification to discord on each repository push
- Almost everything the SCM-Manager can do

In this [repository](https://cloudogu.windcloud.de/scm/repo/showcase/script-plugin/code/sources/main/) we will collect scripts from simple to very complex examples.  
If you want to share your scripts with the community, contact us, and we will add them here.

## Disclaimer

Since you can do almost everything possible in SCM-Manager, you should be aware that you can use scripts to delete your data or even destroy your whole instance.  
Therefore, check your scripts carefully before applying them to your production data.

* * *

We know that using our internal API can be very difficult if you don’t know what classes, services and functions we provide. Feel free to ask us if your script doesn’t work as it should or you have no idea how to get started.

---

<div class="post-metadata">

**Author:** ![girishkg](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/girishkg/32/183_2.png) [@girishkg](https://community.cloudogu.com/u/girishkg)\
**Post date:** [November 5, 2021, 5:52pm UTC](https://community.cloudogu.com/t/showcase-script-plugin/233/2 "2021-11-05T17:52:56Z")

</div>

This is awesome feature saving my time exploring the API possibilities. 👌 👍

---

<div class="post-metadata">

**Author:** ![christoph.loose](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/christoph.loose/32/1400_2.png) [@christoph.loose](https://community.cloudogu.com/u/christoph.loose)\
**Post date:** [July 19, 2022, 6:26am UTC](https://community.cloudogu.com/t/showcase-script-plugin/233/3 "2022-07-19T06:26:50Z")

</div>


