uvpm-cli v1.4.2
uvpm-cli
A CLI for interacting with an Ultra-Violet Package Manger server.
Getting Started
- Install Node.js
- Get a UVPM Server domain or set one up yourself
Simply run the following command to install the CLI globally.
npm install -g uvpm-cliExample Workflow
Navigate to the repo you wish to use UVPM with. Then run the following commands to get started from you CLI.
# Set the server where you've setup a UVPM installation
uvpm server ROUTE_TO_YOUR_UVPM_SERVER
# Login to the server for an authentication token
uvpm login
# Create a uvpm.json file for configuration
uvpm init
# Install a particular package as a dependency and write it to the config
uvpm install MY_PACKAGE --save
# Publish the package for other packages to use
uvpm publish
# Search for the recently published package with fuzzy searching
search MY_PACKAGECommands
A list of all supported commands. You can also type uvpm --help for additional documentation.
Dependency Management
Install
Add a package to your project and update the uvpm.json file.
uvpm install YOUR_PACKAGE_NAME --saveUninstall
Remove a package from your project and update the uvpm.json file.
uvpm uninstall YOUR_PACKAGE_NAME --saveSearch Published Packages
Prints a listing of all available versions based upon a fuzzy search.
uvpm search YOUR_PACKAGE_NAMEView a package
View a published package with all associated versions.
uvpm view YOUR_PACKAGE_NAMEClearing the cache
Sometimes the cache might become corrupted or you unpublished a package somewhere so its no longer accurate. Dump it with the following command.
uvpm cache-clearAuthentication
Set the server
Set the current server URL for HTTP calls. Required for most commands.
uvpm server http://MY_SERVER.comLogin
Attempt to authenticate a user and store login credentials.
uvpm loginLogout
De-authenticate the current user.
uvpm logoutRegister
Attempt to register a user (does not log you in).
uvpm registerWho Am I
Print the currently authenticated user.
uvpm whoamiPublishing
Increment Version
Increment the current version in your uvpm.json file based upon the Semver specification.
uvpm version [minor|major|patch]Publish
Publish your current repository based upon your uvpm.json configurations.
uvpm publishUnpublish
Unpublish your current repository based upon your uvpm.json configurations.
uvpm unpublish MY_PACKAGE_NAME
# or
uvpm unpublish MY_PACKAGE_NAME SPECIFIC_VERSIONGenerators
init
Generates a uvpm.json file from where the command is run. Automatically fails if a file already exists.
uvpm initDevelopment
If you wish to further develop this code here's how.
Run npm run start to actively recompile while developing.
Running tests
Run npm run test to run the testing environment.
Linking local repo for global testing
You might want to globally uninstall your UVPM CLI before trying this.
- Clone this repo
- Navigate to the root
- Run
npm linkto globally link the repo - You can now run
uvpm [COMMAND]statements against your development code - Run
npm run buildwhenever you want the CLI to have a latest copy of the source - Run
npm unlinkto unlink the repo