postboy-tui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +188 -0
  2. package/dist/cli +0 -0
  3. package/package.json +44 -0
package/README.md ADDED
@@ -0,0 +1,188 @@
1
+ # Postboy
2
+
3
+ A modern, terminal-based API testing and development tool with a clean TUI (Text User Interface). Postboy helps you design, test, and debug HTTP requests efficiently, all from your terminal.
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ - [Features](#features)
10
+ - [Installation](#installation)
11
+ - [Usage](#usage)
12
+ - [Screenshots](#screenshots)
13
+ - [Feature Details](#feature-details)
14
+ - [Contributing](#contributing)
15
+ - [License](#license)
16
+ - [Contact](#contact)
17
+
18
+ ---
19
+
20
+ ## Features
21
+
22
+ - **Intuitive TUI**: Clean, keyboard-driven interface for rapid API testing.
23
+ - **Request Composer**: Easily create and edit HTTP requests (GET, POST, PUT, DELETE, etc.).
24
+ - **History Management**: Automatically saves and organizes your request history.
25
+ - **Response Viewer**: Pretty-prints JSON, XML, and raw responses.
26
+ - **Theming**: Switch between ten different themes.
27
+ - **Mock Server**: Quickly spin up mock endpoints for local testing.
28
+ - **Logging**: Detailed request/response logs for debugging.
29
+ - **Keyboard Shortcuts**: Efficient navigation and actions.
30
+ - **Configurable**: Customize settings to fit your workflow.
31
+
32
+ ---
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ # Using bun
38
+ bun install
39
+
40
+ # Or using npm
41
+ npm install
42
+ ```
43
+
44
+ ---
45
+
46
+ ## Usage
47
+
48
+ ### Run in Development
49
+
50
+ ```bash
51
+ # Start the TUI (Text User Interface)
52
+ bun run src/index.ts ui
53
+
54
+ # Or with npm
55
+ npm start -- ui
56
+ ```
57
+
58
+ ### CLI Commands
59
+
60
+ - **Launch TUI interface:**
61
+ ```bash
62
+ bun run src/index.ts ui
63
+ # or, if installed globally:
64
+ postboy ui
65
+ ```
66
+
67
+ - **Send a test API request (interactive prompt):**
68
+ ```bash
69
+ bun run src/index.ts test
70
+ # or
71
+ postboy test
72
+ ```
73
+
74
+ - **List available mock API endpoints:**
75
+ ```bash
76
+ bun run src/index.ts mock-list
77
+ # or
78
+ postboy mock-list
79
+ ```
80
+
81
+ ### Build and Install Globally (Optional)
82
+
83
+ To use the `postboy` command anywhere:
84
+
85
+ ```bash
86
+ bun run build
87
+ bun add -g .
88
+ # Now you can use:
89
+ postboy ui
90
+ postboy test
91
+ postboy mock-list
92
+ ```
93
+
94
+ ---
95
+
96
+ ## Feature Details
97
+
98
+ ### 1. Intuitive TUI
99
+
100
+ A clean, keyboard-driven interface designed for productivity. Navigate between panels, compose requests, and view responses without leaving your terminal.
101
+
102
+ <img width="1111" height="649" alt="image" src="https://github.com/user-attachments/assets/de940869-4bfe-4349-a1bd-2259d46f2fde" />
103
+
104
+ ---
105
+
106
+ ### 2. Request Composer
107
+
108
+ Create and edit HTTP requests with support for all major methods. Add headers, body, and query parameters with ease.
109
+
110
+ <img width="643" height="428" alt="image" src="https://github.com/user-attachments/assets/304c5903-f3c1-4470-85d2-39eebb184c63" />
111
+
112
+
113
+ ---
114
+
115
+ ### 3. History Management
116
+
117
+ Automatically saves every request you make. Browse, search, and re-run previous requests.
118
+
119
+
120
+ <img width="427" height="440" alt="image" src="https://github.com/user-attachments/assets/cf055710-5701-490c-bfc6-a9afbbea223d" />
121
+
122
+
123
+ ---
124
+
125
+ ### 4. Response Viewer
126
+
127
+ View responses in a pretty-printed format. Supports JSON, XML, and raw text. Syntax highlighting for easy reading.
128
+
129
+ <img width="646" height="692" alt="image" src="https://github.com/user-attachments/assets/d5c60702-c71e-410c-bfbd-2643f78403f3" />
130
+
131
+
132
+ ---
133
+
134
+ ### 5. Theming
135
+
136
+ Switch between light and dark themes to suit your preference.
137
+
138
+ > _Screenshot: Theming_
139
+
140
+ ---
141
+
142
+ ### 6. Mock Server
143
+
144
+ Spin up local mock endpoints for testing your API clients without needing a real backend.
145
+
146
+ ---
147
+
148
+ ### 7. Logging
149
+
150
+ Detailed logs of all requests and responses, including headers, status codes, and timings.
151
+
152
+ ---
153
+
154
+ ### 8. Keyboard Shortcuts
155
+
156
+ Navigate and perform actions quickly using intuitive keyboard shortcuts.
157
+
158
+ ---
159
+
160
+ ### 9. Configurable
161
+
162
+ Customize settings such as themes, default headers, and more to fit your workflow.
163
+
164
+ ---
165
+
166
+ ## Contributing
167
+
168
+ Contributions are welcome! Please open issues or submit pull requests for new features, bug fixes, or improvements.
169
+
170
+ 1. Fork the repository
171
+ 2. Create your feature branch (`git checkout -b feature/YourFeature`)
172
+ 3. Commit your changes (`git commit -m 'Add some feature'`)
173
+ 4. Push to the branch (`git push origin feature/YourFeature`)
174
+ 5. Open a pull request
175
+
176
+ ---
177
+
178
+ ## License
179
+
180
+ [MIT](./LICENSE)
181
+
182
+ ---
183
+
184
+ ## Contact
185
+
186
+ For support, questions, or feedback, please open an issue or contact the maintainer.
187
+
188
+ ---
package/dist/cli ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "postboy-tui",
3
+ "version": "1.0.0",
4
+ "main": "dist/cli",
5
+ "bin": {
6
+ "postboy-tui": "dist/cli"
7
+ },
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "start": "bun run src/index.ts",
13
+ "build": "bun build src/index.ts --outfile=dist/cli --compile",
14
+ "dev": "bun run --watch src/index.ts"
15
+ },
16
+ "module": "src/index.ts",
17
+ "type": "module",
18
+ "private": false,
19
+ "devDependencies": {
20
+ "@types/bun": "latest",
21
+ "@types/inquirer": "^9.0.8"
22
+ },
23
+ "peerDependencies": {
24
+ "typescript": "^5"
25
+ },
26
+ "dependencies": {
27
+ "@types/react": "^19.1.8",
28
+ "axios": "^1.11.0",
29
+ "chalk": "4.1.2",
30
+ "cli-highlight": "^2.1.11",
31
+ "commander": "^14.0.0",
32
+ "ink": "^6.0.1",
33
+ "ink-big-text": "^2.0.0",
34
+ "ink-gradient": "^3.0.0",
35
+ "ink-link": "^4.1.0",
36
+ "ink-select-input": "^6.2.0",
37
+ "ink-spinner": "^5.0.0",
38
+ "ink-text-input": "^6.0.0",
39
+ "inquirer": "8.2.5",
40
+ "react": "^19.1.0",
41
+ "react-devtools-core": "^6.1.5",
42
+ "yaml": "^2.8.0"
43
+ }
44
+ }