{"id":20887009,"url":"https://github.com/fleetbase/fleetbase-cli","last_synced_at":"2026-02-24T07:23:20.078Z","repository":{"id":228350545,"uuid":"727084024","full_name":"fleetbase/fleetbase-cli","owner":"fleetbase","description":"Fleetbase CLI tool for managing extensions","archived":false,"fork":false,"pushed_at":"2024-08-05T11:13:50.000Z","size":2789,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-06T12:35:52.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fleetbase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-04T06:34:12.000Z","updated_at":"2024-08-05T11:12:54.000Z","dependencies_parsed_at":"2024-03-18T11:35:08.656Z","dependency_job_id":"f4536012-346b-4b53-8685-1dcecc900d40","html_url":"https://github.com/fleetbase/fleetbase-cli","commit_stats":null,"previous_names":["fleetbase/fleetbase-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fleetbase%2Ffleetbase-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fleetbase%2Ffleetbase-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fleetbase%2Ffleetbase-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fleetbase%2Ffleetbase-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fleetbase","download_url":"https://codeload.github.com/fleetbase/fleetbase-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225148825,"owners_count":17428453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T08:18:46.743Z","updated_at":"2026-02-24T07:23:20.072Z","avatar_url":"https://github.com/fleetbase.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fleetbase CLI\n\nFLB (Fleetbase CLI) 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.\n\n## Features\n\n- Register and manage Registry Developer Accounts for self-hosted instances\n- Publish Fleetbase Extensions to a specified registry\n- Unpublish Extensions from the registry\n- Install Fleetbase using Docker\n- Automatically convert `composer.json` to `package.json` for PHP packages\n- Scaffold new Fleetbase extensions\n- Set registry token to a Fleetbase instance\n- Install and Uninstall extensions\n- Flexible registry configuration\n\n## Installation\n\nTo install FLB, run the following command:\n\n```bash\nnpm install -g @fleetbase/cli\n```\n\n## Quick Start: Developer Account Registration\n\nIf you're using a self-hosted Fleetbase instance and want to publish or install extensions, you'll need to register a Registry Developer Account. Follow these steps:\n\n### Step 1: Register Your Account\n\n```bash\nflb register --host localhost:8000\n```\n\nYou'll be prompted for:\n- **Username**: Your desired username (alphanumeric, hyphens, and underscores only)\n- **Email**: Your email address\n- **Password**: A secure password (minimum 8 characters)\n- **Name**: Your display name (optional)\n\n### Step 2: Verify Your Email\n\nCheck your email for a verification code, then run:\n\n```bash\nflb verify -e your@email.com -c 123456 --host localhost:8000\n```\n\nOr use the command provided in the verification email. Upon successful verification, you'll receive your registry token.\n\n### Step 3: Set Your Registry Token\n\nUse the token from the verification step:\n\n```bash\nflb set-auth flb_your_token_here --registry http://localhost:8000\n```\n\n### Step 4: You're Ready!\n\nYou can now publish extensions, install extensions, and manage your Fleetbase instance through the CLI.\n\n**Note:** If you need to regenerate your token later, use:\n\n```bash\nflb generate-token -e your@email.com --host localhost:8000\n```\n\n## Usage\n\n### Registry Developer Account Commands\n\n#### Register a Developer Account\n\nCreate a new Registry Developer Account for publishing and installing extensions on self-hosted instances.\n\n```bash\nflb register\n```\n\n**Options:**\n- `-u, --username \u003cusername\u003e`: Username for your account\n- `-e, --email \u003cemail\u003e`: Email address\n- `-p, --password \u003cpassword\u003e`: Password (minimum 8 characters)\n- `-n, --name \u003cname\u003e`: Display name (optional)\n- `-h, --host \u003chost\u003e`: API host (default: `https://api.fleetbase.io`)\n\n**Example:**\n```bash\nflb register --host localhost:8000\nflb register -u myusername -e my@email.com -p mypassword --host localhost:8000\n```\n\n#### Verify Email Address\n\nVerify your email address using the code sent to your email.\n\n```bash\nflb verify\n```\n\n**Options:**\n- `-e, --email \u003cemail\u003e`: Email address\n- `-c, --code \u003ccode\u003e`: Verification code from email\n- `-h, --host \u003chost\u003e`: API host (default: `https://api.fleetbase.io`)\n\n**Example:**\n```bash\nflb verify -e my@email.com -c 123456 --host localhost:8000\n```\n\n#### Resend Verification Code\n\nRequest a new verification code if the previous one expired.\n\n```bash\nflb resend-verification\n```\n\n**Options:**\n- `-e, --email \u003cemail\u003e`: Email address\n- `-h, --host \u003chost\u003e`: API host (default: `https://api.fleetbase.io`)\n\n**Example:**\n```bash\nflb resend-verification -e my@email.com --host localhost:8000\n```\n\n#### Generate or Regenerate Registry Token\n\nGenerate a new registry authentication token or regenerate an existing one. Useful for existing accounts created before automatic token generation, or if you need to regenerate your token for security reasons.\n\n```bash\nflb generate-token\n```\n\n**Options:**\n- `-e, --email \u003cemail\u003e`: Email address\n- `-p, --password \u003cpassword\u003e`: Password\n- `-h, --host \u003chost\u003e`: API host (default: `https://api.fleetbase.io`)\n\n**Example:**\n```bash\nflb generate-token -e my@email.com --host localhost:8000\n```\n\n**Note:** This command requires your account to be verified. Each time you generate a token, it replaces the previous one.\n\n### Installing Fleetbase\n\nInstall Fleetbase using Docker with a single command.\n\n```bash\nflb install-fleetbase\n```\n\n**Options:**\n- `--host \u003chost\u003e`: Host or IP address to bind to (default: `localhost`)\n- `--environment \u003cenvironment\u003e`: Environment: `development` or `production` (default: `development`)\n- `--directory \u003cdirectory\u003e`: Installation directory (default: current directory)\n\n**Example:**\n```bash\nflb install-fleetbase --host 0.0.0.0 --environment production --directory /opt/fleetbase\n```\n\n### Publishing a Extension\n\nTo publish a extension, navigate to the extension directory and run:\n\n```bash\nflb publish [?path]\n```\n\n- `[path]`: (Optional) The path to the extension directory to be published. Defaults to the current directory.\n\nFor PHP only extensions, `flb` will automatically convert `composer.json` to `package.json` before publishing.\n\n### Unpublishing a Extension\n\nTo unpublish a extension, use:\n\n```bash\nflb unpublish [extension]\n```\n\n- `[extension]`: (Optional) The name of the extension to unpublish. If not provided, FLB will attempt to determine the extension name from the current directory.\n\n### Setup Registry Auth Token\n\nTo install purchased extensions you must setup authorization first which is linked to your Fleetbase account. For cloud users, you can generate a registry token at [https://console.fleetbase.io/extensions/developers/credentials](https://console.fleetbase.io/extensions/developers/credentials). For self-hosted users, use the `flb register` and `flb verify` commands to get your token.\n\nTo setup registry auth use:\n\n```bash\nflb set-auth [token]\n```\n\n**Options:**\n- `-p, --path \u003cpath\u003e`: Path of the Fleetbase instance to install setup for (default: `.`)\n- `-r, --registry \u003curl\u003e`: Registry URL the credentials are for (default: `https://registry.fleetbase.io`)\n\n**Example:**\n```bash\nflb set-auth flb_your_token_here --registry http://localhost:8000\n```\n\n### Login to the Fleetbase Registry\n\nLogin to the Fleetbase registry. This command authenticates you with the Fleetbase registry by saving your credentials to your local `.npmrc` file.\n\n```bash\nflb login\n```\n\n**Options:**\n- `-u, --username \u003cusername\u003e`: Username for the registry\n- `-p, --password \u003cpassword\u003e`: Password for the registry\n- `-e, --email \u003cemail\u003e`: Email associated with your account\n- `-r, --registry \u003cregistry\u003e`: Registry URL (default: `https://registry.fleetbase.io`)\n- `--scope \u003cscope\u003e`: Scope for the registry (optional)\n- `--quotes \u003cquotes\u003e`: Quotes option for `npm-cli-login` (optional)\n- `--config-path \u003cconfigPath\u003e`: Path to the npm config file (optional)\n\n**Example:**\n```bash\nflb login -u myusername -r http://localhost:8000\n```\n\n### Scaffolding a Extension\n\nFleetbase CLI has the ability to scaffold a starter extension if you intend to develop your own extension. This greatly speeds up the development process as it gives you a correct starting point to build on.\n\nTo scaffold a extension, use: \n\n```bash\nflb scaffold\n```\n\n**Options:**\n- `-p, --path`: The path to place the scaffold extension\n- `-n, --name`: The name of the extension to scaffold\n- `-d, --description`: The description of the extension to scaffold\n- `-a, --author`: The name of the extension author\n- `-e, --email`: The email of the extension author\n- `-k, --keywords`: The keywords of the extension to scaffold\n- `-n, --namespace`: The PHP Namespace of the extension to scaffold\n- `-r, --repo`: The Repository URL of the extension to scaffold\n\n### Installing a Extension\n\nTo install a extension, use: \n\n```bash\nflb install [extension]\n```\n\n**Options:**\n- `[extension]`: The name of the extension to install\n- `-p, --path`: (Optional) The path to the fleetbase instance directory. Defaults to the current directory\n\n**Example:**\n```bash\nflb install @fleetbase/storefront-api --path /opt/fleetbase\n```\n\n### Uninstalling a Extension\n\nTo uninstall a extension, use: \n\n```bash\nflb uninstall [extension]\n```\n\n**Options:**\n- `[extension]`: The name of the extension to uninstall\n- `-p, --path`: (Optional) The path to the fleetbase instance directory. Defaults to the current directory\n\n**Example:**\n```bash\nflb uninstall @fleetbase/storefront-api --path /opt/fleetbase\n```\n\n### Bundling a Extension\n\nTo bundle a extension, use: \n\n```bash\nflb bundle\n```\n\nor to bundle and upload the created bundle, use:\n\n```bash\nflb bundle --upload\n```\n\n**Options:**\n- `-p, --path \u003cpath\u003e`: Path of the Fleetbase extension (default: `.`)\n- `--upload`: After bundling, upload the bundle to the Fleetbase registry using your authentication token\n- `--auth-token \u003ctoken\u003e`: Auth token for uploading the bundle (used with `--upload` option)\n- `-r, --registry \u003cregistry\u003e`: Registry URL (default: `https://registry.fleetbase.io`)\n\n### Uploading a Extension Bundle\n\nTo upload an extension bundle, use:\n\n```bash\nflb bundle-upload\n```\n\n**Options:**\n- `[bundleFile]`: Path to the bundle file to upload. If not provided, it will look for the bundle in the current directory\n- `-p, --path \u003cpath\u003e`: Path where the bundle is located (default: `.`)\n- `--auth-token \u003ctoken\u003e`: Auth token for uploading the bundle. If not provided, the token will be read from the `.npmrc` file\n- `-r, --registry \u003cregistry\u003e`: Registry URL (default: `https://registry.fleetbase.io`)\n\n### Version Bump and Extension\n\nTo bump the version on an extension, use:\n\n```bash\nflb version-bump\n```\n\n**Options:**\n- `-p, --path \u003cpath\u003e`: Path of the Fleetbase extension (default: `.`)\n- `--major`: Bump major version (e.g., `1.0.0` → `2.0.0`)\n- `--minor`: Bump minor version (e.g., `1.0.0` → `1.1.0`)\n- `--patch`: Bump patch version (e.g., `1.0.0` → `1.0.1`). This is the default if no flag is provided\n- `--pre-release [identifier]`: Add a pre-release identifier (e.g., `1.0.0` → `1.0.0-beta`)\n\n### Setting a Custom Registry\n\nTo specify a custom registry for publishing and unpublishing, use the `-r` or `--registry` option:\n\n```bash\nflb publish -r http://my-registry.com\nflb unpublish -r http://my-registry.com\n```\n\n## Configuration\n\nFLB can be configured via command-line options. The most common options include:\n\n- `-r, --registry [url]`: Specify a custom registry URL\n- `-h, --host [url]`: Specify the API host for developer account operations\n\n## Self-Hosted vs Cloud\n\n### Self-Hosted Users\n\nIf you're running Fleetbase on your own infrastructure:\n\n1. Use `flb register` to create a Registry Developer Account\n2. Verify your email with `flb verify`\n3. Use the provided token with `flb set-auth`\n4. Specify `--host` parameter for all commands to point to your instance\n\n### Cloud Users\n\nIf you're using Fleetbase Cloud (console.fleetbase.io):\n\n1. Generate a registry token from the Console at [Extensions \u003e Developers \u003e Credentials](https://console.fleetbase.io/extensions/developers/credentials)\n2. Use the token with `flb set-auth`\n3. No need to specify `--host` parameter (defaults to cloud)\n\n## Contributing\n\nContributions to Fleetbase CLI are welcome. Please ensure that your code adheres to the project's coding standards and include tests for new features or bug fixes.\n\n# License \u0026 Copyright\n\nFleetbase is made available under the terms of the \u003ca href=\"https://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"\u003eGNU Affero General Public License 3.0 (AGPL 3.0)\u003c/a\u003e. For other licenses \u003ca href=\"mailto:hello@fleetbase.io\" target=\"_blank\"\u003econtact us\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffleetbase%2Ffleetbase-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffleetbase%2Ffleetbase-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffleetbase%2Ffleetbase-cli/lists"}