@gomjellie/lazyapi
v0.0.5
Published
A terminal-based Swagger/OpenAPI explorer with Vim-style keyboard navigation
Maintainers
Readme
lazyapi
A Vim-style TUI (Terminal User Interface) tool
for exploring Swagger/OpenAPI documents and testing APIs in the terminal
✨ Features
- 🎹 Vim-style keyboard navigation - Familiar keybindings like h, j, k, l
- 📄 Swagger 2.0 & OpenAPI 3.x support - Supports both JSON/YAML formats
- 🔌 tRPC support - Coming soon
- 🎨 Terminal-friendly UI - Beautiful TUI with neon green theme
- ⚡ Fast API testing - Execute APIs directly from the terminal
- 🔍 Search & filtering - Quickly find endpoints
- 📋 Clipboard support - Copy response results to clipboard
📦 Installation
npm install -g @gomjellie/lazyapiOr run the development version locally:
git clone https://github.com/gomjellie/lazyapi.git
cd lazyapi
pnpm install
pnpm run dev examples/sample-api.json🚀 Usage
Basic Usage
lazyapi <openapi-file>Examples
# JSON file
lazyapi openapi.json
# YAML file
lazyapi swagger.yaml
# URL
lazyapi https://api.example.com/openapi.json⌨️ Keyboard Shortcuts
List View
| Key | Description |
| ------------- | -------------------------------------------------------------- |
| j | Move to next item |
| k | Move to previous item |
| g | Move to top of list |
| G | Move to bottom of list |
| :m<1-6> | Select Method (1:ALL, 2:GET, 3:POST, 4:PUT, 5:DELETE, 6:PATCH) |
| l / Enter | View details of selected endpoint |
| / | Enter search mode |
| :q | Quit |
Search Mode
| Key | Description |
| ---------- | ----------------------------------------------------- |
| Text input | Enter search query (searches path, description, tags) |
| Enter | Apply search and update results |
| Esc | Cancel search and return to NORMAL mode |
Detail View
NORMAL Mode
| Key | Description |
| ------- | ------------------------------ |
| j | Move to next field |
| k | Move to previous field |
| i | Enter INSERT mode (edit field) |
| Enter | Execute API request |
| u | Return to list view |
INSERT Mode
| Key | Description |
| ---------- | --------------------- |
| Esc | Switch to NORMAL mode |
| Text input | Edit field value |
Result View
| Key | Description |
| --------- | ----------------------------------------- |
| j / k | Scroll response content |
| Tab | Switch to next tab (Body/Headers/Cookies) |
| y | Copy Body content to clipboard |
| r | Re-run request |
| q / u | Return to detail view |
🛠️ Development
Requirements
- Node.js >= 20.0.0
- pnpm >= 8.0.0
📝 Future Plans
- [ ] Multiple environment support (dev, staging, prod)
- [ ] Request history storage
- [ ] Favorites feature
- [ ] Custom theme support
- [ ] Plugin system
🤝 Contributing
Contributions are always welcome! Please open an issue or submit a PR.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📄 License
MIT License - see the LICENSE file for details.
👤 Author
gomjellie
- GitHub: @gomjellie
🙏 Acknowledgments
- Ink - React-based terminal UI library
- swagger-parser - OpenAPI parser
