# Scripts


What are Scripts

Devpilot Scripts gives you the ability to execute commands on your app directly from your terminal locally. Just as you can use deployment hooks to automatically execute command during deployment, scripts allows you execute commands anytime.

The scripts commands section helps you keep track of all commands that you have executed on your application from your local terminal. It provides all the neccessary information regarding the command.

What are Script Filters

As the name implies, they filter scripts before they are executed on your server. The filters applied on an app are determined by the Script Mode set on the server. If the Basic Mode is set the custom script filter would be completely ignored and these filters would be enabled in the background :

  • startswith(php)
  • startswith(git)
  • startswith(npm)
  • startswith(composer)
  • startswith(node)
  • startswith(nvm)
  • startswith(yarn)

Creating Script Filters

Navigate into the desired Server and click on the Script Filters card at the top of the page. You would be redirected to a page listing the filters created for the server. Click on the Create Filter button at the top right of the page. The following keyword patterns are available:

  • Commands are case sensitive
  • Use contains(cd) to filter commands that have "cd" in any part of it
  • Use startswith(cd) to filter commands that start with "cd"
  • Use endswith(cd) to filter commands that end with "cd"
  • Use matches(composer -v) to filter commands that exactly matches "composer -v"

Found Something Wrong?

Have you found something in the documentation that is confusing or incorrect? Devpilot's documentation is completely open source! Please consider submitting a pull request on GitHub.