A fast, simple, and powerful HTTP client for your terminal - like Postman, but in CLI with AI API support
Flash is a beautiful, terminal-based HTTP client that brings the power of API testing to your command line. Built with C and libcurl, it offers a clean Gruvbox-themed interface that's easy on the eyes and powerful in functionality. Now with integrated AI API support for Claude, GPT, Gemini, and more!
- π GET Requests - Fetch data from any REST API with auto-generated code snippets
- π€ POST Requests - Send form data and JSON payloads with multi-line support
- π€ AI API Integration - Direct API calls to Claude, GPT, Gemini, Groq, Cohere, and Mistral
- π Code Generation - Auto-generate request code in JavaScript, Node.js, Python, C#, and Java
- π Smart Clipboard - Copy generated code directly to clipboard (supports xclip, xsel, wl-copy, pbcopy)
- π¨ Beautiful UI - Gruvbox dark theme with intuitive navigation
- β‘ Fast & Lightweight - Built in C for maximum performance
- π Auto-Updates - Built-in self-update mechanism from GitHub releases
- π‘οΈ Memory Safe - Proper memory management and error handling
- π± Cross-Platform - Works on Linux, macOS, and Termux
Clean and intuitive main interface with AI API option
Easy content-type selection for POST requests
Integrated AI API support with auto-detection for major providers
Download the latest release for Linux:
# Download the latest release
wget https://github.com/aadityansha06/Flash-Http-cli/releases/latest/download/flash-linux-x64
# Make it executable
chmod +x flash-linux-x64
# Run Flash
./flash-linux-x64- GCC compiler
- libcurl development libraries
- Make (optional)
sudo apt update
sudo apt install build-essential libcurl4-openssl-dev
# Optional: Install clipboard tools for code copying
sudo apt install xclip# CentOS/RHEL
sudo yum install gcc libcurl-devel
# Fedora
sudo dnf install gcc libcurl-devel xclip# Using Homebrew
brew install curl
# pbcopy is pre-installed on macOS# Clone the repository
git clone https://github.com/aadityansha06/Flash-Http-cli.git
cd Flash-Http-cli
# Build using make
make
# Or compile manually
gcc Flash-cli.c -o flash -lcurl
# Run
./flash# Install dependencies
pkg update && pkg upgrade
pkg install clang curl
# Clone the repository
git clone https://github.com/aadityansha06/Flash-Http-cli.git
cd Flash-Http-cli
# Compile
clang Flash-cli.c -o flash -lcurl
# Run
./flashNote: You may see warnings about getchar() return values or empty-body while loops during compilation. These warnings are safe to ignore β the program will still run fine.
- Select option
1from the main menu - Enter the URL (e.g.,
https://jsonplaceholder.typicode.com/posts/1) - View the formatted response
- New! Generate code snippets in your preferred language:
- JavaScript (Fetch API)
- Node.js (Axios)
- Python (Requests)
- C# (HttpClient)
- Java (HttpURLConnection)
- Select option
2from the main menu - Choose
1for Form Data - Enter the number of fields
- Enter each field in format:
key=value - Enter the target URL
- Send the request and optionally generate code snippets
Example:
Number of fields: 3
Field 1: name=John Doe
Field 2: email=john@example.com
Field 3: age=25
- Select option
2from the main menu - Choose
2for JSON Data - Enter JSON data line by line
- Press Enter twice to finish input
- Enter the target URL
- Send the request and optionally generate code snippets
Example:
{
"name": "Flash User",
"email": "user@example.com",
"active": true
}- Select option
3from the main menu - Enter the API endpoint URL
- Enter the model name (e.g.,
claude-3-5-sonnet-20241022,gpt-4,gemini-pro) - Enter your API key (input is hidden for security)
- Set temperature (0-1, default 0.5)
- Enter your message/prompt
- View the AI response
Supported AI Providers:
- Anthropic Claude - Auto-detects
anthropic.comURLs - OpenAI GPT - Auto-detects
openai.comURLs - Google Gemini - Auto-detects
generativelanguage.googleapis.comURLs - Groq - Auto-detects
groq.comURLs - Cohere - Auto-detects
cohere.aiURLs - Mistral - Auto-detects
mistral.aiURLs - Custom APIs - Falls back to Bearer token authentication
# GET request to fetch user data
URL: https://jsonplaceholder.typicode.com/users/1
# POST form data to create a user
Number of fields: 3
Field 1: name=Flash User
Field 2: email=flash@example.com
Field 3: phone=1234567890
URL: https://httpbin.org/post
# POST JSON data
{
"title": "Flash HTTP CLI",
"body": "A powerful terminal HTTP client",
"userId": 1
}
URL: https://jsonplaceholder.typicode.com/postsURL: https://api.anthropic.com/v1/messages
Model: claude-3-5-sonnet-20241022
API Key: sk-ant-api03-...
Temperature: 0.7
Message: Write a hello world program in PythonURL: https://api.openai.com/v1/chat/completions
Model: gpt-4
API Key: sk-...
Temperature: 0.5
Message: Explain quantum computing in simple termsURL: https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent
Model: gemini-pro
API Key: AIza...
Temperature: 0.8
Message: Generate a creative story about a robotFlash uses the Gruvbox Dark color scheme for a comfortable terminal experience:
- π€ Background: Dark, easy on the eyes
- π¨ Highlights: Warm yellows and oranges
- π© Success: Bright green indicators
- π₯ Errors: Clear red error messages
- π΅ Info: Cool blue accents
- πͺ Special: Purple for AI features
Flash includes a built-in auto-update mechanism:
- Checks GitHub releases on startup
- Compares current version with latest release
- Prompts for update if new version available
- Downloads and installs updates automatically
- Backs up current version before updating
To skip update checks, set:
export FLASH_SKIP_UPDATE=1After making GET or POST requests, Flash can generate production-ready code snippets:
Supported Languages:
- JavaScript - Modern Fetch API with error handling
- Node.js - Axios with promises
- Python - Requests library
- C# - HttpClient with async/await
- Java - HttpURLConnection with proper resource management
Flash automatically detects and uses available clipboard tools:
- Linux: xclip, xsel, wl-copy (Wayland)
- macOS: pbcopy (built-in)
- Fallback: Saves to
flash_snippet.txtif no clipboard tool found
Flash includes automatic JSON escaping to prevent injection:
- Escapes quotes, backslashes, newlines
- Handles special characters properly
- Validates JSON structure
Form data is automatically URL-encoded:
# Spaces become +
name=John Doe β name=John+Doe
# Special characters use % encoding
email=user@domain.com β email=user%40domain.comContributions are welcome! Here's how you can help:
- π΄ Fork the repository
- πΏ Create a feature branch (
git checkout -b feature/amazing-feature) - πΎ Commit your changes (
git commit -m 'Add amazing feature') - π Push to the branch (
git push origin feature/amazing-feature) - π― Open a Pull Request
git clone https://github.com/aadityansha06/Flash-Http-cli.git
cd Flash-Http-cli
# Install development dependencies
sudo apt install build-essential libcurl4-openssl-dev
# Build with debug symbols
gcc -g -Wall -o flash-dev Flash-cli.c -lcurl
# Test
./flash-devThanks to everyone who has contributed to Flash HTTP CLI! π
- @aadityansha06 - Creator & Maintainer
- @dexter-xD - Enhanced JSON input with multi-line support and improved UI alignment (#6)
- @sakshamg567 - Improved form-data input handling (#2)
Want to contribute? Check out our open issues or raise a PR! π
Flash-Http-cli/
βββ Flash-cli.c # Main source code
βββ lib/
β βββ header-file.h # Color definitions and includes
βββ version.h # Version information
βββ Makefile # Build configuration
βββ README.md # This file
βββ LICENSE # MIT License
βββ screenshots/ # UI screenshots
- Windows support requires WSL or manual libcurl setup
- Very large responses (>1GB) may cause memory issues
- Clipboard functionality requires additional packages on some systems
- GET requests with response display
- POST requests (form-data and JSON)
- Code snippet generation (5 languages)
- AI API integration
- Auto-update system
- Smart clipboard support
- Custom headers management
- Request/Response history
- Configuration file support
- Response syntax highlighting
- Request templates
- Environment variables support
- API authentication presets
- Response filtering and parsing
- API keys are hidden during input (terminal echo disabled)
- No sensitive data is logged or stored
- Memory is properly freed after use
- Input validation for all user data
- JSON escaping prevents injection attacks
This project is licensed under the MIT License - see the LICENSE file for details.
- Linux/macOS/Termux
- 1 MB free disk space
- libcurl 7.x or higher
- Linux/macOS with clipboard tools installed
- 10 MB free disk space for updates
- Modern terminal with UTF-8 support
- Internet connection for API requests
Error: curl/curl.h not found
# Ubuntu/Debian
sudo apt install libcurl4-openssl-dev
# CentOS/RHEL
sudo yum install libcurl-devel
# macOS
brew install curlError: undefined reference to curl_easy_init
# Make sure to link with -lcurl flag
gcc Flash-cli.c -o flash -lcurlClipboard not working
# Install clipboard tool
sudo apt install xclip # or xsel, wl-clipboardUpdate check fails
# Skip update checks
export FLASH_SKIP_UPDATE=1
./flashAPI request fails
- Verify your API key is correct
- Check your internet connection
- Ensure the API endpoint URL is accurate
- Verify the model name matches your API provider
- π§ Open an issue on GitHub
- π¬ Start a discussion in the repository
- π Report bugs with detailed reproduction steps
- libcurl - The fantastic HTTP library powering Flash
- Gruvbox - The beautiful color scheme
- Inspired by Postman - The API development platform
- Thanks to all AI providers for their amazing APIs
Aadityansh
- GitHub: @aadityansha06
- Project Link: https://github.com/aadityansha06/Flash-Http-cli
β‘ Flash HTTP CLI - Fast, Simple, Powerful β‘
Made with β€οΈ using C and libcurl