Enhancing Performance and Reliability of AsyncAPI CLI
Overview
The AsyncAPI CLI is nearly feature-complete, but its performance, testing reliability, and usability need significant improvements. This project focuses on optimizing command execution speed, enhancing test reliability, and introducing much-requested features such as publishing and syncing AsyncAPI files with remote repositories.
Why This is Needed
Performance Issues: Some CLI commands, such as generate, take too long to execute. Flaky Testing & Outdated Dependencies: Running test cases locally is challenging due to outdated dependencies, leading to debugging issues. Long-Standing Feature Gaps: The community has requested a way to publish and sync AsyncAPI files with repositories. Slow Installation: The CLI installation process is inefficient; migrating to Bun or pnpm could speed this up. Lack of Custom Validation Rules: Users cannot currently validate AsyncAPI files against their own Spectral rules.
Project Goals
✅ Performance Optimization:
- Profile and optimize slow CLI commands, particularly generate.
- Investigate migrating to Bun or pnpm to speed up installation.
✅ Test & Debugging Improvements:
- Update outdated dependencies to improve test reliability
- Refactor test cases to reduce flakiness and make debugging easier.
✅ New Features:
- Publish & Sync: Implement functionality to allow users to sync and publish AsyncAPI files with remote repositories (related issue)
- Custom Validation Rules: Enable users to validate AsyncAPI files against custom Spectral rules for better enforcement of API standards.
✅ Logging & Documentation Improvements:
- Improve logging to provide clearer feedback and debugging information.
- Update documentation to reflect performance improvements and new features.
Expected Outcome
By the end of GSoC 2025, the AsyncAPI CLI should be significantly faster, more reliable, and equipped with features that improve usability and debugging. The improvements will make contributing to the project easier while also enhancing the developer experience for end users.
Skills Required
JavaScript/TypeScript Node.js Performance Optimization (e.g., profiling, dependency management) Testing Libraries APIs
Difficulty Level
🟡 Medium to High
Resources
AsyncAPI CLI Repository AsyncAPI Generator Issue #538 Bun.sh pnpm Spectral Rules for API Validation
Hi @AceTheCreator , @AayushSaini101 and team The project idea presents a fantastic opportunity to gain hands-on experience while contributing meaningfully to an open-source initiative that benefits a large developer community. I have been an active contributor to open-source projects, and I look forward to collaborating with the mentors and the community to bring these improvements to the AsyncAPI CLI.
Research and Findings regarding testing of interactive mode in some commands - The AsyncAPI CLI provides an interactive mode for certain commands, which is implemented using different libraries across the codebase. Specifically:
- inquirer is used for commands like
asyncapi file. - @clack/prompts is used for commands like
asyncapi generate fromTemplate.
However, the current codebase lacks proper testing for this interactive mode, making it difficult to ensure reliability and consistency.
After research, a method was identified to test multiple calls to ux.prompt without requiring any additional external libraries, apart from the default @oclif/core. The ux.prompt method can be effectively stubbed using Sinon.JS , which is integrated within @oclif/test. Sinon.JS stubs can be used to mock responses for multiple prompts.
Resource - https://github.com/oclif/oclif/issues/286#issuecomment-1925006955
Hi @AceTheCreator, @AayushSaini101, and team,
I have started working on this project and analyzed the generate command’s performance. It currently takes ~73s to execute, highlighting the need for optimization. I’ll be working on improving execution speed and overall CLI efficiency.
Key Focus Areas: Performance Optimization → Profiling and refining slow commands like generate, exploring Bun/pnpm for faster installation. Testing & Debugging → Updating dependencies and improving test stability. New Features → Enhancing validation rules and implementing publish & sync. Logging & Docs → Improving clarity for better developer experience.
Hey @AceTheCreator @AayushSaini101 , 👋
I’ve been exploring the AsyncAPI CLI and am really excited to contribute! After reviewing the project goals, I’d love to start by addressing the outdated dependencies to improve test reliability and reduce flakiness.
Updating the dependencies would:
- Fix potential security vulnerabilities.
- Improve CLI performance through library optimizations.
- Make local testing more consistent and easier to debug.
I can start by auditing the current dependencies, categorizing updates (minor/major), and running tests to catch any regressions. If you’d like, I can split this into smaller PRs for easier review.
Would this be a good place to begin, or would you prefer me to prioritize a different aspect of the CLI improvements? Let me know — happy to align with the team’s direction! 🚀
Best, Vishal
Hello. What's the expected size of this project?
hey @AceTheCreator @AayushSaini101 and team From my understanding, the CLI has performance issues, outdated dependencies, and lacks custom validation rules. The plan includes optimizing execution speed (especially for generate), updating dependencies, and adding Spectral-based validation. Are there specific areas where contributions are most needed right now?
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart: