Netbook
A lightweight, TUI-first "Postman-like" request collection manager and runner written in Rust.

Features
- Fast TUI Interface - Built with ratatui for responsive terminal UI
- Collection Management - JSON and YAML support for request collections
- Variable Interpolation - Support for
{{variable}}syntax with .env files - Response Viewer - Pretty JSON, raw text, headers, and timing views
- Request History - Automatic saving and browsing of response history
- Headless Mode - Run requests from CLI for automation and CI/CD
- Plugin System - Extensible architecture for custom functionality
- HTTP Methods - Support for GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Quick Start
Installation
# Clone the repository
# Build the project
# The binary will be available at target/release/netbook
Basic Usage
# Open TUI with a collection file
# Run a request in headless mode
# Export last response
Demo Walkthrough
-
Try the example collection:
-
Navigate requests:
- Use
↑/↓orj/kto navigate requests - Press
Enterto execute the selected request
- Use
-
Filter requests:
- Press
/to open filter mode - Type to filter by name, URL, or method
- Press
Enterto apply orEscto cancel
- Press
-
View responses:
- Use
Tabto switch between Pretty JSON, Raw, Headers, and Timeline tabs - Responses are automatically saved to history
- Use
-
Manage variables:
- Press
vto view current variables - Variables can be defined in
.netbook.envfiles
- Press
TUI Keybindings
| Key | Action |
|---|---|
↑/↓, j/k |
Navigate requests |
Enter |
Execute selected request |
e |
Edit request (opens $EDITOR) |
/ |
Filter requests |
v |
View/edit variables |
h |
Browse response history |
: |
Command mode |
Tab |
Switch response tabs |
s |
Save response value to variable |
q, Ctrl+C |
Quit |
Collection Format
Netbook supports both JSON and YAML formats. Here's the structure:
Supported HTTP Methods
GET- Retrieve dataPOST- Create new resourcesPUT- Update entire resourcesPATCH- Partial updatesDELETE- Remove resourcesHEAD- Headers onlyOPTIONS- Check supported methods
Variable Interpolation
Variables can be used anywhere in requests using {{variableName}} syntax.
Variable Sources (in priority order)
- In-memory variables - Set interactively in the TUI
- Environment file -
.netbook.envnext to your collection file - Process environment - System environment variables
Example .netbook.env file
# Base API configuration
baseUrl=https://api.example.com
token=your_bearer_token_here
# User settings
userId=123
apiVersion=v1
Setting Variables from Responses
In the response pane, you can save response values to variables:
- Navigate to a JSON field
- Press
sto save the value to a variable - The variable becomes available for future requests
Response History
Netbook automatically saves the last 100 responses to ~/.local/share/netbook/history.json.
Browsing History
- Press
hin the TUI to browse response history - Navigate with
↑/↓, pressEnterto view a historical response - History includes request name, timestamp, and response status
Exporting Responses
# Export the last response
# Export from history (programmatically)
Headless Mode
Run requests without the TUI for automation and CI/CD:
# Execute a specific request
# Use in scripts
if ; then
else
fi
Plugin System
Netbook includes an extensible plugin system for custom functionality.
Built-in Plugins
- Example Logger - Logs all requests to a file
Creating Custom Plugins
Implement the Plugin trait:
use Plugin;
use async_trait;
;
Register your plugin in the PluginManager:
plugin_manager.register;
Design Decisions
Why ratatui?
We chose ratatui over alternatives because:
- Performance: Efficient terminal rendering with minimal overhead
- Cross-platform: Works consistently on Linux, macOS, and Windows
- Active Development: Well-maintained with regular updates
- Flexible Layouts: Powerful layout system for complex UIs
- Widget Ecosystem: Rich set of built-in widgets
Architecture Overview
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ CLI │───▶│ TUI │───▶│ UI │
│ (clap args) │ │ (app state) │ │ (ratatui) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Core │ │ I/O │ │ Plugins │
│ (HTTP executor) │ │ (collections) │ │ (hooks) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
Future Improvements
Planned Features
- gRPC Support - Add protocol buffer and gRPC request support
- WebSocket Testing - Interactive WebSocket connection testing
- OAuth Flows - Built-in support for OAuth 2.0 authentication
- Request Chaining - Automatic variable extraction and request sequencing
- Performance Testing - Load testing with request rate controls
- Response Diffing - Compare responses across different requests or time
- Custom Scripts - Pre/post-request JavaScript execution
Technical Improvements
- Dynamic Plugin Loading - Load plugins at runtime from external libraries
- Async UI Updates - Non-blocking response streaming in TUI
- Advanced Filtering - Regular expressions and complex query filters
- Themes - Customizable color schemes and UI themes
- Request Templates - Generate requests from OpenAPI specs