dashpub_cli 0.0.2
dashpub_cli: ^0.0.2 copied to clipboard
Official command-line companion tool for Dashpub. Dashpub is a private registry for Dart packages.
Dashpub CLI #
A command-line companion for the Dashpub private package registry.
This CLI tool helps you manage authentication, tokens, and package publishing for your self-hosted Dashpub instance.
Installation #
You can install dashpub_cli globally from pub.dev:
dart pub global activate dashpub_cli
After installation, you can run the tool using the dashpub command.
Usage #
Login #
Authenticate with your Dashpub server to start a session. This will store a session token locally in ~/.dashpub.
dashpub login --url https://pub.yourdomain.com
-u, --url: The Base URL of your Dashpub registry (default:http://localhost:4000).
You will be prompted to enter your Email and Password interactively.
Token Management #
Manage API tokens for use with the standard dart pub client or CI/CD pipelines.
View Current Session Token
dashpub token
Generate New API Token
Generate a persistent API token.
dashpub token --generate --url https://pub.yourdomain.com
Output:
New API Token generated successfully:
<YOUR_NEW_TOKEN>
You can use this token for standard pub client authentication:
dart pub token add https://pub.yourdomain.com
And then paste the token when prompted.
Publishing Packages #
Publish the package in the current directory to the registry.
Requirements:
- A valid
pubspec.yamlmust exist in the current directory. - You must be logged in via
dashpub login.
dashpub publish --url https://pub.yourdomain.com
- The CLI automatically ignores hidden files (starting with
.) and thebuild/directory. - It creates a standard
gziparchive and uploads it to the server.
Configuration #
The CLI stores your session configuration in a JSON file located at:
- Linux/macOS:
~/.dashpub - Windows:
%USERPROFILE%\.dashpub
Please do not edit this file manually.