Skip to main content

max / alloy_tui

Relicense alloy_tui as MIT and prepare it for crates.io The crate inherited the workspace's GPLv3-or-later, which cannot be linked from the PolyForm Noncommercial apps: GPL section 7 forbids the added noncommercial restriction, so the combined work is undistributable under either license. That blocked got, GoingsOn's terminal client, from taking alloy_tui as a published dependency instead of a path into this checkout. Carve the crate out as MIT. It is the reusable design system, not the application; alloy itself stays GPLv3-or-later. Add its own LICENSE and a README, and set a real version.
Author: Max Johnson <me@maxj.phd> · 2026-07-19 20:29 UTC
Commit: be54982fade3b36df8f025f0cf3152d6f013376d
Parent: 162fc4d
3 files changed, +74 insertions, -2 deletions
M Cargo.toml +2 -2
@@ -1,10 +1,10 @@
1 1 [package]
2 2 name = "alloy_tui"
3 - version = "0.0.0"
3 + version = "0.1.0"
4 4 description = "Alloy design system: makeover intents rendered as ratatui Color/Style, plus themed widgets for the alloy console and siblings."
5 5 edition.workspace = true
6 6 rust-version.workspace = true
7 - license.workspace = true
7 + license = "MIT"
8 8 repository.workspace = true
9 9 authors.workspace = true
10 10
A LICENSE +21
@@ -0,0 +1,21 @@
1 + MIT License
2 +
3 + Copyright (c) 2026 Make Creative, LLC
4 +
5 + Permission is hereby granted, free of charge, to any person obtaining a copy
6 + of this software and associated documentation files (the "Software"), to deal
7 + in the Software without restriction, including without limitation the rights
8 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 + copies of the Software, and to permit persons to whom the Software is
10 + furnished to do so, subject to the following conditions:
11 +
12 + The above copyright notice and this permission notice shall be included in all
13 + copies or substantial portions of the Software.
14 +
15 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 + SOFTWARE.
A README.md +51
@@ -0,0 +1,51 @@
1 + # alloy_tui
2 +
3 + Alloy's design system for [ratatui](https://ratatui.rs): themed widgets, a
4 + reserved keymap, and a focus ring, driven by
5 + [makeover](https://crates.io/crates/makeover) themes.
6 +
7 + Extracted from the Alloy console so other terminal UIs can share one look
8 + rather than each re-deriving colors from a palette.
9 +
10 + ## What it gives you
11 +
12 + - **`Theme`** — a makeover `.toml` theme resolved into ratatui `Color`/`Style`.
13 + Two Alloy-specific tokens (`border-subtle`, `border-strong`) are derived
14 + locally so theme files stay minimal and cross-app compatible.
15 + - **Widgets** — `AlloyBlock`, `AlloyList`, `AlloyTabs`, `AlloyStatusBar`,
16 + `AlloyModal`, `AlloyLog`, each taking a `&Theme`.
17 + - **`keys`** — the reserved keymap every Alloy TUI agrees on, so the same keys
18 + mean the same thing across tools.
19 + - **`focus`** — a focus ring, the piece ratatui deliberately leaves to the app.
20 +
21 + ## Color is information
22 +
23 + Chrome is tinted greyscale. Accent color lives on text, carried by `Severity`,
24 + so a colored thing on screen means something rather than decorating. Widgets
25 + enforce this; you get it by using them.
26 +
27 + ## Usage
28 +
29 + ```rust
30 + use alloy_tui::{AlloyStatusBar, Theme, hint};
31 +
32 + // Resolve a makeover theme into ratatui colors.
33 + let dirs = vec![(makeover::bundled_themes_dir().unwrap(), false)];
34 + let colors = makeover::load_theme(&dirs, "akari-night").unwrap();
35 + let theme = Theme::from_theme(&colors).unwrap();
36 +
37 + // Widgets take &Theme.
38 + let footer = AlloyStatusBar::new(&theme, [hint("Tab", "focus"), hint("q", "quit")]);
39 + ```
40 +
41 + There is deliberately no built-in fallback palette. A missing or malformed
42 + theme is an error you surface, not something papered over by rendering in
43 + colors that exist nowhere in the theme files.
44 +
45 + ## License
46 +
47 + MIT.
48 +
49 + The rest of the [Alloy](https://git.sr.ht/~maxmj/alloy) repository is
50 + GPLv3-or-later. This crate is permissive on purpose: it is the reusable design
51 + system, not the application.