SM is a lightweight command-line tool to manage, run, and organize scripts across multiple runtimes (Python, Node.js, Go, Bash, etc.). It provides runtime detection, script execution, filtering, and history tracking in a simple and unified interface.
- Add, remove, and list scripts
- Support for multiple runtimes:
- Python
- Node.js / JavaScript
- Go
- Bash / Shell
- (Ruby support can be added later)
- Runtime detection and configuration
- Execution with arguments and environment variables
- Execution history tracking
- Timeout and error handling for scripts
- List scripts and runtimes in table (default) or JSON format
- Filter scripts by:
- Tag (
--tag) - Language (
--language) - Name (
--name)
- Tag (
All notable changes are documented in CHANGELOG.
Clone the repository and build the executable:
git clone https://github.com/Scripts-Manager/sm.git
cd sm
go build -o sm .Add the executable to your PATH or use it directly from the folder.
- List runtimes (table or JSON):
sm runtimes list
sm runtimes list -f json- Add a runtime:
sm runtimes add python 3.13 "C:\Users\YourUser\AppData\Local\Programs\Python\Python313\python.exe"- Remove a runtime:
sm runtimes remove node 22.21- Set default runtime version:
sm runtimes set-default bash 5.2- Detect installed runtimes automatically:
sm runtimes detect --set-defaults- Add a script:
sm add myscript.py --name "hello-world" --tag test --description "Sample Python script"- List scripts (with filtering & format options):
sm list
sm list --tag test
sm list --language python
sm list --name hello
sm list -f json- Run a script:
sm run hello-world arg1 arg2- View execution history:
sm history hello-world- Python
- Node.js / JavaScript
- Go
- Bash / Shell
- (Ruby planned)
For sequential script workflows:
sm chain "build --release" "deploy --server prod" "notify --channel ops"
sm chain --continue --log deploy.chainRefer to Commands for the full command reference with all flags.
sm config get <key>
sm config set <key> <value>
sm config list
sm initsm cleanup [--dry-run] [--keep <count>] [--older-than <days>]These are planned or potential features that may be added based on future development.
- Define who can run, edit, or delete scripts.
- Support roles and grants for fine-grained access control.
- Critical for multi-user or shared environments.
secrets set/get/list/deletefor secure credentials.- Support project-level and global scopes.
- Store secrets securely (encrypted).
- Required before scheduling, parallel execution, and dependency management.
- Parallel execution (
sm run-parallel) – Run multiple scripts concurrently with live prefixed output. - Timeout per step – Set custom timeouts for long-running scripts.
- Execution chaining improvements – Conditional execution, per-step retries, or dynamic arguments.
- Hooks (pre/post run) – Run custom commands before or after a script (lint, notifications, cleanup).
- Remote/agent execution – Execute scripts on remote hosts or registered agents.
- Automatic handling of Python (
requirements.txt) and Node.js (package.json) dependencies per script. - Support for isolated environments per script (Python venv, Node local modules).
- Manual installation via
sm deps install <script>.
- Cron-like scheduling (
sm schedule) – Run scripts on a schedule via the SM daemon. - Monitoring & Observability – Tail logs, search logs, track success/failure metrics, show durations.
- Manage runtime defaults per language/version.
- Structured logging (
logger.Info(),logger.Error()) and--verbosemode. - Improved log output: streaming, colored output, prefixed with script names.
- Enhanced configuration management: profiles, global defaults, per-script settings.
- Clear error messages with actionable guidance.
- Export/import scripts for backup or sharing (
sm export,sm import). - Template system for bootstrapping new scripts with common patterns.
- Linting & validation of scripts before execution.
This project is an MVP, and we welcome all contributions, whether big or small.
You can help by adding new features, improving existing functionality, enhancing documentation, or fixing bugs.
Please follow the guidelines to ensure contributions are consistent, high-quality, and easy to review.
Every contribution helps make the project better for everyone!
Before submitting a pull request (PR), please ensure the following:
- Run the full test suite to verify all existing functionality.
- Add tests for any new features or changes.
- Ensure tests are cross-platform compatible (Windows, macOS, Linux).
- Document any platform-specific behavior.
- Keep test execution time reasonable to avoid slowing down CI.
Refer to Testing.md for detailed instructions on running and writing tests.
This project is available under the Personal Use License.