slp/README.md

48 lines
3.8 KiB
Markdown
Raw Permalink Normal View History

2021-08-26 21:31:43 +00:00
# slp
2017-08-31 00:22:44 +00:00
2021-08-26 21:31:43 +00:00
SLope Package manager.
2017-08-31 00:22:44 +00:00
An easy way to install, remove, and update [slope](https://git.rawtext.club/slope-lang/slope) packages.
2017-08-31 00:22:44 +00:00
```
slp deps [[-g]] [file] # install the dependencies of 'file'
slp docs [[-g]] [module] # open a module's readme in $PAGER
slp fetch # fetches the updated registry
2022-11-14 21:48:49 +00:00
slp gen [[-s|--solo]] # creates new module dir/skeleton
slp help # print usage information
slp install [[-g]] [module...] # installs module(s)
slp installed [[-g]] # lists all installed packages
slp list # lists all available packages
slp local [[-g]] [filepath] # installs the module at filepath
slp remove [[-g]] [module...] # removes module(s)
slp search [term...] # searches for modules
slp show [module...] # shows details for module(s)
slp update [[-g]] [module...] # updates module(s)
slp update-all [[-g]] [module...] # updates all installed modules
2017-08-31 00:22:44 +00:00
```
2022-05-09 22:40:53 +00:00
The above options are more or less self-explanatory with the exception of `local`. `local` will install a module that you have on your system, but not on the slope module path. This is useful if, for example, a person has made their module available but it is not in the slp registry. In which case you can clone their repo and run `slp local ~/path/to/their-module`. Once installed in this manner the slp `remove`, `installed`, and `docs` commands will be able to operate on the module based on its folder name. `update`, however, requires the registry to know what git tag is the current/newest tag.
2022-11-14 21:48:49 +00:00
## VCS Choices
`slp gen` supports git repositories (the default) or [solo](https://slope.colorfield.space/solo/repos/solo) repositories. To create the new module folder as a solo repository instead of a git repository simply pass the `-s` or `--solo`. For example: `slp gen -s` or `slp gen --solo`. If you opt to use solo repositories be sure that the repository link in your `module.json` file is a link to the `[reponame].tar.gz` file that soloweb creates when pushing a repository. Linking to the index page of the soloweb view of the repository will not do the job. If you are not sure where the correct file is, but have pushed your repository to a remote using `solo push [credentials]`, you can visit the web page and right click on the `download` link in the navigation menu and choose `copy link`. That will add the correct link to your clipboard, and it can then be added to your `module.json` file as needed.
## Global installs
Operations that accept a -g flag will attempt to install a module systemwide (this may require root access). A --global flag may be passed in lieu of a -g flag if desired for clarity.
The install location for global modules is: /usr/lib/slope/modules
Globals modules must be dealt with separately from local modules and cannot be combined in a single command.
Note that early versions of slope to not search the global module path. If you have installed modules globally on your system and are unable to use `load-mod` to access them: update your slope version.
## Adding new packages
Packages can be registered in the repository at [https://git.rawtext.club/slope-lang/packages](slope-lang/packages) by submitting a PR to that repository. If you are unsure of how to proceed feel free to open an issue at said repository instead, with a link to your module's source code.
## Notes
2017-08-31 12:02:40 +00:00
_A note on module versioning_: At present, **slp** does not handle any versioning and will always grab the newest version of a module, while `update` will always update to the newest. There are plans in place to declare a module release via the release's tag value: `module-name@tag` (ex. ini@0.2.1). Stay tuned for an announcement that that has been added. In the meantime: good fortune and safe journeys in the wilderness.