You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cli): Add serverpod run command to execute scripts from pubspec.yaml #4402
Currently, there is no convenient built-in way to execute project-specific scripts directly through the serverpod CLI. This limits automation and makes it harder to run workflows like starting a Flutter client or executing custom operations defined in a project's configuration.
Proposal
Introduce a new serverpod run <script> command in the serverpod CLI. This command will look for a serverpod_scripts section in the project's pubspec.yaml and execute the corresponding script value. For example:
Running serverpod run start would execute the specified command. This enables teams to easily integrate and automate cross-tool behaviors within their workflow, managed through pubspec.yaml.
Use Case
A developer can add frequently-used scripts to the pubspec.yaml and trigger them via serverpod run <script>. For example, starting the frontend and backend simultaneously for development, database migrations, or custom checks—without manually hunting for the correct shell command.
Alternatives
Manually running scripts from the terminal, which reduces consistency and automation
Using other CLI wrappers, but these do not integrate with Serverpod's workflow
Custom bash scripts, which are less discoverable and not linked to Serverpod's project structure
Additional context
This will enhance developer experience and enable complex integration scenarios involving Flutter, backend, and third-party tools—while keeping workflow management in a single configuration file
How experienced are you with this library?
Expert - Experienced and comfortable with using this library in complex projects
Activity
nielsenko commentedon Dec 12, 2025
We will use
serverpod/scriptsinstead. Allowing for future expansion.Example: