Skip to content

Commit 7279e29

Browse files
authored
Merge pull request #55 from maniac-en/v0.1.0
release/v0.1.0
2 parents 4aafe89 + 65251fe commit 7279e29

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+3223
-1414
lines changed

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'v[0-9]+.[0-9]+.[0-9]+'
8+
pull_request:
9+
branches:
10+
- main
11+
- 'v[0-9]+.[0-9]+.[0-9]+'
12+
13+
jobs:
14+
build-test:
15+
name: Build, Test & Coverage on ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Go
26+
uses: actions/setup-go@v5
27+
with:
28+
go-version: '1.24.4'
29+
30+
- name: Build
31+
run: go build ./...
32+
33+
- name: Run Tests with Coverage
34+
run: |
35+
go test -coverprofile=coverage.out ./...
36+
go tool cover -func=coverage.out
37+
shell: bash
38+
39+
- name: Upload coverage report
40+
if: matrix.os == 'ubuntu-latest'
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: coverage-report
44+
path: coverage.out
45+
46+
format:
47+
name: Auto-format with gofmt (Linux only)
48+
runs-on: ubuntu-latest
49+
if: github.event_name == 'push' && github.repository_owner == github.actor
50+
51+
steps:
52+
- name: Checkout code
53+
uses: actions/checkout@v4
54+
55+
- name: Set up Go
56+
uses: actions/setup-go@v5
57+
with:
58+
go-version: '1.24.4'
59+
60+
- name: Run gofmt and commit changes if needed
61+
run: |
62+
gofmt -w .
63+
if [ -n "$(git status --porcelain)" ]; then
64+
echo "Code was not formatted. Committing changes..."
65+
git config user.name "github-actions"
66+
git config user.email "github-actions@github.com"
67+
git add .
68+
git commit -m "chore: auto-format Go code via gofmt"
69+
git push
70+
else
71+
echo "Code already properly formatted."
72+
fi

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release on merge of versioned branch into main
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'v')
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Extract version from branch name
19+
run: echo "VERSION=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version: '1.24.4'
25+
26+
- name: Build with version
27+
run: go build -ldflags "-X main.Version=${VERSION}" -o req
28+
29+
- name: Tag main with version
30+
run: |
31+
git config user.name "github-actions"
32+
git config user.email "github-actions@github.com"
33+
git fetch --unshallow --tags
34+
git tag "${VERSION}"
35+
git push origin "${VERSION}"
36+
37+
- name: Create GitHub Release
38+
uses: softprops/action-gh-release@v2
39+
with:
40+
tag_name: ${{ env.VERSION }}
41+
files: req
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,82 @@
1-
# req - A terminal API client
1+
# Req - Test APIs with Terminal Velocity
22

3+
[![tests](https://github.com/maniac-en/req/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/maniac-en/req/actions/workflows/go.yml)
34
![GitHub repo](https://img.shields.io/badge/built%20at-Boot.dev%20Hackathon-blueviolet)
5+
6+
## About
7+
8+
`req` is a lightweight, terminal-based API client built for the
9+
[Boot.dev Hackathon 2025](https://github.com/maniac-en/req?tab=License-1-ov-file).
10+
It features a fast and minimal text user interface and lets you create, send,
11+
and inspect HTTP requests interactively from the command line. It is ideal for
12+
testing APIs without leaving your terminal.
13+
14+
Read more about `req` over here -
15+
[Announcement Blog](https://maniac-en.github.io/req/)
16+
17+
## Installation
18+
19+
### You can install `req` using `go install`:
20+
21+
To install a specific release
22+
23+
```
24+
go install github.com/maniac-en/req@v0.1.0
25+
```
26+
27+
Replace `v0.1.0` with the version you want.
28+
29+
### Requirements
30+
31+
- Go version 1.24.4
32+
33+
## Usage
34+
35+
After installing `req`, you can run it using this command.
36+
37+
```
38+
req
39+
```
40+
41+
## Libraries Used
42+
43+
### Terminal UI (by Charm.sh)
44+
45+
- [bubbletea](https://github.com/charmbracelet/bubbletea) — A powerful, fun TUI
46+
framework for Go
47+
- [bubbles](https://github.com/charmbracelet/bubbles) — Pre-built components for
48+
TUI apps
49+
- [lipgloss](https://github.com/charmbracelet/lipgloss) — Terminal style/layout
50+
DSL
51+
52+
## License
53+
54+
This project is licensed under the
55+
[MIT License](https://github.com/maniac-en/req?tab=License-1-ov-file).
56+
57+
```
58+
1. Mudassir Bilal (mailto:mughalmudassir966@gmail.com)
59+
2. Shivam Mehta (mailto:sm.cse17@gmail.com)
60+
3. Yash Ranjan (mailto:yash.ranjan25@gmail.com)
61+
62+
MIT License
63+
64+
Copyright (c) 2025 Mudassir Bilal, Shivam Mehta, Yash Ranjan
65+
66+
Permission is hereby granted, free of charge, to any person obtaining a copy of
67+
this software and associated documentation files (the "Software"), to deal in
68+
the Software without restriction, including without limitation the rights to
69+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
70+
the Software, and to permit persons to whom the Software is furnished to do so,
71+
subject to the following conditions:
72+
73+
The above copyright notice and this permission notice shall be included in all
74+
copies or substantial portions of the Software.
75+
76+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
77+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
78+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
79+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
80+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
81+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
82+
```

docs/images/banner.png

1.52 MB
Loading

docs/images/req-demo.gif

93.3 KB
Loading

docs/index.html

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,19 @@
44
<head>
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<title> req - Terminal API Client </title>
7+
<title> Req - Test APIs with Terminal Velocity </title>
88
<link href="/req/index.css" rel="stylesheet">
99

1010
</head>
1111

1212
<body>
1313
<article>
14-
<div><h1>req - Terminal API Client</h1><blockquote><b>Note</b>: This page is not up to date and serves as a boilerplate for the blog setup.</blockquote><p>A terminal-based API client built for the <a href="https://blog.boot.dev/news/hackathon-2025/">Boot.dev Hackathon 2025</a>.</p><h2>Features</h2><ul><li>Terminal user interface</li><li>Request collections</li><li>Environment variables</li><li>Request history</li></ul><h2>Tech Stack</h2><p>The project uses:</p><ol><li><b>Go</b> for core logic</li><li><b>Bubble Tea</b> for TUI</li><li><b>SQLite</b> for storage</li></ol><h3>Code Example</h3><pre>go
15-
func main() {
16-
fmt.Println("Hello, req!")
17-
}
18-
</pre><h2>Installation</h2><pre>bash
19-
go build -o req .
20-
./req
21-
</pre><h3>Commands</h3><ul><li><code>req --help</code> - Show help</li><li><code>req --verbose</code> - Verbose output</li></ul><h2>Lists Test</h2><p><b>Unordered list:</b>
22-
- Item one
23-
- Item two
24-
- Item three</p><p><b>Ordered list:</b>
25-
1. First step
26-
2. Second step
27-
3. Third step</p><h2>Text Formatting</h2><p>This has <b>bold text</b>, <i>italic text</i>, and <code>inline code</code>.</p><p>---</p><p>This blog is built with ❤️ using <a href="https://github.com/maniac-en/pyssg">pyssg</a> - A guided learning project at <a href="https://www.boot.dev/courses/build-static-site-generator">boot.dev</a></p></div>
14+
<div><img src="images/banner.png" alt="Req Banner" style="width: 100%; max-width: 800px; margin-bottom: 20px;"><h1>Req - Test APIs with Terminal Velocity</h1><p>A terminal-based API client built for the <a href="https://blog.boot.dev/news/hackathon-2025/">Boot.dev Hackathon 2025</a>.</p><h2>Features</h2><ul><li>Terminal user interface with beautiful TUI</li><li>Request collections and organization</li><li>Demo data generation with realistic APIs</li><li>Request builder with tabs for body, headers, query params</li><li>Production-ready logging system</li></ul><h2>Tech Stack</h2><p>The project uses:</p><ol><li><b>Go</b> for core logic and HTTP operations</li><li><b>Bubble Tea</b> for terminal user interface</li><li><b>SQLite</b> for file-based storage</li><li><b>SQLC</b> for type-safe database operations</li><li><b>Goose</b> for database migrations</li></ol><h2>Installation</h2><pre>bash
15+
go install github.com/maniac-en/req@v0.1.0
16+
req
17+
</pre><img src="images/req-demo.gif" alt="Demo GIF" style="width: 100%; max-width: 800px; margin: 20px 0;"><h2>What's Implemented</h2><ul><li>Collections CRUD operations (create, edit, delete, navigate)</li><li>Request builder interface with tabbed editing</li><li>Endpoint browsing with sidebar navigation</li><li>Demo data generation (JSONPlaceholder, ReqRes, HTTPBin APIs)</li><li>Beautiful warm color scheme with vim-like navigation</li><li>Pagination and real-time search filtering</li></ul><h2>Coming Soon</h2><ul><li>HTTP request execution (core feature)</li><li>Response viewer with syntax highlighting</li><li>Endpoint management (add/edit endpoints)</li><li>Environment variables support</li><li>Export/import functionality</li></ul><h2>Try It Out</h2><p><b>GitHub</b>: https://github.com/maniac-en/req
18+
<b>Installation</b>: <code>go install github.com/maniac-en/req@v0.1.0</code>
19+
<b>Usage</b>: Just run <code>req</code> in your terminal!</p><p>The app works completely offline with no external dependencies required.</p><p>---</p><p>This blog is built with ❤️ using <a href="https://github.com/maniac-en/pyssg">pyssg</a> - A guided learning project at <a href="https://www.boot.dev/courses/build-static-site-generator">boot.dev</a></p></div>
2820
</article>
2921
</body>
3022

global/context.go

Lines changed: 0 additions & 25 deletions
This file was deleted.

global/state.go

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)