Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thornjad/zpico
The minuscule Zsh plugin manager
https://github.com/thornjad/zpico
shell zsh zsh-configuration zsh-plugins
Last synced: 26 days ago
JSON representation
The minuscule Zsh plugin manager
- Host: GitHub
- URL: https://github.com/thornjad/zpico
- Owner: thornjad
- License: isc
- Created: 2021-06-22T22:35:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-02T20:40:07.000Z (7 months ago)
- Last Synced: 2024-06-21T06:39:48.203Z (5 months ago)
- Topics: shell, zsh, zsh-configuration, zsh-plugins
- Language: Shell
- Homepage:
- Size: 50.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ZPico
The minuscule zsh package manager. No frills, no bloat, just 4 kB of 100% Zsh code, providing complete package management for your Zsh environment.
Zsh package managers are abundant, but most are bloated, slow or have excessive requirements. On top of that, more than a few have been abandoned for years. Zpico does not seek to be the best of the best, rather to balance functionality against a tiny, fast footprint.
## Installation
Requires `git`.
```
curl -sL --create-dirs https://raw.githubusercontent.com/thornjad/zpico/main/zpico.zsh -o $HOME/.local/lib/zpico/zpico.zsh
```Then add `source $HOME/.local/lib/zpico/zpico.zsh` to your `.zshrc` and reload your shell.
_This is the recommended installation path, but you can put it wherever you want._
## Usage
### Add packages
`zpico add [[source:] [branch:] [use:]]`
This command downloads and initializes a given package. If the package has already been download, it initializes only.
The required argument `package-repo` is the package's repo in `/` format (supports Gitlab subgroups with `source:gitlab`).
The optional argument `source:` determines the source domain to get the package from. Currently supports `github`, `gitlab`, `framagit` and the special `local` (see [Local packages](#local-packages) below). If omitted, defaults to `source:github`.
The optional argument `branch` specifies the Git branch to use. If omitted, uses the default branch for the package (typically `master`, `main` or `trunk`).
The optional argument `use` specifies the file (or file pattern) to use.
#### Other URL
Zpico can also load packages from arbitrary URLs.
`zpico add [branch:]`
The optional argument `branch` works the same as specified above.
#### Local packages
`zpico add source:local [branch:]`
The optional argument `branch` works the same as specified above.
### Other commands
Precede all commands with `zpico`.
| command | description |
|------------|-------------------------------------------------------------------------|
| update | update all installed packages |
| selfupdate | update Zpico. Requires `curl`. Alternatively, reinstall Zpico to update |
| clean | remove all packages currently installed |
| help | print help text |
| version | print version info |### Customize package installation path
The default package installation path is `~/.local/share/zpico/`. Customize this by setting `ZP_PLUGIN_HOME` prior to loading Zpico in your `~/.zshrc`.
## Example
```
# ~/.zshrc
source ~/.local/lib/zpico/zpico.zsh# Packages
zpico add nocttuam/autodotenv
zpico add zdharma/zsh-diff-so-fancy
zpico add thornjad/vero source:gitlab
```## Uninstall
```
rm -rf ~/.local/lib/zpico ~/.local/share/zpico
```Replace paths with the correct ones if you've customized them, then remove any Zpico-related commands from your `~/.zshrc`.
## License
Copyright (c) 2021-2023 Jade Michael Thornton
See [LICENSE](./LICENSE) for terms (it's the ISC license).