<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lattex.git/src/cli/logParser.ts, branch fix-cli-shebang</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/'/>
<entry>
<title>Add headless CLI for Overleaf project management (lattex-cli)</title>
<updated>2026-09-13T04:05:38+00:00</updated>
<author>
<name>YurenHao0426</name>
<email>blackhao0426@gmail.com</email>
</author>
<published>2026-09-13T04:05:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=f3b2fc01082e754f7dfe73caa4f0a4f207a2adfb'/>
<id>f3b2fc01082e754f7dfe73caa4f0a4f207a2adfb</id>
<content type='text'>
New src/cli/ module providing a headless CLI for AI agents to work with
Overleaf projects from a server with no display. Commands: auth, projects,
clone, pull, status, push, compile.

Key design decisions:
- Uses Node.js https module (no Electron dependency), same approach as the
  existing MCP server in src/mcp/lattex.mjs
- Reuses overleafProtocol.ts for Socket.IO v0.9 parsing (pure, no Electron)
- Separate esbuild bundle (out/cli/lattex-cli.mjs) — does not touch the
  Electron app build
- 64 tests for arg parsing, file tree walking, diff logic, and log parsing

Files:
- src/cli/main.ts — CLI entry point with all commands
- src/cli/args.ts — argument parser
- src/cli/overleafApi.ts — Overleaf API client using https + ws
- src/cli/fileTree.ts — project root folder walker
- src/cli/localState.ts — per-clone state (.lattex-cli.json) and auth storage
- src/cli/diff.ts — local vs remote diff logic
- src/cli/logParser.ts — LaTeX compile log parser
- src/cli/test.ts — unit tests
- tsconfig.cli.json — TypeScript config for CLI

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New src/cli/ module providing a headless CLI for AI agents to work with
Overleaf projects from a server with no display. Commands: auth, projects,
clone, pull, status, push, compile.

Key design decisions:
- Uses Node.js https module (no Electron dependency), same approach as the
  existing MCP server in src/mcp/lattex.mjs
- Reuses overleafProtocol.ts for Socket.IO v0.9 parsing (pure, no Electron)
- Separate esbuild bundle (out/cli/lattex-cli.mjs) — does not touch the
  Electron app build
- 64 tests for arg parsing, file tree walking, diff logic, and log parsing

Files:
- src/cli/main.ts — CLI entry point with all commands
- src/cli/args.ts — argument parser
- src/cli/overleafApi.ts — Overleaf API client using https + ws
- src/cli/fileTree.ts — project root folder walker
- src/cli/localState.ts — per-clone state (.lattex-cli.json) and auth storage
- src/cli/diff.ts — local vs remote diff logic
- src/cli/logParser.ts — LaTeX compile log parser
- src/cli/test.ts — unit tests
- tsconfig.cli.json — TypeScript config for CLI

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
