A modern, professional web tool for converting multi-line commands and text into clean, single-line format. Perfect for developers working with SQL queries, curl commands, shell scripts, and any multi-line text that needs to be converted to one-liners.
๐ Try it live: https://catsmice.github.io/oneliner/
Convert a single multi-line command to a clean one-liner with instant preview
Input multiple commands separated by numbers or blank lines
Each command gets its own one-liner output with individual copy buttons
- Single Command Mode: Convert one multi-line text block to a single line
- Multiple Commands Mode: Process multiple commands at once with intelligent splitting
- Automatically detects numbered commands (1. 2. 3. ...)
- Splits by double line breaks
- Recognizes common command prefixes (curl, psql, git, docker, etc.)
- โ Preserve Spaces: Keep single spaces between joined lines
- โ Trim Whitespace: Remove leading/trailing spaces from each line
- โ๏ธ Remove Comments: Strip SQL-style comments (-- and /* */)
- โ๏ธ Compact Spaces: Replace multiple spaces with single space
- ๐ Dark/Light Theme: Toggle between themes with persistent preference
- ๐ Real-time Statistics: Track lines, words, size reduction, and command count
- ๐ Smart Copy Functions: Copy individual commands or all at once
- โจ๏ธ Keyboard Shortcuts: Ctrl+Enter to copy, Ctrl+Shift+Delete to clear
- ๐ฑ Responsive Design: Works perfectly on desktop and mobile
- Real-time conversion as you type
- Visual feedback with animations
- Toast notifications for actions
- Processing indicators
- Monospace font for code readability
-- Input:
SELECT *
FROM users
WHERE age > 18
AND status = 'active'
-- Output:
SELECT * FROM users WHERE age > 18 AND status = 'active'# Input:
curl -X POST \
http://localhost:3000/api/users \
-H "Content-Type: application/json" \
-d '{"name": "John", "age": 30}'
# Output:
curl -X POST http://localhost:3000/api/users -H "Content-Type: application/json" -d '{"name": "John", "age": 30}'Perfect for processing lists of commands like:
- Database repair commands
- API testing sequences
- Deployment scripts
- Monitoring checks
Visit the live demo: https://catsmice.github.io/oneliner
# Clone the repository
git clone https://github.com/catsmice/oneliner.git
# Navigate to the project directory
cd oneliner
# Open index.html in your browser
open index.html # macOS
start index.html # Windows
xdg-open index.html # LinuxThat's it! No build process or dependencies required.
- Paste your multi-line text in the input area
- See the real-time conversion in the output area
- Adjust conversion options as needed
- Click "Copy to Clipboard" or press Ctrl+Enter
- Click "Multiple Commands" toggle
- Paste multiple commands (numbered or separated by blank lines)
- Each command gets its own one-liner output
- Copy individual commands or use "Copy All Commands"
Ctrl/Cmd + Enter: Copy result(s) to clipboardCtrl/Cmd + Shift + Delete: Clear all content
Input:
1. First, repair the GeneratedPost back-references:
curl -X POST http://localhost:3000/api/debug/repair-backlinks | jq '{success:
.success, repaired: .data.summary.backLinksRepaired, processed:
.data.summary.socialPostsProcessed}'
2. Verify the repair worked with psql:
psql "$DATABASE_URL" -c "SELECT COUNT(*) as empty_postid_count FROM
\"GeneratedPost\" WHERE \"postId\" IS NULL OR \"postId\" = '';"
Output:
Command 1: curl -X POST http://localhost:3000/api/debug/repair-backlinks | jq '{success: .success, repaired: .data.summary.backLinksRepaired, processed: .data.summary.socialPostsProcessed}'
Command 2: psql "$DATABASE_URL" -c "SELECT COUNT(*) as empty_postid_count FROM \"GeneratedPost\" WHERE \"postId\" IS NULL OR \"postId\" = '';"
- Framework: Pure HTML5, CSS3, and Vanilla JavaScript
- No Dependencies: Works without any external libraries
- File Size: < 50KB total
- Browser Support: All modern browsers (Chrome, Firefox, Safari, Edge)
- Mobile Support: Fully responsive design
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Clone your fork:
git clone https://github.com/yourusername/oneliner.git - Create a feature branch:
git checkout -b feature-name - Make your changes and test them
- Commit your changes:
git commit -m "Add some feature" - Push to the branch:
git push origin feature-name - Submit a pull request
- Use GitHub Issues for bug reports and feature requests
- Provide clear steps to reproduce bugs
- Include browser version and operating system
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the need for quick command formatting in development workflows
- Built with modern web standards and accessibility in mind
- Design inspired by contemporary developer tools
Made with โค๏ธ for developers who value clean, efficient code