百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
H

highline

> 编程语言
开源

一个更高级别的命令行面向的接口。

1.3K stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个更高级别的命令行面向的接口。

HighLine

Description

Welcome to HighLine.

HighLine was designed to ease the tedious tasks of doing console input and output with low-level methods like gets and puts. HighLine provides a robust system for requesting data from a user, without needing to code all the error checking and validation rules and without needing to convert the typed Strings into what your program really needs. Just tell HighLine what you're after, and let it do all the work.

Documentation

See: Rubydoc.info for HighLine. Specially HighLine and HighLine::Question.

Usage

…

If you want to save some characters, you can inject/import HighLine methods on Kernel by doing the following. Just be sure to avoid name collisions in the top-level namespace.

require 'highline/import'

say "Now you can use #say directly"

For more examples see the examples/ directory of this project.

Requirements

HighLine from version >= 3.0.0 requires ruby >= 3.0.0

Installing

To install HighLine, use the following command:

$ gem install highline

(Add sudo if you're installing under a POSIX system as root)

If you're using Bundler, add this to your Gemfile:

source "https://rubygems.org"
gem 'highline'

And then run:

$ bundle

If you want to build the gem locally, use the following command from the root of the sources:

$ rake package

You can also build and install directly:

$ rake install

Contributing

  1. Open an issue
  • https://github.com/JEG2/highline/issues
  1. Fork the repository
  • https://github.com/JEG2/highline/fork
  1. Clone it locally
  • git clone [email protected]:YOUR-USERNAME/highline.git
  1. Add the main HighLine repository as the upstream remote
  • cd highline # to enter the cloned repository directory.
  • git remote add upstream https://github.com/JEG2/highline
  1. Keep your fork in sync with upstream
  • git fetch upstream
  • git checkout master
  • git merge upstream/master
  1. Create your feature branch
  • git checkout -b your_branch
  1. Hack the source code, run the tests and pronto
  • rake test
  • rake acceptance
  • pronto run

Alternatively, if you're in a Dockerised environment, don't care about installing anything locally -- just run bin/test instead.

  1. Commit your changes
  • git commit -am "Your commit message"
  1. Push it
  • git push
  1. Open a pull request
  • https://github.com/JEG2/highline/pulls

Details on:

  • GitHub Guide to Contributing to Open Source - https://guides.github.com/activities/contributing-to-open-source/
  • GitHub issues - https://guides.github.com/features/issues/
  • Forking - https://help.github.com/articles/fork-a-repo/
  • Cloning - https://help.github.com/articles/cloning-a-repository/
  • Adding upstream - https://help.github.com/articles/configuring-a-remote-for-a-fork/
  • Syncing your fork - https://help.github.com/articles/syncing-a-fork/
  • Branching - https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
  • Commiting - https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
  • Pushing - https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes

The Core HighLine Team

  • James Edward Gray II - Author
  • Gregory Brown - Core contributor
  • Abinoam P. Marques Jr. - Core contributor

For a list of people who have contributed to the codebase, see GitHub's list of contributors.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言