Install CLI tools
OnePub includes a couple of CLI tools to make it easy to publish directly from the CLI using the existing dart tooling.
The following guide explains how to install the OnePub CLI tools.
For the majority of our users, we naturally assume they have Dart or Flutter installed, in case you don't, please follow the instructions to install Dart from here:
If you are running a dart version prior to 2.12 then follow the alternate install instructions.
If you are running a dart version prior to 2.15 then read the pre 2.15 guide.
Once you have dart installed and running, run the following commands:
Note that `onepub login` runs a webserver on your local machine to collect the token as returned from the auth provider. This only runs from the moment it opens your browser to the moment the login completes. This is on http://127.0.0.1:42666/.
You may need you to unblock tcp port 42666 temporarily if you are running a firewall on your PC.
If you have flutter installed replace dart pub
with flutter pub
If you are running a dart version prior to 2.12 then follow the alternate install instructions.
See the section on CLI Tools for details on the commands available.
Last updated