PowerSchool CLI
Share
Building PowerSchool Plugins with pscli: A Modern CLI for Education Developers
Introduction
Developing plugins for PowerSchool can be a complex process, involving XML, SQL, and a variety of configuration files. To streamline this workflow, we created pscli —a modern, TypeScript-based command-line tool that automates and simplifies the process of building, bundling, and documenting PowerSchool plugins.
In this post, I’ll walk you through what pscli is, what problems it solves, and how it can supercharge your PowerSchool plugin development.
What is pscli?
pscli is a CLI tool designed to help developers scaffold, build, and manage PowerSchool plugin projects. It provides commands for initializing new projects, bundling plugin files, generating documentation, and more. The tool is built with Node.js and TypeScript, leveraging the Oclif framework for a robust CLI experience.
Key Features
1. Project Initialization
Start a new PowerSchool plugin project in seconds with:
pscli init
This command interactively prompts you for project details (name, description, author, etc.), sets up a
powerschool.json
configuration, and generates a starter package.json
and readme.md
.2. Bundling and Building
pscli automates the process of bundling your plugin’s XML, SQL, and web assets into a deployable ZIP file. With commands like:
pscli bundle plugin
You can increment plugin versions, zip up all required files, and ensure your plugin is ready for deployment.
3. Query and Schema Management
Easily manage your SQL queries and user schema extensions:
- Generate XML for SQL queries:
pscli create queries
parses your SQL files, extracts metadata, and generates the required XML files for PowerSchool. - User schema support:
pscli create schema
converts YAML schema definitions into PowerSchool-compatible XML.
4. Permissions and Types
- Permissions:
Automatically generate permissions mappings based on your queries with
pscli create permissions
. - TypeScript Types: Generate TypeScript types from your query definitions for safer, more robust code.
5. Documentation
Generate up-to-date documentation for your queries and plugin usage with:
pscli docs readme pscli docs queries
Why Use pscli?
- Automation: No more manual XML editing or file copying.
- Consistency: Enforces best practices and consistent project structure.
- Speed: Rapidly scaffold and build plugins, freeing you to focus on business logic.
- Type Safety: TypeScript support and type generation help catch errors early.
- Documentation: Keep your docs in sync with your codebase.
Getting Started
- Install dependencies: Make sure you have Node.js and npm installed.
- Clone the repo and install:
- Run the CLI:
git clone <your-repo-url> cd pscli npm install
npx ts-node src/index.ts <command>
Conclusion
pscli is designed to make PowerSchool plugin development faster, safer, and more enjoyable. Whether you’re building a simple query or a complex plugin with custom pages and permissions, pscli has you covered.
Ready to get started? Check out the repository and try it out on your next PowerSchool project!