From 9ccd28f764d11535c598ebf185b73839d6b0381c Mon Sep 17 00:00:00 2001 From: Jheison Martinez Bolivar Date: Wed, 1 Apr 2026 08:49:27 -0500 Subject: [PATCH 1/6] docs: add workflow sequence diagram, remove hardcoded template list and project structure --- README.md | 82 ++++++++++++++++++++----------------------------------- 1 file changed, 29 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 9625a02..6f2331a 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,34 @@ texforge build texforge clean ``` +## Workflow + +```mermaid +sequenceDiagram + actor User + participant CLI as texforge + participant Linter + participant Diagrams as Diagram Pre-processor + participant Tectonic + + User->>CLI: texforge new my-doc + CLI-->>User: project scaffolded + + User->>CLI: texforge check + CLI->>Linter: lint .tex files + Linter-->>User: errors with file:line + suggestion + + User->>CLI: texforge fmt + CLI-->>User: .tex files formatted in place + + User->>CLI: texforge build + CLI->>Diagrams: render \begin{mermaid} / \begin{graphviz} + Diagrams-->>CLI: PNG files in build/diagrams/ + CLI->>Tectonic: compile build/main.tex + Note over CLI,Tectonic: auto-installs tectonic on first run + Tectonic-->>User: build/main.pdf +``` + --- ## Commands @@ -115,61 +143,9 @@ texforge clean --- -## Project Structure - -`texforge new` generates this structure: - -``` -mi-tesis/ -├── project.toml # Project configuration -├── main.tex # Entry point -├── sections/ # Document sections -│ └── body.tex -├── bib/ -│ └── references.bib # Bibliography -└── assets/ - └── images/ # Images and resources -``` - -### `project.toml` - -```toml -[documento] -titulo = "mi-tesis" -autor = "Author" -template = "general" - -[compilacion] -entry = "main.tex" -bibliografia = "bib/references.bib" -``` - ---- - ## Templates -Templates are managed through the [texforge-templates](https://github.com/JheisonMB/texforge-templates) registry. The `general` template is embedded in the binary and works offline. - -| Template | Description | -|---|---| -| `general` | Generic article (default, embedded) | -| `apa-general` | APA 7th edition report | -| `apa-unisalle` | Universidad de La Salle thesis | -| `ieee` | IEEE journal paper | -| `letter` | Formal Spanish correspondence | - -```bash -# List installed templates -texforge template list - -# Download a template -texforge template add apa-general - -# Create project with specific template -texforge new mi-tesis -t apa-general -``` - -Templates are cached locally in `~/.texforge/templates/` after first download. +Templates are managed through the [texforge-templates](https://github.com/JheisonMB/texforge-templates) registry. The `general` template is embedded in the binary and works offline. Run `texforge template list --all` to see all available templates. --- From 14fd61a5c3566a76ba265c0400e4826fb074239f Mon Sep 17 00:00:00 2001 From: Jheison Martinez Bolivar Date: Wed, 1 Apr 2026 08:53:57 -0500 Subject: [PATCH 2/6] docs: add texforge init alternative flow to workflow diagram --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 6f2331a..97b0fe0 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,11 @@ sequenceDiagram User->>CLI: texforge new my-doc CLI-->>User: project scaffolded + alt Existing LaTeX project + User->>CLI: texforge init + CLI-->>User: project.toml generated + end + User->>CLI: texforge check CLI->>Linter: lint .tex files Linter-->>User: errors with file:line + suggestion From 8cad3a2af48b4333d45b041854e41ae794d27a18 Mon Sep 17 00:00:00 2001 From: Jheison Martinez Bolivar Date: Wed, 1 Apr 2026 08:55:20 -0500 Subject: [PATCH 3/6] =?UTF-8?q?docs:=20simplify=20workflow=20diagram=20?= =?UTF-8?q?=E2=80=94=20only=20User=20and=20texforge/Tectonic=20as=20partic?= =?UTF-8?q?ipants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 97b0fe0..d00294f 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,6 @@ texforge clean sequenceDiagram actor User participant CLI as texforge - participant Linter - participant Diagrams as Diagram Pre-processor participant Tectonic User->>CLI: texforge new my-doc @@ -112,15 +110,13 @@ sequenceDiagram end User->>CLI: texforge check - CLI->>Linter: lint .tex files - Linter-->>User: errors with file:line + suggestion + CLI-->>User: errors with file:line + suggestion User->>CLI: texforge fmt CLI-->>User: .tex files formatted in place User->>CLI: texforge build - CLI->>Diagrams: render \begin{mermaid} / \begin{graphviz} - Diagrams-->>CLI: PNG files in build/diagrams/ + Note over CLI: render embedded diagrams to PNG CLI->>Tectonic: compile build/main.tex Note over CLI,Tectonic: auto-installs tectonic on first run Tectonic-->>User: build/main.pdf From 63b046fe8697acfe87206dde97527d0fdffad52d Mon Sep 17 00:00:00 2001 From: Jheison Martinez Bolivar Date: Wed, 1 Apr 2026 09:29:26 -0500 Subject: [PATCH 4/6] docs: improve readme --- README.md | 93 ++++++++++++++++++++++--------------------------------- 1 file changed, 37 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 9625a02..69b6380 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,13 @@ rm -f ~/.local/bin/texforge # texforge binary rm -rf ~/.texforge/ # tectonic engine + cached templates ``` ---- +## Agent Skill + +An [Agent Skill](https://github.com/jheisonmb/skills) is available for AI-assisted LaTeX workflows with texforge: + +```bash +npx skills add https://github.com/jheisonmb/skills --skill texforge +``` ## Quick Start @@ -93,6 +99,35 @@ texforge build texforge clean ``` +## Workflow + +```mermaid +sequenceDiagram + actor User + participant CLI as texforge + participant Tectonic + + User->>CLI: texforge new my-doc + CLI-->>User: project scaffolded + + alt Existing LaTeX project + User->>CLI: texforge init + CLI-->>User: project.toml generated + end + + User->>CLI: texforge check + CLI-->>User: errors with file:line + suggestion + + User->>CLI: texforge fmt + CLI-->>User: .tex files formatted in place + + User->>CLI: texforge build + Note over CLI: render embedded diagrams to PNG + CLI->>Tectonic: compile build/main.tex + Note over CLI,Tectonic: auto-installs tectonic on first run + Tectonic-->>User: build/main.pdf +``` + --- ## Commands @@ -115,61 +150,9 @@ texforge clean --- -## Project Structure - -`texforge new` generates this structure: - -``` -mi-tesis/ -├── project.toml # Project configuration -├── main.tex # Entry point -├── sections/ # Document sections -│ └── body.tex -├── bib/ -│ └── references.bib # Bibliography -└── assets/ - └── images/ # Images and resources -``` - -### `project.toml` - -```toml -[documento] -titulo = "mi-tesis" -autor = "Author" -template = "general" - -[compilacion] -entry = "main.tex" -bibliografia = "bib/references.bib" -``` - ---- - ## Templates -Templates are managed through the [texforge-templates](https://github.com/JheisonMB/texforge-templates) registry. The `general` template is embedded in the binary and works offline. - -| Template | Description | -|---|---| -| `general` | Generic article (default, embedded) | -| `apa-general` | APA 7th edition report | -| `apa-unisalle` | Universidad de La Salle thesis | -| `ieee` | IEEE journal paper | -| `letter` | Formal Spanish correspondence | - -```bash -# List installed templates -texforge template list - -# Download a template -texforge template add apa-general - -# Create project with specific template -texforge new mi-tesis -t apa-general -``` - -Templates are cached locally in `~/.texforge/templates/` after first download. +Templates are managed through the [texforge-templates](https://github.com/JheisonMB/texforge-templates) registry. The `general` template is embedded in the binary and works offline. Run `texforge template list --all` to see all available templates. --- @@ -298,8 +281,6 @@ texforge fmt --check # check without modifying (CI-friendly) --- ---- - ## License MIT From 0f8b9639ce59703ccf0165a12f4d29a012fcb66d Mon Sep 17 00:00:00 2001 From: Jheison Martinez Bolivar Date: Wed, 1 Apr 2026 09:36:48 -0500 Subject: [PATCH 5/6] docs: update readme with linked to skills.sh --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 69b6380..34c6d59 100644 --- a/README.md +++ b/README.md @@ -72,9 +72,9 @@ rm -f ~/.local/bin/texforge # texforge binary rm -rf ~/.texforge/ # tectonic engine + cached templates ``` -## Agent Skill +## Skill -An [Agent Skill](https://github.com/jheisonmb/skills) is available for AI-assisted LaTeX workflows with texforge: +An [texforge Skill](https://skills.sh/jheisonmb/skills/texforge) is available for AI-assisted LaTeX workflows with texforge: ```bash npx skills add https://github.com/jheisonmb/skills --skill texforge From c4f3049a74bab0116e3db60f7deaad8ef8aa875b Mon Sep 17 00:00:00 2001 From: Jheison Martinez Bolivar Date: Wed, 1 Apr 2026 10:05:18 -0500 Subject: [PATCH 6/6] feat: add texforge build --watch with configurable debounce delay --- Cargo.toml | 5 ++- README.md | 14 ++++++++ src/cli/mod.rs | 17 +++++++-- src/commands/build.rs | 83 +++++++++++++++++++++++++++++++++++++++---- 4 files changed, 109 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bef5592..9ed65f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "texforge" -version = "0.3.0" +version = "0.4.0" edition = "2021" rust-version = "1.75" description = "Self-contained LaTeX to PDF compiler CLI" @@ -38,6 +38,9 @@ flate2 = "1.1" tar = "0.4" zip = { version = "2", default-features = false, features = ["deflate"] } +# File watching for --watch mode +notify = { version = "7", features = ["macos_fsevent"] } + # Mermaid diagram rendering mermaid-rs-renderer = { version = "0.2", default-features = false } resvg = "0.46" diff --git a/README.md b/README.md index 34c6d59..fa6dfc6 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ sequenceDiagram | `texforge new -t