asyncapi / asyncapi/optimizer

[Community Goal 2026] [S1] Move optimizer into the CLI

Open
#306 7 comments 0 reactions 1 assignee Claimed by @princerajpoot20 View on GitHub
microgrant
Dominant language
TypeScript
Stars
12
Forks
11
PR merge metrics
No merged PRs in 30d

Description

## Description

We have approval from the codeowners of `optimizer` and `cli`.
More details here:
https://github.com/asyncapi/optimizer/issues/303
https://github.com/asyncapi/cli/issues/2251

We are proceeding with the merger.

Move `@asyncapi/optimizer` into `asyncapi/cli` as `packages/optimizer/`. Same npm package name and public API — no breaking change for consumers.

`cli` is not a monorepo today — this migration also introduces npm workspaces + Turbo (root stays `@asyncapi/cli`) and aligns npm publish with the `parser-js` Changesets flow (`changeset publish`).

### Action items

- [ ] Introduce npm workspaces + Turbo on `cli` (`packages/*`; keep `@asyncapi/cli` at repo root)
- [ ] Move code into `cli` (`packages/optimizer/`)
- [ ] Update `turbo.json` / monorepo wiring for the new package
- [ ] Point root CLI dependency at the workspace package (today `"@asyncapi/optimizer": "^1.0.4"`)
- [ ] Move `@asyncapi/parser` on optimizer to peerDependency.
- [ ] Sort out releases so `@asyncapi/optimizer` publishes from `cli` (`changeset publish`, like `parser-js`. NPM Trusted Publishing for this package on `cli`)
- [ ] Update repo-related details in the optimizer `package.json` (repository URL and other related fields as needed)
- [ ] Merge CODEOWNERS: Add all current codeowners of optimizer (`@princerajpoot20`) to `CODEOWNERS` in `cli`
- [ ] Add a spec for `optimizer` (see below)
- [ ] Update other relevant files as needed, such as the README and architecture docs.

**Optional:** verify the first release from the monorepo publishes correctly.

**Out of scope:** Archiving the optimizer repo.

### Spec

The reason we are consolidating these repos and the broader community goal of auditing, is to improve repo health and maintainability, bring on more maintainers, and eventually reduce maintainer burnout.

As part of that, we are adding specs in these repos. Specs act as a source of truth for contributors, and more importantly give AI context about the package. That should help anyone developing here, whatever approach they follow: pure vibe coding, pure spec-driven, or a mix of both.

### Notes on references inside `cli`

What *does* need updating: root `package.json` currently has `"@asyncapi/optimizer": "^1.0.4"` (npm). After migration it should use the local workspace package, so builds/tests resolve to `packages/optimizer` instead of registry.npmjs.org.

Release workflow today only publishes root `@asyncapi/cli`; after migration it should use `changeset publish` (like `parser-js`) so `@asyncapi/optimizer` publishes from this repo too.

Docs/README links that currently point at the standalone GitHub repo can be updated to the monorepo path as a follow-up.

### References

- https://github.com/asyncapi/optimizer
- https://github.com/asyncapi/cli
- Prior art: https://github.com/asyncapi/openapi-schema-parser/issues/326

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.