# @golemio/cli

> Collection of executables intended for use with Golemio services and modules

Latest version **2.0.0** (published 2026-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @golemio/cli
pnpm add @golemio/cli
yarn add @golemio/cli
bun add @golemio/cli
```

Provides the command `golemio`.

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-08-11 |
| First published | 2021-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=24.0.0 |
| Dependencies | 21 |
| Unpacked size | 165.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | Operator ICT, a.s. |
| Maintainers | sinacek, benaktom, oict-robot |
| Keywords | golemio, cli |

## Links

- npm: https://www.npmjs.com/package/@golemio/cli
- Repository: https://gitlab.com/operator-ict/golemio/code/golemio-cli
- Homepage: https://gitlab.com/operator-ict/golemio/code/golemio-cli#readme
- Issues: https://gitlab.com/operator-ict/golemio/code/golemio-cli/issues
- npm.io page: https://npm.io/package/@golemio/cli

## Dependencies (21)

- [pg](https://npm.io/package/pg.md) ^8.8.0
- [open](https://npm.io/package/open.md) ^8.4.0
- [execa](https://npm.io/package/execa.md) ^5.1.1
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.2
- [amqplib](https://npm.io/package/amqplib.md) ^0.10.8
- [gluegun](https://npm.io/package/gluegun.md) ^5.1.3
- [is-glob](https://npm.io/package/is-glob.md) ^4.0.3
- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.0
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.2.12
- [pg-format](https://npm.io/package/pg-format.md) ^1.0.4
- [db-migrate](https://npm.io/package/db-migrate.md) npm:@golemio/db-migrate@1.0.0-beta.29-diversion.4
- [simple-git](https://npm.io/package/simple-git.md) ^3.16.0
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^7.0.6
- [db-migrate-pg](https://npm.io/package/db-migrate-pg.md) npm:@golemio/db-migrate-pg@1.2.3-diversion.8
- [openapi-merge](https://npm.io/package/openapi-merge.md) ^1.3.2
- [@azure/identity](https://npm.io/package/@azure/identity.md) ^4.4.1
- [@gitbeaker/node](https://npm.io/package/@gitbeaker/node.md) ^35.7.0
- [changelog-parser](https://npm.io/package/changelog-parser.md) ^3.0.1
- [@asyncapi/bundler](https://npm.io/package/@asyncapi/bundler.md) ^0.6.4
- [@azure/storage-blob](https://npm.io/package/@azure/storage-blob.md) ^12.25.0
- [pg-connection-string](https://npm.io/package/pg-connection-string.md) ^2.5.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2026-08-11
- 2.0.1-dev.2860916143 (dev) — 2026-09-18
- 2.0.0-rc.2749825271 (rc) — 2026-08-11
- 2.0.1-dev.2749825918 — 2026-08-11
- 2.0.0-rc.2749769987 — 2026-08-11
- 2.0.0-rc.2749764966 — 2026-08-11
- 1.12.0-rc.2747063077 — 2026-08-10
- 1.11.3-dev.2740660130 — 2026-08-07
- 1.12.0 — 2026-07-14
- 1.12.0-rc.2674871671 — 2026-07-14
- 1.11.3-dev.2604695603 — 2026-06-16
- 1.11.3-rc.2561644670 — 2026-05-29
- 1.11.3-dev.2540650702 — 2026-05-20
- 1.11.3-dev.2404741178 — 2026-03-24
- 1.11.3-dev.2321596318 — 2026-02-12
- … 144 more at https://npm.io/package/@golemio/cli/versions

## README

[![pipeline status](https://gitlab.com/operator-ict/golemio/code/golemio-cli/badges/master/pipeline.svg)](https://gitlab.com/operator-ict/golemio/code/golemio-cli/commits/master)
[![coverage report](https://gitlab.com/operator-ict/golemio/code/golemio-cli/badges/master/coverage.svg)](https://gitlab.com/operator-ict/golemio/code/golemio-cli/commits/master)

# Golemio CLI

> Golemio CLI is a collection of executables intended for use with Golemio services and modules

## Install the CLI

### Prerequisites

-   Node.js version 24 or later (https://nodejs.org)

### Install locally (recommended)

```bash
$ cd my-project

# With Yarn
$ yarn add --dev @golemio/cli
# For Portman support, run yarn add --dev @apideck/portman@^1.16.1

# With npm
$ npm install --save-dev @golemio/cli
# For Portman support, run npm install --save-dev @apideck/portman@^1.16.1

# Test it out
$ yarn golemio
$ npm exec golemio
```

### Install globally

```bash
# With Yarn
$ yarn global add @golemio/cli

# With npm
$ npm install -g @golemio/cli

# Test it out
$ golemio
```

## Commands summary

| Command                                 | Description                                                                                           |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| golemio                                 | Default command (welcome)                                                                             |
| golemio help                            | View available commands                                                                               |
| golemio migrate-db help                 | View available migration commands and flags                                                           |
| golemio migrate-db create \<name\>      | Create new migration scripts (--postgres, --path)                                                     |
| golemio migrate-db up                   | Execute up migrations (--postgres, --path)                                                            |
| golemio migrate-db down                 | Execute down migrations (--postgres, --path)                                                          |
| golemio migrate-db reset                | Reset all executed migrations (--postgres, --path)                                                    |
| golemio import-db-data help             | View available db data import commands and flags                                                      |
| golemio import-db-data                  | Import db data (--dangerous, --postgres)                                                              |
| golemio rabbitmq help                   | View available rabbitmq commands and flags                                                            |
| golemio rabbitmq send --help            | View available rabbitmq send flags                                                                    |
| golemio rabbitmq receive --help         | View available rabbitmq receive flags                                                                 |
| golemio release help                    | View available commands                                                                               |
| golemio release check-modules-integrity | Check module group if new repo was added                                                              |
| golemio release check                   | Check repos that are ready to release (--scope, --skip or --only, --interactive)                      |
| golemio release merge                   | Merge repos marked as release candidate by `check` command (--scope, --skip or --only, --interactive) |
| golemio release check-mr-pipelines      | Show pipelines of merged repos (--scope, --skip or --only, --interactive)                             |
| golemio release sync-branches           | Synchronize branches after release (--scope, --skip or --only, --interactive)                         |
| golemio release create-tags             | Create tags and releases of merged repos (--scope, --skip or --only, --interactive)                   |
| golemio release print-release-issue     | Print issues and release candidate modules                                                            |
| golemio swagger help                    | View available swagger commands and flags                                                             |
| golemio swagger generate                | Generate OAS file from multiple inputs                                                                |
| golemio swagger api-test                | Run Portman integration tests                                                                         |
| golemio asyncapi merge                  | Merge asyncapi documentation                                                                          |
| golemio asyncapi upload                 | Build and upload the asyncapi documentation to the azure blob storage                                 |

Read [release_management_CZ](./docs/release_management_CZ.md) for more info to `release` command. Read [migrations](./docs/migrations.md) for more info about database migrations.

## Environmental variables

| Variable                | Example                                       | Required                                             |
| ----------------------- | --------------------------------------------- | ---------------------------------------------------- |
| POSTGRES_CONN           | postgres://oict:oict-pass@localhost/oict-test | :white_check_mark: (mdb and idd postgres)            |
| RABBIT_CONN             | amqp://rabbit:pass@localhost                  | :white_check_mark: (rmq)                             |
| POSTGRES_MIGRATIONS_DIR | db/migrations/postgresql (default)            | :negative_squared_cross_mark:                        |
| SQL_DUMP_FILES          | db/example/\*.sql                             | :white_check_mark: (idd postgres)                    |
| GITLAB_API_TOKEN        | token                                         | :white_check_mark: (rls)                             |
| RELEASE_BRANCH_NAME     | release                                       | :negative_squared_cross_mark: (rls) default: release |
| TARGET_BRANCH_NAME      | master                                        | :negative_squared_cross_mark: (rls) default: master  |

The value of the variable GITLAB_API_TOKEN should be created in GitLab User Settings [page Access Tokens](https://gitlab.com/-/profile/personal_access_tokens). Token scopes are `api`, `read_repository` and `write_repository`.

## Development

### Local environment

To set up your local development environment, install project dependencies and create .env file in the root of the project (see [.env.template](https://gitlab.com/operator-ict/golemio/code/golemio-cli/-/blob/development/.env.template) for reference)

```bash
$ npm install
$ cp .env.template .env
```

Now you can run the CLI in development mode, just type

```bash
$ ./bin/golemio.js
```

You don't need to compile the source code as the script automatically registers the [ts-node](https://www.npmjs.com/package/ts-node) loader in development mode

### Unit tests

Unit tests are located at test/unit. You can run them by typing

```bash
$ npm run test-unit
```

### Integration tests

Integration tests are located at test/integration. You can run them by typing

```bash
# Run local services, recommended
$ docker-compose up -d

$ npm run test-integration
```

## License

[MIT](https://gitlab.com/operator-ict/golemio/code/golemio-cli/-/blob/development/LICENSE)

---
_Source: https://npm.io/package/@golemio/cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
