pubx 1.2.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 53

pubx #

The missing pub commands.

Search and view packages from the command line.

Installation & Usage

pub global activate pubx
pubx search json

Commands #

add #

Alias: a

Adds the package to your pubspec.yaml file.

pubx add {package-name}

Additional options:

  • dev - add this as a dev_dependencies entry
  • lock - omits the ^ symbol to lock to the latest version

Aliases: se, s, find


pubx search {query}

view #

Aliases: info, show, v

Displays information about the specified package.

pubx view {package-name}

1.2.3 #

  • resolve lints

1.2.2 #

  • fixes a bug where pubx would fail if no author or authors field was present in a pubspec

1.2.1 #

  • fixes a bug where pubx would throw an exception in the absence of an existing dependencies/dev_dependencies map

1.2.0 #

  • add a which command, for finding the path of packages locally
  • the add command now works from sub-folders

1.1.1 #

  • fix bug introduced in 1.1.0, where updating a dependency with an unspecified version would output invalid yaml

1.1.0 #

  • add command will now replace existing version constraints if dependency is already present
  • add command no longer inserts duplicates

I realize that I should have bumped minor with the last release, but neglected to.

1.0.8 #

  • The add command (courtesy of @Vanethos), for adding a dependency to pubspec.yaml
  • A bug fix in HTTP status code evaluation (courtesy of @f3ath)

1.0.7 #

Courtesy of @Vanethos:

  • Support for pubspec.yaml's authors field
  • Suppressing of stack trace when command is not understood

1.0.6 #

  • Added the --version-only flag to pubx view

1.0.5 #

  • Even better description. :)

1.0.4 #

  • Improves package description, and adds an example

1.0.3 #

  • Adds a --versions flag for view

1.0.0 #

  • Initial version, created by Stagehand


Example #

Installation #

pub global activate pubx

pubx add: Add packages to pubspec.yaml #

Alias: a

pubx add json
pubx add --dev build # Add to dev_dependencies

pubx search: Search packages #

Aliases: se, s, find

pubx search json

pubx view: View package information #

Aliases: info, show, v

pubx view mobx

Show package versions #

pubx view built_value --versions
pubx view built_value --version-only

# Useful for easy copying to the clipboard
pubx view provider --version-only | pbcopy

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate pubx

2. Use it

The package has the following executables:

$ pubx

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  pubx: ^1.2.3

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:pubx/pubx.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
args ^1.5.0 1.5.2
http ^0.12.0 0.12.0+4
path ^1.6.0 1.6.4
quiver ^2.0.4 2.1.2+1
yaml ^2.1.16 2.2.0
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
matcher 0.12.6
meta 1.1.8
source_span 1.6.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
pedantic ^1.7.0 1.9.0
test ^1.5.0