@dcpm/cli
v2.8.2
Published
The cli for dcpm
Readme
@dcpm/cli
overview
This package is used to fetch, publish, and manage your packages on DCPM. The tool is expected to be installed globally. To install this via npm:
npm i -g @dcpm/clior yarn if you're close enough to facebook that they dictate your development practices:
yarn global add @dcpm/cliAt this point you can fetch packages from dcpm. To see what's available go to the DCPM App. Here you can search for packages and read our docs.
use
auth
To login just run:
dcpm authThis will prompt for a username and password and log you in, or create an account if it's a new username, and save your token to ~/.dcpm.
run
You can run any of the scripts in a manifest via:
dcpm run <script-name>This will run the script and output the result to your command line. This is an early feature, expect changes.
setup
To create a .env file with the correct values run:
dcpm setupThis will ask you a series of questions and then write a .env file. If the manifest doesn't have any setup it will let you know.
get
The most simple use case is fetching a simple package:
dcpm get home-mediaThis will find the latest version of home-media and create a folder called home-media in your current working directory that contains all of its files.
You can also specify a version:
dcpm get [email protected]This does the same thing but for a deterministic package version.
publish
To publish a package, navigate to the folder that contains a manifest.yml as defined by our docs and run:
dcpm publishThis will read the manifest, zip the correct files, and upload them to our backend. You need to be logged in to do this.
user management
This command allows you to authorize additional users to publish new versions of your package:
dcpm add-user some-person your-packageRemoval can be accomplished via:
dcpm remove-user some-person your-packagewarning
This project is in a very early alpha state. This stuff is liable to change at random. The docs site should be up to date whenever a batch of changes comes out.
