Introduction
Termline is a lightweight Ruby library for producing structured, readable terminal output.
It provides semantic messages, colors, icons, metadata, lists, tables, and separators through a small public API used throughout the Lesli ecosystem.
Features
- Semantic info, success, warning, and danger messages
- Colored output with icons and timestamps
- Structured key-value metadata
- Lists and tabular output
- Reusable line and spacing helpers
- No application framework required
Installation
Add Termline to the application:
bundle add termlineUsage
Messages
require "termline"
Termline.msg "Hello world"
Termline.info "Server started"
Termline.success "All tests passed"
Termline.warning "Low disk space"
Termline.danger "Something failed"Attach structured metadata using keyword arguments:
Termline.success "Compiled application.tailwind.css", size: "1.4 KB"
Termline.info "Connected", adapter: "postgres", duration: "12ms"Lists and tables
Termline.list("Rails", "Lesli", "Tailwind")
Termline.table([
{ name: "Luis", role: "Admin", status: "Active" },
{ name: "Ana", role: "Developer", status: "Pending" }
])Spacing and separators
Termline.br
Termline.br(2)
Termline.lineDevelopment
Clone the repository and install its dependencies:
git clone https://github.com/LesliTech/Termline.git
cd Termline
bundle installTo use local source from a Lesli development workspace, reference it from the host application's Gemfile:
gem "termline", path: "gems/Termline"Tests
Run the default test task from the Termline directory:
bundle exec rakeDocumentation
Community
License
Copyright (c) 2026, Lesli Technologies, S. A.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
The complete license text is available in the license file.
