Zip-based package manager and runner for Well.. Simple (WSlang) packages.
WPM allows you to install, update, and remove packages described by a remote mapping.json. Packages are distributed as .zip files with a standard layout and can expose runnable modules via assignment.json.
- Registry-driven installs via
mapping.json - Install packages from remote
.zipURLs - List installed packages with detailed information
- Remove packages cleanly
- Update packages to their latest versions
- Project manifest support via
wpackage.json(wpm get) - Run modules (
wpm run <module_name>) viaassignment.json - Automatic metadata tracking for all packages
- Simple, intuitive commands
- Dart SDK (for building and running)
- Internet connection (for installing packages)
- WSlang interpreter in PATH (command
wsor setWS_INTERPRETERenv var)
- Clone this repository
- Run the build script for your platform:
Linux/macOS:
./build.shWindows:
build.batThe executable will be created in the build/ directory.
- (Optional) Add the executable to your PATH for system-wide access
Provide the URL to mapping.json using either an env var or a config file:
- Environment variable (recommended):
$env:WPM_MAPPING_URL = "https://example.com/path/to/mapping.json"- Local file
wpm_config.jsonin the working directory:
{ "mappingUrl": "https://example.com/path/to/mapping.json" }Then pull the latest registry map:
build\wpm.exe refreshInstall by name as defined in mapping.json:
wpm install <package_name>Display all installed packages with details:
wpm list
# or
wpm lsUninstall a package:
wpm uninstall <package_name>Example:
wpm remove mathlibUpdate a package to its latest version:
wpm update <package_name>Example:
wpm update mathlibInstall/update packages listed in wpackage.json (in current directory):
wpm getwpackage.json structure:
{
"packages": ["package_name", "package_name2"]
}Run a module exposed by any installed package via assignment.json:
wpm run <module_name>This locates the module in installed packages, preferring a __main__.wsx next to the mapped entry, otherwise it runs the mapped .wsx file.
wpm help # Show help message
wpm version # Show version information- Packages directory:
ws_packages/ - Metadata file:
ws_packages.json - Cached registry:
ws_packages/mapping.json
All packages are cloned into the ws_packages/ directory, with each package in its own subdirectory.
Each .zip should contain:
package_name/
package.json
assignment.json
src/
*.wsx
package.json example:
{
"name": "package_name",
"version": "1.0.0",
"url": "http://example.com/package_name.zip",
"description": "A brief description of the package.",
"author": "Author Name",
"license": "MIT",
"assignments": ["assignment.json"]
}assignment.json example:
{
"modules": {
"module_name": "test1.wsx",
"module_name2": "test2.wsx"
}
}For each installed package, WPM tracks:
- Name, path, URL
- Version, description, author, license (from
package.json/registry) - Install timestamp
- Refresh: Download
mapping.jsonfrom the configured URL - Install: Download
.zipand extract intows_packages/<package_name> - Track: Read
package.jsonand store metadata inws_packages.json - Update: Compare remote vs local version; reinstall if newer
- Remove: Delete the package directory and metadata entry
# Configure registry (one-time)
$env:WPM_MAPPING_URL = "https://example.com/registry/mapping.json"
wpm refresh
# Install packages
wpm install mathlib
wpm install graphics
# List packages
wpm list
# Update a package
wpm update mathlib
# Run a module
wpm run drawHouse
# Remove when done
wpm uninstall graphicswpm install https://github.com/wslang/stdlib.git
wpm install https://github.com/wslang/http-client.git
wpm install https://github.com/wslang/json-parser.git
wpm list| Command | Aliases | Arguments | Description |
|---|---|---|---|
| Command | Aliases | Arguments | Description |
| --------- | --------- | ----------- | ------------- |
refresh |
- | - | Download latest mapping.json |
install |
- | <package> |
Install package by name |
update |
upgrade |
<package> |
Update a package |
uninstall |
remove, rm |
<package> |
Remove a package |
list |
ls |
- | List installed packages |
get |
- | - | Sync from wpackage.json |
run |
- | <module_name> |
Run a module |
help |
-h, --help |
- | Show help message |
version |
-v, --version |
- | Show version |
wpm/
├── wpm.dart # Main source code
├── build.sh # Unix build script
├── build.bat # Windows build script
├── README.md # This file
├── ws_packages/ # Installed packages (created at runtime)
└── ws_packages.json # Package metadata (created at runtime)
The build scripts restore dependencies and compile a native executable:
# Windows
build.bat
# Linux/macOS
./build.sh
Current version: 2.0.0
WPM provides clear error messages with emoji indicators:
- ✅ Success messages
- ❌ Error messages
- 📦 Package operations
- 🔗 URL information
- 🗑️ Removal operations
- ⬇️ Download operations
- 🔄 Update operations
- 🔍 Search results
Set WPM_MAPPING_URL or create wpm_config.json with mappingUrl.
If packages aren't appearing:
- Check that
ws_packages/directory exists - Verify
ws_packages.jsonis not corrupted
Set WS_INTERPRETER to your interpreter path, or ensure ws is available in PATH.
This package manager is part of the Well.. Simple programming language project.
Contributions are welcome! Please ensure:
- Code follows Dart best practices
- Error handling is comprehensive
- User feedback is clear and helpful
For issues, questions, or contributions, please refer to the Well.. Simple project documentation.