No description
  • Rust 83.4%
  • PowerShell 6.9%
  • JavaScript 6.1%
  • CSS 2.1%
  • Shell 1.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-23 11:30:49 +02:00
.idea Add powershell 5 compatibility and choice between PS versions in settings 2026-10-23 11:30:49 +02:00
crates Add powershell 5 compatibility and choice between PS versions in settings 2026-10-23 11:30:49 +02:00
docs Add powershell 5 compatibility and choice between PS versions in settings 2026-10-23 11:30:49 +02:00
examples Add powershell 5 compatibility and choice between PS versions in settings 2026-10-23 11:30:49 +02:00
module/PwshManager Add powershell 5 compatibility and choice between PS versions in settings 2026-10-23 11:30:49 +02:00
tests e2e: survive a signal-less sandbox and fix fixture bugs 2026-10-17 19:08:26 +00:00
.betterleaks.toml Add powershell 5 compatibility and choice between PS versions in settings 2026-10-23 11:30:49 +02:00
.gitignore Encrypt secret variables at rest, deliver them context-only, redact them from logs 2026-10-20 18:51:54 +00:00
Cargo.lock Add an audit trail and an explicit Scheduler role 2026-10-20 20:43:22 +00:00
Cargo.toml Scaffold Pwsh-manager: workspace, pwshm-core contract, scope architecture 2026-10-17 17:07:49 +00:00
README.md Add docs/MANUAL.md and make documented behaviour true 2026-10-18 08:57:04 +00:00

Pwsh-manager

A Rust re-implementation of the core of PowerShell Universal: keep PowerShell scripts in a Git-backed repository, expose them as REST APIs, run them as automated jobs on schedules, render them as interactive apps, and protect all of it with users, roles, API tokens and a management API plus web console.

The design, the per-scope crate map and the frozen cross-crate interfaces live in docs/ARCHITECTURE.md; how to run the service and use every screen of the console is in docs/MANUAL.md. Feature and scope details go in those documents, not here.

Layout

Crate Responsibility
pwshm-core Domain model, configuration, errors, permissions
pwshm-store SQLite persistence (WAL, serialised writers)
pwshm-auth Users, roles, tokens, JWT sessions, RBAC
pwshm-pwsh PowerShell process bridge (context/result/response files)
pwshm-scripts Script repository and Git integration
pwshm-endpoints Custom REST endpoints and OpenAPI
pwshm-jobs Automation job engine (queue, live logs, cancel)
pwshm-schedules Cron/interval scheduling
pwshm-apps Dashboard/app runtime and renderer
pwshm-api Management API, public routes, embedded web console
pwshm-server pwshm-server binary, CLI and wiring
module/PwshManager PowerShell module for code-first configuration

Quick start

cargo run -p pwshm-server -- init
PSM_ADMIN_PASSWORD=changeme cargo run -p pwshm-server -- serve

Then open http://localhost:5000/ for the console and http://localhost:5000/api/v1/status for the API. pwshm-server --help lists the rest of the CLI (config check, run, user, token, version).

Scripts, endpoints, apps, schedules and variables can also be declared in PowerShell under repository/.pwshm/*.ps1 using the bundled module; see examples/demo for a working configuration.

Tests

. /workspace/.pwshm-env.sh        # zig toolchain, cargo home, portable pwsh
cargo test --workspace            # unit + integration tests for every crate
bash tests/e2e.sh                 # boots the server and drives the real HTTP API

tests/e2e.sh covers login, RBAC, script CRUD on disk, job run/wait/output/ cancel, custom endpoints, openapi.json, app shell and component render, schedule run-now, secret-variable masking, API tokens, static files and the console. Last run: 57 passed, 0 failed.

Licence

MIT