Skip to content

Commit 1cebdaa

Browse files
docs(Maintain): condense README to benefit-focused copy
Replace verbose technical documentation with concise, developer value propositions. Remove 150+ lines of detailed feature lists, architecture diagrams, usage examples, and installation instructions. Distill to problem/solution opening, three key benefits, and brief ecosystem/context sections. Aligns with broader docs initiative to lead with outcomes rather than specifications.
1 parent 3a24011 commit 1cebdaa

1 file changed

Lines changed: 23 additions & 253 deletions

File tree

README.md

Lines changed: 23 additions & 253 deletions
Original file line numberDiff line numberDiff line change
@@ -37,139 +37,36 @@ Land
3737
</tr>
3838
</table>
3939

40+
4041
---
4142

42-
# **Maintain** 💪🏻
43+
# **Maintain**&#x2001;💪🏻
44+
45+
> **Build pipelines that change behavior based on environment variables, implicit tool versions, or undeclared dependencies make debugging production issues impossible. The same commit produces different output on different machines.**
4346
44-
The Build System & CI/CD Toolkit for Land 🏞️
47+
_"Deterministic builds. Same commit, same output, guaranteed."_
4548

4649
[![License: CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](https://github.com/CodeEditorLand/Maintain/tree/Current/LICENSE)
4750
[![Crates.io](https://img.shields.io/crates/v/Maintain.svg)](https://crates.io/crates/Maintain)
4851
[![Rust Version](https://img.shields.io/badge/Rust-1.75+-orange.svg)](https://www.rust-lang.org/)
4952
[![Rhai Version](https://img.shields.io/badge/Rhai-latest-blue.svg)](https://rhai.rs/)
5053

51-
**Maintain** is the Rust-based build system and CI/CD toolkit for the **Land
52-
Code Editor** ecosystem. It provides build orchestration, Rhai scripting, and
53-
configuration management for TOML and JSON5 files.
54-
55-
**What Maintain gives you:**
56-
57-
1. **One command to build everything.** `cargo run --bin Maintain -- --profile
58-
debug-mountain` builds the entire editor with the right flags.
59-
2. **Scriptable build logic.** Rhai scripts define custom build steps. Change
60-
the build pipeline without recompiling the orchestrator.
61-
3. **Type-safe config editing.** Programmatic TOML and JSON5 editing for
62-
Cargo.toml, tauri.conf.json, and package.json. No string manipulation.
63-
4. **Named build profiles.** `--list-profiles` shows all available
64-
configurations. `--profile release-universal` builds a macOS universal binary.
54+
Maintain builds the entire Land ecosystem with Rhai scripting for flexible build logic, compile-time validated TOML and JSON5 configurations, and deterministic artifact generation. GritQL queries handle automated refactoring across the codebase. The same commit always produces the same output across all machines.
6555

6656
📖 **[Rust API Documentation](https://Rust.Documentation.Maintain.Editor.Land/)**
6757

6858
---
6959

70-
## Key Features 🔐
71-
72-
- **Rhai Scripting Engine:** Embedded Rhai interpreter for flexible build
73-
configuration and custom automation logic.
74-
- **Configuration Editing:** Type-safe TOML and JSON5 editing for Cargo.toml and
75-
other configuration files with validation.
76-
- **Environment Resolution:** Dynamic environment variable handling with
77-
scriptable resolvers for build-time configuration.
78-
- **CLI Interface:** Comprehensive command-line interface with subcommands for
79-
build, debug, release, and profile operations.
80-
- **Build Orchestration:** Central coordination of multi-stage builds across the
81-
Land ecosystem.
82-
83-
---
84-
85-
## Core Architecture Principles 🏗️
86-
87-
| Principle | Description | Key Components Involved |
88-
| :------------------------ | :---------------------------------------------------------------------------------------- | :--------------------------------------- |
89-
| **Scriptability** | Enable flexible build logic through embedded Rhai scripting with full environment access. | `Rhai/ConfigLoader`, `Rhai/ScriptRunner` |
90-
| **Type Safety** | Provide compile-time checked configuration access with validation for TOML/JSON5. | `toml_edit`, `json5` crates |
91-
| **Modularity** | Separate concerns between CLI, scripting, and configuration editing components. | `CLI.rs`, `Rhai/`, `Build/*` |
92-
| **Environment Awareness** | Dynamic resolution of environment variables for flexible build configurations. | `EnvironmentResolver.rs` |
93-
94-
---
95-
96-
## `Maintain` in the Land Ecosystem 💪🏻 + 🏞️
60+
## What It Does&#x2001;🔐
9761

98-
| Component | Role & Key Responsibilities |
99-
| :------------------------ | :----------------------------------------------------------- |
100-
| **Build Orchestrator** | Central coordination of builds across all Land elements. |
101-
| **Scripting Host** | Rhai engine for custom build logic and automation. |
102-
| **Configuration Manager** | TOML/JSON5 editing for Cargo.toml and project configuration. |
103-
| **CLI Provider** | Command-line interface for developers and CI/CD pipelines. |
62+
- **Rhai scripting.** Flexible build logic without shell script fragility.
63+
- **Deterministic output.** Same commit, same artifacts, across all machines and CI environments.
64+
- **GritQL refactoring.** Automated codebase-wide refactoring with structural pattern matching.
65+
- **Compile-time config.** TOML and JSON5 configurations validated at build time.
10466

10567
---
10668

107-
## Getting Started 🚀
108-
109-
### Installation 📥
110-
111-
To add `Maintain` to your project:
112-
113-
```toml
114-
[dependencies]
115-
Maintain = { git = "https://github.com/CodeEditorLand/Maintain.git", branch = "Current" }
116-
```
117-
118-
Or install the CLI:
119-
120-
```sh
121-
cargo install Maintain
122-
```
123-
124-
**Key Dependencies:**
125-
126-
- `rhai`: Embedded scripting engine
127-
- `clap`: CLI argument parsing
128-
- `toml_edit`: TOML parsing and editing
129-
- `json5`: JSON5 configuration support
130-
- `chrono`: Date/time handling
131-
- `colored`: Colored terminal output
132-
133-
### Usage Pattern 🚀
134-
135-
`Maintain` is typically invoked through shell scripts:
136-
137-
```sh
138-
# Debug build
139-
./Maintain/Debug.sh
140-
141-
# Development mode for Mountain
142-
./Maintain/Dev-Mountain.sh
143-
144-
# Release build
145-
./Maintain/Release.sh
146-
```
147-
148-
---
149-
150-
## Overview 📖
151-
152-
Maintain serves as the central build orchestration tool, offering:
153-
154-
- **Build System:** Comprehensive build configuration and execution
155-
- **Rhai Scripting:** Embedded scripting for custom build logic
156-
- **Configuration Management:** TOML and JSON5 editing capabilities
157-
- **CLI Interface:** Command-line interface for build operations
158-
- **Environment Resolution:** Dynamic environment variable handling
159-
160-
## Installation 📥
161-
162-
```sh
163-
cargo install Maintain
164-
```
165-
166-
---
167-
168-
## System Architecture Diagram 🏗️
169-
170-
This diagram illustrates `Maintain`'s build orchestration architecture. It shows
171-
how the CLI, Rhai engine, and configuration editor relate to external scripts
172-
and config files.
69+
## In the Ecosystem&#x2001;💪🏻 + 🏞️
17370

17471
```mermaid
17572
graph LR
@@ -209,157 +106,30 @@ ConfigEditor --> JSON5Config
209106

210107
---
211108

212-
## Usage 🚀
213-
214-
### As Binary
215-
216-
```sh
217-
# Run Maintain build system
218-
Maintain [OPTIONS] [COMMAND]
219-
```
220-
221-
### As Library
109+
## Development&#x2001;🛠️
222110

223-
```rust
224-
use maintain::Build;
225-
226-
let build = Build::new();
227-
build.execute()?;
228-
```
229-
230-
## Project Structure 🗺️
231-
232-
```
233-
Element/Maintain/
234-
├── Source/
235-
│ ├── Library.rs # Main entry point
236-
│ └── Build/
237-
│ ├── CLI.rs # Command-line interface
238-
│ ├── Constant.rs # Build constants
239-
│ ├── Definition.rs # Build definitions
240-
│ ├── Fn.rs # Build functions
241-
│ ├── Rhai/ # Rhai scripting engine
242-
│ │ ├── ConfigLoader.rs
243-
│ │ ├── EnvironmentResolver.rs
244-
│ │ └── ScriptRunner.rs
245-
│ └── ...
246-
└── Debug/ # Debug scripts
247-
├── All.sh
248-
├── Build.sh
249-
├── Run.sh
250-
└── Wind.sh
251-
```
252-
253-
---
254-
255-
## Deep Dive & Component Breakdown 🔬
256-
257-
To understand how `Maintain`'s internal components interact, see the following
258-
source files:
259-
260-
- **[`Source/Library.rs`](https://github.com/CodeEditorLand/Maintain/tree/Current/Source/Library.rs)** -
261-
Main entry point and module declarations
262-
- **[`Source/Build/CLI.rs`](https://github.com/CodeEditorLand/Maintain/tree/Current/Source/Build/CLI.rs)** -
263-
Command-line interface with clap
264-
- **[`Source/Build/Rhai/`](https://github.com/CodeEditorLand/Maintain/tree/Current/Source/Build/Rhai/)** -
265-
Rhai scripting engine integration
266-
- [`ConfigLoader.rs`](https://github.com/CodeEditorLand/Maintain/tree/Current/Source/Build/Rhai/ConfigLoader.rs) -
267-
Configuration file loading
268-
- [`EnvironmentResolver.rs`](https://github.com/CodeEditorLand/Maintain/tree/Current/Source/Build/Rhai/EnvironmentResolver.rs) -
269-
Environment variable resolution
270-
- [`ScriptRunner.rs`](https://github.com/CodeEditorLand/Maintain/tree/Current/Source/Build/Rhai/ScriptRunner.rs) -
271-
Script execution engine
272-
273-
The source files explain the Rhai scripting integration, TOML/JSON5 editing
274-
capabilities, and the build orchestration patterns.
275-
276-
---
277-
278-
## Shell Scripts 📝
279-
280-
Maintain includes several helper scripts in the `Maintain/` directory:
281-
282-
- [`Debug.sh`](Debug.sh) — Debug mode execution
283-
- [`Dev-Mountain.sh`](Dev-Mountain.sh) — Mountain development mode
284-
- [`Profile.sh`](Profile.sh) — Performance profiling
285-
- [`Release.sh`](Release.sh) — Release build
286-
287-
### Debug Subdirectory
288-
289-
The `Maintain/Debug/` directory contains additional debug scripts:
290-
291-
- [`All.sh`](Debug/All.sh) — Debug all components
292-
- [`Build.sh`](Debug/Build.sh) — Debug build process
293-
- [`Run.sh`](Debug/Run.sh) — Debug runtime
294-
- [`Wind.sh`](Debug/Wind.sh) — Debug Wind component
295-
296-
## Features
297-
298-
### Rhai Scripting Support
299-
300-
Maintain embeds the Rhai scripting language for flexible build configuration:
301-
302-
- **ConfigLoader:** Load and parse Rhai configuration files
303-
- **EnvironmentResolver:** Resolve environment variables in scripts
304-
- **ScriptRunner:** Execute Rhai scripts in the build context
305-
306-
### Configuration Editing
307-
308-
- **TOML Editing:** Modify Cargo.toml and other TOML files
309-
- **JSON5 Support:** Handle JSON5 configuration files
310-
- **Type-safe Operations:** Compile-time checked configuration access
311-
312-
## Dependencies
313-
314-
- `clap` — CLI argument parsing
315-
- `rhai` — Embedded scripting engine
316-
- `toml` / `toml_edit` — TOML parsing and editing
317-
- `json5` — JSON5 configuration support
318-
- `chrono` — Date/time handling
319-
- `colored` — Colored terminal output
320-
- `log` / `env_logger` — Logging framework
321-
322-
## Development
323-
324-
### Building
325-
326-
```sh
327-
cd Element/Maintain
328-
cargo build --release
329-
```
330-
331-
### Running Tests
332-
333-
```sh
334-
cargo test
335-
```
336-
337-
### Examples 💡
338-
339-
See [`examples/`](examples/) directory for usage examples.
340-
341-
## License ⚖️
342-
343-
This project is licensed under Creative Commons CC0.
344-
345-
See the LICENSE file for details.
111+
Maintain is a component of the Land workspace. Follow the
112+
[Land Repository](https://github.com/CodeEditorLand/Land) instructions to
113+
build and run.
346114

347115
---
348116

349-
## Changelog 📜
117+
## License&#x2001;⚖️
350118

351-
Stay updated with our progress! See
352-
[`CHANGELOG.md`](https://github.com/CodeEditorLand/Maintain/tree/Current/) for a
353-
history of changes specific to **Maintain**.
119+
CC0 1.0 Universal. Public domain. No restrictions.
120+
[LICENSE](https://github.com/CodeEditorLand/Maintain/tree/Current/LICENSE)
354121

355122
---
356123

357-
358124
## See Also
359125

126+
- [Maintain Documentation](https://editor.land/Doc/maintain)
360127
- [Architecture Overview](https://editor.land/Doc/architecture)
128+
- [Why Rust](https://editor.land/Doc/why-rust)
361129
- [Mountain](https://github.com/CodeEditorLand/Mountain)
362130
- [Rest](https://github.com/CodeEditorLand/Rest)
131+
- [Output](https://github.com/CodeEditorLand/Output)
132+
363133

364134
## Funding & Acknowledgements 🙏🏻
365135

0 commit comments

Comments
 (0)