Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
73ee552
refactor: split internal packages into backend, and tui
maniac-en Jul 27, 2025
ba22ee8
feat: added pagination dots
MudassirDev Jul 27, 2025
25d47fd
refactor(tui): rework app model and views (#43)
maniac-en Jul 27, 2025
6657dff
chore(tui): enable filtering in collections view
maniac-en Jul 27, 2025
cfc074d
feat(tui): add edit and delete collection functionality
maniac-en Jul 27, 2025
8d50947
fix(backend): ensure total pages is at least 1
yashranjan1 Jul 27, 2025
45c3ac7
feat(tui): clear add collection form on success
yashranjan1 Jul 27, 2025
d511ed7
fix(tui): preserve selection and page on view return
yashranjan1 Jul 27, 2025
eeeb5eb
chore(tui): return to collections view after adding collection
maniac-en Jul 27, 2025
cd91f58
chore(tui): update footer, remove unused code
maniac-en Jul 27, 2025
f798733
feat(tui): add selected collection view
maniac-en Jul 27, 2025
658d494
feat(tui): add endpoint sidebar to selected collection view
maniac-en Jul 28, 2025
6551753
feat: improve TUI layout and styling
maniac-en Jul 28, 2025
760c338
refactor(tui): improve layout and styling consistency
maniac-en Jul 28, 2025
81cbf9d
Finish up phase 1 for v0.1.0
maniac-en Jul 28, 2025
56038fc
feat(tui): display endpoint details in selected collection view
maniac-en Jul 28, 2025
c5bd1a9
chore(ci): set up cross-platform CI workflow #45
yashranjan1 Jul 28, 2025
bb14409
chore(ci): added test coverage to ci (#46)
yashranjan1 Jul 28, 2025
7da2794
feat(tui): add request builder view
maniac-en Jul 28, 2025
5b53fa1
chore(readme): added ci badge to readme (#47)
yashranjan1 Jul 28, 2025
2cf292b
feat(tui): implement headers and query params editors in req builder
maniac-en Jul 28, 2025
6acc40d
semver addition (#48)
yashranjan1 Jul 28, 2025
ef918b7
chore(tui): improve TUI layout and styling
maniac-en Jul 28, 2025
29f7020
updated readme
yashranjan1 Jul 28, 2025
5f136b5
Update ci.yml
maniac-en Jul 28, 2025
d9d4e43
chore(readme): Update readme (#50)
maniac-en Jul 28, 2025
5ba0fc3
bugfix: collection form styling
yashranjan1 Jul 28, 2025
a9b8212
feat(tui): add "yet to be implemented" notifications for incomplete f…
maniac-en Jul 28, 2025
87eb76e
chore(tui): remove unused commented code and debug comments
maniac-en Jul 28, 2025
6a58b29
feat(tui): improve notification styling and consistency
maniac-en Jul 28, 2025
1ffb6db
feat(demo): add dummy data generation with startup notification
maniac-en Jul 28, 2025
1739600
fix: remove unused log import in collections view
maniac-en Jul 28, 2025
335df77
feat(tui): add 'a: add endpoint' keybind to footer
maniac-en Jul 28, 2025
8f905bf
feat: Finish up TUI core for v0.1.0 #53
yashranjan1 Jul 28, 2025
0215b74
docs: Update documentation with new features and installation instruc…
maniac-en Jul 28, 2025
65251fe
docs: Update documentation with new features and installation instruc…
yashranjan1 Jul 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI/CD

on:
push:
branches:
- main
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- main
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build-test:
name: Build, Test & Coverage on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.4'

- name: Build
run: go build ./...

- name: Run Tests with Coverage
run: |
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
shell: bash

- name: Upload coverage report
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.out

format:
name: Auto-format with gofmt (Linux only)
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository_owner == github.actor

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.4'

- name: Run gofmt and commit changes if needed
run: |
gofmt -w .
if [ -n "$(git status --porcelain)" ]; then
echo "Code was not formatted. Committing changes..."
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git add .
git commit -m "chore: auto-format Go code via gofmt"
git push
else
echo "Code already properly formatted."
fi
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release on merge of versioned branch into main

on:
pull_request:
types: [closed]
branches:
- main

jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'v')
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Extract version from branch name
run: echo "VERSION=${GITHUB_HEAD_REF}" >> $GITHUB_ENV

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.4'

- name: Build with version
run: go build -ldflags "-X main.Version=${VERSION}" -o req

- name: Tag main with version
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git fetch --unshallow --tags
git tag "${VERSION}"
git push origin "${VERSION}"

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.VERSION }}
files: req
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81 changes: 80 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,82 @@
# req - A terminal API client
# Req - Test APIs with Terminal Velocity

[![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)
![GitHub repo](https://img.shields.io/badge/built%20at-Boot.dev%20Hackathon-blueviolet)

## About

`req` is a lightweight, terminal-based API client built for the
[Boot.dev Hackathon 2025](https://github.com/maniac-en/req?tab=License-1-ov-file).
It features a fast and minimal text user interface and lets you create, send,
and inspect HTTP requests interactively from the command line. It is ideal for
testing APIs without leaving your terminal.

Read more about `req` over here -
[Announcement Blog](https://maniac-en.github.io/req/)

## Installation

### You can install `req` using `go install`:

To install a specific release

```
go install github.com/maniac-en/req@v0.1.0
```

Replace `v0.1.0` with the version you want.

### Requirements

- Go version 1.24.4

## Usage

After installing `req`, you can run it using this command.

```
req
```

## Libraries Used

### Terminal UI (by Charm.sh)

- [bubbletea](https://github.com/charmbracelet/bubbletea) — A powerful, fun TUI
framework for Go
- [bubbles](https://github.com/charmbracelet/bubbles) — Pre-built components for
TUI apps
- [lipgloss](https://github.com/charmbracelet/lipgloss) — Terminal style/layout
DSL

## License

This project is licensed under the
[MIT License](https://github.com/maniac-en/req?tab=License-1-ov-file).

```
1. Mudassir Bilal (mailto:mughalmudassir966@gmail.com)
2. Shivam Mehta (mailto:sm.cse17@gmail.com)
3. Yash Ranjan (mailto:yash.ranjan25@gmail.com)

MIT License

Copyright (c) 2025 Mudassir Bilal, Shivam Mehta, Yash Ranjan

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
Binary file added docs/images/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/req-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 7 additions & 15 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,19 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> req - Terminal API Client </title>
<title> Req - Test APIs with Terminal Velocity </title>
<link href="/req/index.css" rel="stylesheet">

</head>

<body>
<article>
<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
func main() {
fmt.Println("Hello, req!")
}
</pre><h2>Installation</h2><pre>bash
go build -o req .
./req
</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>
- Item one
- Item two
- Item three</p><p><b>Ordered list:</b>
1. First step
2. Second step
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>
<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
go install github.com/maniac-en/req@v0.1.0
req
</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
<b>Installation</b>: <code>go install github.com/maniac-en/req@v0.1.0</code>
<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>
</article>
</body>

Expand Down
25 changes: 0 additions & 25 deletions global/context.go

This file was deleted.

21 changes: 0 additions & 21 deletions global/state.go

This file was deleted.

Loading
Loading