term_app
Version, currently 0.1.12 versions
- 0.1.2latestApr 12, 2020
- 0.1.1not indexedApr 12, 2020
github.com/docelic/term_app
Functional term/console app environment
6 stars
0 dependents
License: MIT
Nothing has been indexed for 0.1.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
term_app:
github: docelic/term_app
version: ~> 0.1.1Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.1. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
[](https://travis-ci.com/crystallabs/term_app)
[](https://github.com/crystallabs/term_app/releases/latest)
[](https://github.com/crystallabs/term_app/blob/master/LICENSE)
# Term_app
Term_app is a minimal functional term/console app environment for Crystal.
It is closely related to shards [Terminfo](https://github.com/crystallabs/terminfo) and
[Tput](https://github.com/crystallabs/tput):
Terminfo parses terminfo files into instances of `Terminfo::Data` or custom classes.
Tput uses Terminfo data and additional methods to configure itself for outputting correct terminal sequences.
Term_app uses Tput and implements a completely usable term/console environment.
It sets up event handlers, keys and mouse listeners, and everything else needed to
provide a minimal working application.
It is implemented natively and does not depend on ncurses or other external library.
## Installation
Add the dependency to `shard.yml`:
```yaml
dependencies:
term_app:
github: crystallabs/term_app
version: 0.1.2
```
## Usage in a nutshell
Here is a basic example that starts the application, waits for keypresses or
pasted data, prints the received content, and then sets the cursor at screen
position x = 10, y = 10:
```crystal
require "term_app"
my = TermApp::Data.new
my.input.on(TermApp::DataEvent) { |e|
my.tput.print e.data[...e.len]
my.tput.sety 10
my.tput.setx 10
}
sleep 10
```
## API documentation
Run `crystal docs` as usual, then open file `docs/index.html`.
Also, see examples in the directory `examples/`.
## Testing
Run `crystal spec` as usual.
Also, see examples in the directory `examples/`.
## Thanks
* All the fine folks on FreeNode IRC channel #crystal-lang and on Crystal's Gitter channel https://gitter.im/crystal-lang/crystal
## Other projects
List of interesting or similar projects in no particular order:
- https://github.com/crystallabs/crysterm - Complete term/console toolkit for Crystal
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.1- Tagged
- Apr 12, 2020
- Commit
23827e3822ee- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/docelic/term_app
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 2