Thank you for your interest in contributing! This document provides guidelines and information for contributors.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/Httli.git cd Httli - Build the project:
go build -o httli ./cmd/httli/main.go
- Create a branch for your feature:
git checkout -b feature/your-feature-name
cmd/ → CLI command definitions (routing, flags)
internal/ → Business logic (NEVER import from outside)
client/ → HTTP execution engine
config/ → Flag parsing, env loading, global config
collections/ → Collection storage (JSON)
history/ → Request history engine
output/ → Terminal output renderer
styles/ → Lipgloss style definitions
docs/ → How-to guides
assets/ → Images and visual assets
go build -o httli ./cmd/httli/main.go# Run a simple request
./httli -u https://jsonplaceholder.typicode.com/posts/1
# Test collection workflow
./httli collection save test/ping -u https://httpbin.org/get
./httli collection run test/ping
./httli collection delete test/ping
# Test history
./httli history- Follow standard Go conventions (
gofmt,go vet) - Keep functions small and focused
- Add comments for exported functions
- Use the existing helper patterns (e.g.,
normalizeName(),exitError())
- Add more status code descriptions in output
- Improve error messages
- Add unit tests for
internal/packages
- Parallel request execution (
--parallel 5) - Interactive TUI mode
- Request chaining (use response from one request in the next)
- OpenAPI/Swagger import
- Response time statistics
- Fix typos or unclear instructions
- Add examples for specific use cases
- Translate documentation
Use clear, descriptive commit messages:
feat: add parallel request execution
fix: handle empty response body gracefully
docs: update environment variable guide
refactor: extract auth logic into helper
- Ensure your code builds cleanly:
go build ./... - Test your changes manually
- Update documentation if you changed behavior
- Open a PR with a clear description of what changed and why
- Link any related issues
This project intentionally avoids external dependencies. Before adding any:
- Consider if the Go standard library can achieve the same goal
- If truly necessary, discuss in an issue first
- Create a new file in
cmd/(e.g.,cmd/mycommand.go) - Define your
Commandstruct withUse,Short,Long, andRun - Register it in an
init()function viaRootCmd.AddCommand() - Add business logic in
internal/
- Add the field to
Configstruct ininternal/config/config.go - Register the flag in
ParseFlags()using the helper functions - Use the flag value in the appropriate execution path
By contributing, you agree that your contributions will be licensed under the MIT License.