Skip to main content

max / alloy

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
Signed with PGP, not checked
Commit: 67f1b187c5fefb2589917d55db943d46a8bc7c0f
Parent: da3ce56
6 files changed, +81 insertions, -4 deletions
@@ -6,6 +6,8 @@
6 6
7 7 Alloy is licensed under the GNU General Public License v3.0 or later. See [LICENSE](LICENSE). Code contributed to this repository must be compatible with GPLv3+. Any future code outside this license (vendored dependencies, etc.) must carry compatible terms.
8 8
9 + One crate is deliberately exempt: `crates/alloy_tui` is MIT ([its own LICENSE](crates/alloy_tui/LICENSE)), because it is the reusable design system rather than the application. Publishing it permissively lets other terminal UIs adopt Alloy's look without inheriting copyleft, and lets non-GPL siblings link it. Contributions to that crate are MIT; everything else in the repo is GPLv3+.
10 +
9 11 ## Project state
10 12
11 13 Pre-v0. The docs in [`docs/`](docs/) are the project. Code follows. When a design decision changes, edit the relevant doc and let the commit message carry the rationale — no separate changelog.
M Cargo.lock +1 -1
@@ -32,7 +32,7 @@
32 32
33 33 [[package]]
34 34 name = "alloy_tui"
35 - version = "0.0.0"
35 + version = "0.1.0"
36 36 dependencies = [
37 37 "makeover",
38 38 "ratatui",
M README.md +4 -1
@@ -12,7 +12,10 @@
12 12
13 13 ## License
14 14
15 - GPLv3-or-later. See [`LICENSE`](LICENSE) and [`CONTRIBUTING.md`](CONTRIBUTING.md).
15 + GPLv3-or-later, with one exception: the `alloy_tui` crate is MIT, so other
16 + projects can build terminal UIs on the design system without taking on
17 + copyleft. See [`LICENSE`](LICENSE), [`crates/alloy_tui/LICENSE`](crates/alloy_tui/LICENSE),
18 + and [`CONTRIBUTING.md`](CONTRIBUTING.md).
16 19
17 20 ## Docs
18 21
@@ -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
@@ -1,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.
@@ -1,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.