https://github.com/bannzai/swifttui
TUI utility framework with Swift.
https://github.com/bannzai/swifttui
Last synced: 4 months ago
JSON representation
TUI utility framework with Swift.
- Host: GitHub
- URL: https://github.com/bannzai/swifttui
- Owner: bannzai
- Created: 2019-09-23T10:34:14.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2020-05-31T13:46:14.000Z (about 6 years ago)
- Last Synced: 2025-04-06T05:00:03.039Z (about 1 year ago)
- Language: C
- Size: 895 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ⚠️ This Project Work In Progress ⚠️
# SwiftTUI
**SwiftTUI** is framework for easily build **TUI** with swift.
## Usage
```swift
import SwiftTUI
struct Main: View {
@State var model = Main.ViewModel
var body: some View {
List(model.items, action: model.selectItem) { item in
Triangle()
VStack(alignment: .leading) {
Text(item.title)
Text(item.subTitle)
.color(.gray)
}
}
}
}
```
## Development
Great helpful stackoverflow exists. reference from https://stackoverflow.com/questions/56251835/swift-package-manager-unable-to-compile-ncurses-installed-through-homebrew.
This section is quoted above stackoverflow links.
#### ncurses version
Required ncurses version is over 6.1. See also [HOW TO INSTALL ncurses on MacOSX](https://gist.github.com/cnruby/960344)
#### Environment
- DEBUG_LOGGER_PATH: SwiftTUI debug log path. e.g) ~/development/SwiftTUI/debug.log.d
- PKG_CONFIG_PATH: your ncurses package config file path. e.g) "/usr/local/opt/ncurses/lib/pkgconfig"
#### Quoted
If you want to generate a Xcode project, use the following command:
```shell
swift package generate-xcodeproj
```
## LICENSE
SwiftTUI is available under the MIT license. See the LICENSE file for more info.