Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ clojure -M -m examples.file-browser

## Running Tests via REPL

See [ADR 003: Testing Strategy](docs/adr/003-testing-strategy.md) for the full decision record.
See [ADR 003: Testing Strategy](doc/adr/003-testing-strategy.md) for the full decision record.

## Three-Tier Testing Strategy

Expand Down
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# charm.clj

![Status](https://img.shields.io/badge/status-alpha-orange)
![Status](https://img.shields.io/badge/status-beta-blue)
[![Clojars Project](https://img.shields.io/clojars/v/de.timokramer/charm.clj.svg)](https://clojars.org/de.timokramer/charm.clj)
[![GitHub tag](https://img.shields.io/github/v/tag/TimoKramer/charm.clj?label=git%20tag)](https://github.com/TimoKramer/charm.clj/tags)

A Clojure TUI (Terminal User Interface) library inspired by [Bubble Tea](https://github.com/charmbracelet/bubbletea).

Expand All @@ -10,44 +11,47 @@ on the JVM, as a native-image binary or on [babashka](https://babashka.org).

## Status

This library is vibecoded and very early. It works for the examples but please let me know if you encounter any
issues. I am planning to use it for something more sophisticated. Please expect breaking changes.
This library is in beta. The API is stabilizing but breaking changes may still occur. Please let me know if you
encounter any issues.

## Features

- **Elm Architecture** - Simple init/update/view pattern for predictable state management
- **UI Components** - Spinner, text-input, list, paginator, timer, progress, help
- **UI Components** - Spinner, text-input, list, paginator, timer, progress, help, viewport, table
- **Styling** - Colors (ANSI, 256, true color), borders, padding, alignment
- **Input handling** - Keyboard and mouse events with modifier support
- **Efficient rendering** - Line diffing for minimal terminal updates
- **core.async** - Asynchronous command execution

## Documentation

- **[Getting Started](docs/guides/getting-started.md)** - Build your first app
- **[Components](docs/components/overview.md)** - UI component reference
- [spinner](docs/components/spinner.md), [text-input](docs/components/text-input.md), [list](docs/components/list.md), [paginator](docs/components/paginator.md), [timer](docs/components/timer.md), [progress](docs/components/progress.md), [help](docs/components/help.md)
- **[Getting Started](doc/guides/getting-started.md)** - Build your first app
- **[Components](doc/components/overview.md)** - UI component reference
- [spinner](doc/components/spinner.md), [text-input](doc/components/text-input.md), [list](doc/components/list.md), [paginator](doc/components/paginator.md), [timer](doc/components/timer.md), [progress](doc/components/progress.md), [help](doc/components/help.md)
- **API Reference**
- [Program](docs/api/program.md) - run, cmd, batch, quit-cmd
- [Messages](docs/api/messages.md) - key-press, mouse, window-size
- [Styling](docs/api/styling.md) - style, render, colors, borders
- [Layout](docs/api/layout.md) - join-horizontal, join-vertical
- [Program](doc/api/program.md) - run, cmd, batch, quit-cmd
- [Messages](doc/api/messages.md) - key-press, mouse, window-size
- [Styling](doc/api/styling.md) - style, render, colors, borders
- [Layout](doc/api/layout.md) - join-horizontal, join-vertical
- **Guides**
- [Component Composition](docs/guides/component-composition.md)
- [Styling Patterns](docs/guides/styling-patterns.md)
- **[Examples](docs/examples/README.md)** - Runnable demo applications
- [Component Composition](doc/guides/component-composition.md)
- [Styling Patterns](doc/guides/styling-patterns.md)
- **[Examples](doc/examples/README.md)** - Runnable demo applications

## Installation

Add to your `deps.edn`:
Add to your `deps.edn`. Click the badges to find the latest version and git tag:

[![Clojars](https://img.shields.io/clojars/v/de.timokramer/charm.clj.svg)](https://clojars.org/de.timokramer/charm.clj)

via github
```clojure
{:deps {io.github.timokramer/charm.clj {:git/tag "v0.1.64" :git/sha "e5120a9"}}}
{:deps {de.timokramer/charm.clj {:mvn/version "VERSION"}}}
```
or via clojars maven repository

[![GitHub tag](https://img.shields.io/github/v/tag/TimoKramer/charm.clj)](https://github.com/TimoKramer/charm.clj/tags)

```clojure
{:deps {de.timokramer/charm.clj {:mvn/version "0.1.64"}}}
{:deps {io.github.timokramer/charm.clj {:git/tag "TAG" :git/sha "SHA"}}}
```


Expand Down Expand Up @@ -175,7 +179,7 @@ program/quit-cmd

## Examples

Please take a look at the [examples](docs/examples/README.md) in the docs folder and don't hesitate to contribute your examples please.
Please take a look at the [examples](doc/examples/README.md) in the doc folder and don't hesitate to contribute your examples please.

## Project Structure

Expand Down
2 changes: 1 addition & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[deps-deploy.deps-deploy :as dd]))

(def lib 'de.timokramer/charm.clj)
(def version "0.1.")
(def version "0.2.")
(def class-dir "target/classes")

(defn- version-str []
Expand Down
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
cider/cider-nrepl {:mvn/version "0.58.0"}}
:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}

:examples {:extra-paths ["docs"]}
:examples {:extra-paths ["doc"]}

:user {:extra-paths ["user"]}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ADR 006: Grapheme Cluster Width via JLine 4 Mode 2027
# ADR 007: Grapheme Cluster Width via JLine 4 Mode 2027

## Status

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions doc/cljdoc.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{:cljdoc.doc/tree
[["Getting Started" {:file "doc/guides/getting-started.md"}]
["Components" {:file "doc/components/overview.md"}
["Spinner" {:file "doc/components/spinner.md"}]
["Text Input" {:file "doc/components/text-input.md"}]
["List" {:file "doc/components/list.md"}]
["Paginator" {:file "doc/components/paginator.md"}]
["Timer" {:file "doc/components/timer.md"}]
["Progress" {:file "doc/components/progress.md"}]
["Help" {:file "doc/components/help.md"}]]
["API Reference" {}
["Program" {:file "doc/api/program.md"}]
["Messages" {:file "doc/api/messages.md"}]
["Styling" {:file "doc/api/styling.md"}]
["Layout" {:file "doc/api/layout.md"}]]
["Guides" {}
["Component Composition" {:file "doc/guides/component-composition.md"}]
["Styling Patterns" {:file "doc/guides/styling-patterns.md"}]]
["Examples" {:file "doc/examples/README.md"}]
["Architecture Decision Records" {}
["ADR 001: BreakIterator ICU4J vs JDK" {:file "doc/adr/001-breakiterator-icu4j-vs-jdk.md"}]
["ADR 002: JLine FFM vs JNI" {:file "doc/adr/002-jline-ffm-vs-jni.md"}]
["ADR 003: Testing Strategy" {:file "doc/adr/003-testing-strategy.md"}]
["ADR 004: JLine Input API Choices" {:file "doc/adr/004-jline-input-api-choices.md"}]
["ADR 005: Layout Primitives" {:file "doc/adr/005-layout-primitives.md"}]
["ADR 006: Remove charm.core Facade" {:file "doc/adr/006-remove-charm-core-facade.md"}]
["ADR 007: Grapheme Cluster Width" {:file "doc/adr/007-grapheme-cluster-width.md"}]]]}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/examples/build.clj → doc/examples/build.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns build
"Build script for timer CLI app.

Usage (from docs/examples directory):
Usage (from doc/examples directory):
clj -T:build clean
clj -T:build uber
clj -T:build all ; clean + uber"
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
All sections are shown at once. Typing filters inline, showing only
matching functions. Enter opens an overlay with documentation.

Run: cd docs/examples && clj -M -m examples.cheatsheet"
Run: cd doc/examples && clj -M -m examples.cheatsheet"
(:require
[charm.ansi.width :as ansi-width]
[charm.components.help :as help]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

This file was deleted.

Loading
Loading