> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/enterprise-guide/keeper-msp/msp-developer-apis/commander-template.md).

# Commander Template

Keeper Commander CLI for Managed Service Providers

Use this script to create a standard managed-company structure in Keeper Commander.

It creates six teams, three shared folders, and their permissions.

| Team           | Access                     |
| -------------- | -------------------------- |
| IT Management  | Manage all folders.        |
| Server Admins  | Manage the Servers folder. |
| Network Admins | Manage the Network folder. |
| Helpdesk       | Manage the Users folder.   |
| SOC            | Manage all folders.        |
| NOC            | Read all folders.          |

The script creates `Users`, `Servers`, and `Network` folders. It prefixes each folder with the managed-company name.

{% hint style="info" %}
Install [Keeper Commander](/enterprise-guide/commander-cli.md) before running the script.
{% endhint %}

### Run the script

Use a [persistent login](/keeperpam/commander-cli/commander-installation-setup/logging-in.md#persistent-login-sessions-stay-logged-in). Your account needs access to both Keeper Console and Vault.

1. Save the script as `NewClientFolders.bash`.
2. Replace `<CompanyName>` with a managed-company name.
3. Run `NewClientFolders.bash ABC | keeper --batch-mode -`.

```bash
#!/bin/bash
#
# Usage: NewClientFolders.bash <CompanyName> | keeper --batch-mode -
#
#########################################################################
if [ "${1}" == "" ] || [ $# -gt 1 ]; then
        echo "Please include new Company Name as parameter 1"
        echo "Usage: NewClientFolders.bash <CompanyName> | keeper --batch-mode -"
        exit 0
fi

### Create new teams
echo "enterprise-team --add  --approve \"IT Management\""
echo "enterprise-team --add  --approve \"${1}-Server Admins\""
echo "enterprise-team --add  --approve \"${1}-Network Admins\""
echo "enterprise-team --add  --approve \"${1}-Helpdesk\""
echo "enterprise-team --add  --approve \"${1}-SOC\""
echo "enterprise-team --add  --approve \"${1}-NOC\""

### Create new shared Folders
echo "mkdir -uf \"${1}\""				      # Create Company organizational folder.
echo "mkdir -sf \"${1}\"/\"${1}-Users\""                      # Create shared folder with default permissions.
echo "mkdir -sf \"${1}\"/\"${1}-Servers\""                    
echo "mkdir -sf \"${1}\"/\"${1}-Network\""                   

### Add teams to shared folders
### IT Management Team
echo "share-folder -a grant  -o on -e \"IT Management\" \"${1}\"/\"${1}-Users\""               # -o manage users
echo "share-folder -a grant  -o on -e \"IT Management\" \"${1}\"/\"${1}-Servers\""        
echo "share-folder -a grant  -o on -e \"IT Management\" \"${1}\"/\"${1}-Network\""        

### Server Admins Team
echo "share-folder -a grant  -d on -p on -e \"${1}-Server Admins\" \"${1}\"/\"${1}-Servers\""  # -d (can edit), -p (can add/remove) records

### Network Admins Team
echo "share-folder -a grant  -d on -p on -e \"${1}-Network Admins\" \"${1}\"/\"${1}-Network\""  

### Helpdesk Team
echo "share-folder -a grant  -d on -p on -e \"${1}-Helpdesk\" \"${1}\"/\"${1}-Users\""         

### SOC Team
echo "share-folder -a grant  -d on -p on -e \"${1}-SOC\" \"${1}\"/\"${1}-Users\""     
echo "share-folder -a grant  -d on -p on -e \"${1}-SOC\" \"${1}\"/\"${1}-Servers\""   
echo "share-folder -a grant  -d on -p on -e \"${1}-SOC\" \"${1}\"/\"${1}-Network\""   

# NOC Read only to all shares
echo "share-folder -e \"${1}-NOC\" \"${1}\"/\"${1}-Users\""                                     # read only
echo "share-folder -e \"${1}-NOC\" \"${1}\"/\"${1}-Servers\""   
echo "share-folder -e \"${1}-NOC\" \"${1}\"/\"${1}-Network\""    
exit
```

For other commands, see the [MSP Management Commands](/keeperpam/commander-cli/command-reference/msp-management-commands.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/enterprise-guide/keeper-msp/msp-developer-apis/commander-template.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
