CRIEW
CRIEW is a Rust TUI for Linux kernel patch mail workflows.
CRIEW stands for Code Review in Efficient Workflow.
The repository name stays uppercase as CRIEW, while the crate and CLI use lowercase criew.
It is built for developers who work on mailing-list-driven review, especially in Linux kernel style flows, and want a terminal-first tool that keeps subscription, sync, review, patch application, and reply in one local workflow.

Chinese usage guide: README-zh.md
Status
CRIEW is under active development. The current develop branch already covers the core workflow:
- sync mail from
lore.kernel.org - sync a real IMAP
INBOXthrough the built-inMy Inboxsubscription - browse threads and detect patch series
- apply or export patches through
b4 - compose and send replies from the TUI through
git send-email
Release Baseline
v0.0.1 is the first supported public baseline for CRIEW.
Starting from v0.0.1, the project uses only the CRIEW naming set:
criew, ~/.criew/, criew-config.toml, criew.db, CRIEW_B4_PATH, and CRIEW_IMAP_PROXY.
Earlier Courier-era names are not treated as a supported upgrade path.
If you tested an older pre-release snapshot or an earlier v0.0.1 tag before this rename settled,
refresh your checkout or reinstall the binary and bootstrap a new CRIEW runtime directory.
Features
- Rust CLI with
criew tui,criew sync,criew doctor, andcriew version - local SQLite storage with automatic runtime bootstrap
- incremental lore sync with checkpoint-based updates
- real IMAP
INBOXsync with patch-oriented filtering - background startup sync for enabled subscriptions
- periodic auto-sync for
My Inbox - patch series detection for subjects like
[PATCH vN M/N] - patch apply/export workflow powered by
b4 - undo for the most recent successful apply in the current session
- kernel tree browser with source preview
- inline Vim-like editing and external Vim editing
- reply panel that fills
From,To,Cc,Subject,In-Reply-To, andReferences - real reply delivery through
git send-email - visual config editor, command palette completion, and structured operation logs
Requirements
- Rust stable
- Git
- Python 3
- needed when using the repo-local
vendor/b4/b4.shor the embedded runtime fallback
- needed when using the repo-local
b4- CRIEW resolves it in this order:
[b4].path->CRIEW_B4_PATH->./vendor/b4/b4.sh-> embedded runtime vendor under~/.criew/vendor/b4/b4.sh->b4inPATH
- CRIEW resolves it in this order:
git send-email- only required if you want to send replies
criew doctor checks b4, git send-email, git mail identity, and IMAP connectivity.
Installation
crates.io installation is the recommended path.
Install from crates.io
This build keeps a minimal vendored b4 runtime embedded in the binary.
If [b4].path, CRIEW_B4_PATH, and ./vendor/b4/b4.sh are all unavailable,
CRIEW can materialize that fallback under ~/.criew/vendor/b4/ on first use.
Python 3 is still required for that fallback.
Install from a clone
If you want to use the repo-local ./vendor/b4/b4.sh fallback from a checkout,
clone the repository with submodules:
If you already cloned the repository without submodules:
Install directly from GitHub
In this mode, you should provide b4 through b4.path, CRIEW_B4_PATH, or your system PATH.
If the checkout also includes vendor/b4, CRIEW can use it the same way as a source clone.
Run from source
Quick Start
1. Check your environment
2. Prepare configuration
The default config file is ~/.criew/criew-config.toml, and the default runtime directory is ~/.criew/. CRIEW creates a minimal config file automatically on first run.
See docs/config.example.toml for a complete example.
Typical configuration:
[]
= "io-uring"
[]
= "you@example.com"
= "you@example.com"
= "app-password"
= "imap.example.com"
= 993
= "ssl"
[]
= "/path/to/linux"
Notes:
- relative paths are resolved from the config file directory
[imap]is optional if you only use lore sync- when IMAP config is complete,
My Inboxis enabled by default on first use imap.proxysupportshttp://,socks5://, andsocks5h://- reply identity prefers
git config sendemail.from, then falls back togit config user.nameandgit config user.email ui.startup_syncdefaults totrueui.inbox_auto_sync_interval_secsdefaults to30- Courier-era names such as
~/.courier,courier-config.toml,courier.db,COURIER_B4_PATH, andCOURIER_IMAP_PROXYare intentionally unsupported fromv0.0.1onward
3. Sync mail
Sync a lore mailbox:
Sync a real IMAP inbox:
Use local .eml fixtures for debugging:
4. Start the TUI
Inside the TUI:
:opens the command palettey/nenable or disable the selected subscriptionEnteropens the selected mailbox or threadaapplies the current patch seriesdexports the current patch seriesuundoes the most recent successful apply from the current sessionroreopens the reply panelTabswitches between the mail page and the code browser
When IMAP is configured, My Inbox joins startup sync and continues periodic background sync while the TUI remains open.
Enabled mailing-list subscriptions also keep doing periodic background sync while the TUI remains open so Linux lore and QEMU archive mailboxes keep pulling new mail.
Documentation
- README-zh.md: Chinese usage guide
- docs/config.example.toml: configuration example
- docs/design.md: design notes
- docs/reply-format-spec.md: reply panel and sending format
- docs/mvp-milestones.md: historical milestone record
- docs/reply-mvp-milestones.md: reply workflow evolution
Development
Common development commands:
The repository includes GitHub Actions CI for push and pull_request with the same formatting, lint, and test checks.
Contributing
Issues and pull requests are welcome.
Before sending changes, run:
If you change user-visible behavior, commands, config keys, or workflows, update the relevant documentation in the same change.
License
CRIEW's Rust code is licensed under LGPL-2.1.
Bundled vendored components keep their upstream licenses, including vendor/b4 (GPL-2.0)
and vendor/b4/patatt (MIT-0).