Skip to content

gomjellie/lazyapi

Repository files navigation

lazyapi

A Vim-style TUI (Terminal User Interface) tool
for exploring Swagger/OpenAPI documents and testing APIs in the terminal

License: MIT Node Version

demo


✨ Features

  • 🎹 Vim-style keyboard navigation - Familiar keybindings like h, j, k, l with NORMAL, INSERT, and COMMAND modes
  • ✏️ Vim integration for JSON editing - Seamlessly connect to Vim for advanced JSON editing
  • πŸ“„ 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/lazyapi

πŸš€ Usage

Basic Usage

lazyapi <openapi-file-or-url>

Examples

# URL
lazyapi https://petstore.swagger.io/v2/swagger.json

# JSON file
lazyapi openapi.json

# YAML file
lazyapi swagger.yaml

⌨️ Keyboard Shortcuts

List View

image
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

image

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments


Made with ❀️ by gomjellie

About

πŸ”Œ TUI Swagger/OpenAPI for VIM Lovers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published