|
| 1 | +# FLB CLI Tool |
| 2 | + |
| 3 | +FLB (Fleetbase) is a command-line interface tool designed for managing Fleetbase Extensions. It simplifies the process of publishing and managing both npm and PHP Composer packages, particularly for Fleetbase extensions. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- Publish npm and PHP Composer packages to a specified registry. |
| 8 | +- Unpublish packages from the registry. |
| 9 | +- Automatically convert `composer.json` to `package.json` for PHP packages. |
| 10 | +- Flexible registry configuration. |
| 11 | + |
| 12 | +## Installation |
| 13 | + |
| 14 | +To install FLB, run the following command: |
| 15 | + |
| 16 | +```bash |
| 17 | +npm install -g flb |
| 18 | +``` |
| 19 | + |
| 20 | +## Usage |
| 21 | + |
| 22 | +### Publishing a Package |
| 23 | + |
| 24 | +To publish a package, navigate to the package directory and run: |
| 25 | + |
| 26 | +```bash |
| 27 | +flb publish [path] |
| 28 | +``` |
| 29 | + |
| 30 | +- `[path]`: The path to the package directory. Defaults to the current directory. |
| 31 | + |
| 32 | +For PHP packages, `flb` will automatically convert `composer.json` to `package.json` before publishing. |
| 33 | + |
| 34 | +### Unpublishing a Package |
| 35 | + |
| 36 | +To unpublish a package, use: |
| 37 | + |
| 38 | +```bash |
| 39 | +flb unpublish [packageName] |
| 40 | +``` |
| 41 | + |
| 42 | +- `[packageName]`: The name of the package to unpublish. If not provided, FLB will attempt to determine the package name from the current directory. |
| 43 | + |
| 44 | +### Setting a Custom Registry |
| 45 | + |
| 46 | +To specify a custom registry for publishing and unpublishing, use the `-r` or `--registry` option: |
| 47 | + |
| 48 | +```bash |
| 49 | +flb publish -r http://my-registry.com |
| 50 | +flb unpublish -r http://my-registry.com |
| 51 | +``` |
| 52 | + |
| 53 | +## Configuration |
| 54 | + |
| 55 | +FLB can be configured via command-line options. The most common options include: |
| 56 | + |
| 57 | +- `-r, --registry [url]`: Specify a custom registry URL. |
| 58 | + |
| 59 | +## Contributing |
| 60 | + |
| 61 | +Contributions to FLB are welcome. Please ensure that your code adheres to the project's coding standards and include tests for new features or bug fixes. |
| 62 | + |
| 63 | +## License |
| 64 | + |
| 65 | +FLB is [MIT licensed](LICENSE). |
0 commit comments