<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lattex.git, 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 copy command to clone Overleaf projects server-side</title>
<updated>2026-09-13T04:24:07+00:00</updated>
<author>
<name>YurenHao0426</name>
<email>blackhao0426@gmail.com</email>
</author>
<published>2026-09-13T04:24:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=a55e313de44444d22ef928b1bb91fd96284ea367'/>
<id>a55e313de44444d22ef928b1bb91fd96284ea367</id>
<content type='text'>
Adds `lattex-cli copy &lt;source-id|name&gt; &lt;new-name&gt;` which uses
Overleaf's POST /project/{id}/clone endpoint to create a
server-side copy of a project. Includes API method, CLI wiring,
help text, and tests.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds `lattex-cli copy &lt;source-id|name&gt; &lt;new-name&gt;` which uses
Overleaf's POST /project/{id}/clone endpoint to create a
server-side copy of a project. Includes API method, CLI wiring,
help text, and tests.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CLI: give the ESM bundle a real require() so bundled CJS deps (ws, http) load</title>
<updated>2026-09-13T04:20:02+00:00</updated>
<author>
<name>YurenHao0426</name>
<email>blackhao0426@gmail.com</email>
</author>
<published>2026-09-13T04:20:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=55bf3f24c57521907a1bac7180aa29ea8cbf83d7'/>
<id>55bf3f24c57521907a1bac7180aa29ea8cbf83d7</id>
<content type='text'>
auth --from-cdp failed with 'Dynamic require of "http" is not supported'.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
auth --from-cdp failed with 'Dynamic require of "http" is not supported'.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CLI: fix duplicate shebang in bundle; accept flags before the command (--help, -h)</title>
<updated>2026-09-13T04:09:27+00:00</updated>
<author>
<name>YurenHao0426</name>
<email>blackhao0426@gmail.com</email>
</author>
<published>2026-09-13T04:09:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=c14704c46a47418e77d6f1ad76f6c204b15c056b'/>
<id>c14704c46a47418e77d6f1ad76f6c204b15c056b</id>
<content type='text'>
esbuild already keeps the shebang from src/cli/main.ts, so the extra banner
produced two shebang lines and node refused to load the bundle.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
esbuild already keeps the shebang from src/cli/main.ts, so the extra banner
produced two shebang lines and node refused to load the bundle.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #1 from YurenHao0426/agent-cli</title>
<updated>2026-09-13T04:07:18+00:00</updated>
<author>
<name>Yuren Hao</name>
<email>97327730+YurenHao0426@users.noreply.github.com</email>
</author>
<published>2026-09-13T04:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=c78a5ef589cacb5d7bdc7586b0cc270aded4b5fc'/>
<id>c78a5ef589cacb5d7bdc7586b0cc270aded4b5fc</id>
<content type='text'>
Headless CLI mode for agents</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Headless CLI mode for agents</pre>
</div>
</content>
</entry>
<entry>
<title>Add CLI build scripts, README docs, and tsconfig reference</title>
<updated>2026-09-13T04:05:47+00:00</updated>
<author>
<name>YurenHao0426</name>
<email>blackhao0426@gmail.com</email>
</author>
<published>2026-09-13T04:05:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=1e81ba361eed444442fa98b0770e7ed78dae864b'/>
<id>1e81ba361eed444442fa98b0770e7ed78dae864b</id>
<content type='text'>
- package.json: add build:cli, typecheck:cli, test:cli scripts
- README.md: add "Headless / Agent Mode (CLI)" section with full docs
- tsconfig.json: add tsconfig.cli.json reference

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- package.json: add build:cli, typecheck:cli, test:cli scripts
- README.md: add "Headless / Agent Mode (CLI)" section with full docs
- tsconfig.json: add tsconfig.cli.json reference

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<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>
<entry>
<title>Fix main-document switching end to end; stable project-independent MCP path</title>
<updated>2026-09-05T03:26:49+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-09-05T03:26:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=34f22876ab9e15e9f14300a8c21cd7109800d1ab'/>
<id>34f22876ab9e15e9f14300a8c21cd7109800d1ab</id>
<content type='text'>
Main document: the app never called Overleaf's official settings endpoint,
so "Set as main document" only changed renderer state and agents had no way
to switch at all — compiles kept using the old root. Now:
- Right-click Set as main and the new set_main_file MCP tool both POST
  /project/:id/settings {rootDocId} (web parity, persists project-wide)
- Handle the rootDocUpdated broadcast: update the project snapshot, the
  renderer state, and rewrite CLAUDE.md/AGENTS.md — the guide's stale
  "Main file" line was teaching agents to compile the old root via
  main_file overrides
- Compile root resolution uses the sync bridge's live maps, so docs
  created mid-session resolve correctly (agent guide too)

MCP server location: Codex stores its MCP registration globally, and the
per-project path went stale when the project temp dir was cleaned up
("connection closed" on handshake). The bundled server now installs to
~/.lattex/lattex-mcp.mjs (project-independent, refreshed on connect; the
esbuild bundle since the raw source can't resolve node_modules from there)
and resolves the project at runtime: $LATTEX_PROJECT_DIR, cwd + ancestors,
legacy script location, then single live project in tmpdir. Register once,
works for every project.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Main document: the app never called Overleaf's official settings endpoint,
so "Set as main document" only changed renderer state and agents had no way
to switch at all — compiles kept using the old root. Now:
- Right-click Set as main and the new set_main_file MCP tool both POST
  /project/:id/settings {rootDocId} (web parity, persists project-wide)
- Handle the rootDocUpdated broadcast: update the project snapshot, the
  renderer state, and rewrite CLAUDE.md/AGENTS.md — the guide's stale
  "Main file" line was teaching agents to compile the old root via
  main_file overrides
- Compile root resolution uses the sync bridge's live maps, so docs
  created mid-session resolve correctly (agent guide too)

MCP server location: Codex stores its MCP registration globally, and the
per-project path went stale when the project temp dir was cleaned up
("connection closed" on handshake). The bundled server now installs to
~/.lattex/lattex-mcp.mjs (project-independent, refreshed on connect; the
esbuild bundle since the raw source can't resolve node_modules from there)
and resolves the project at runtime: $LATTEX_PROJECT_DIR, cwd + ancestors,
legacy script location, then single live project in tmpdir. Register once,
works for every project.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add in-app update check with one-click installer download</title>
<updated>2026-08-18T12:30:17+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-08-18T12:30:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=1251d9208caadce626fd0706dfd34ba3e022fb2a'/>
<id>1251d9208caadce626fd0706dfd34ba3e022fb2a</id>
<content type='text'>
On launch the home page checks the latest GitHub release; when a newer
version exists a bottom-right card offers Download (streams the right
installer for the platform into ~/Downloads and opens it), Later, or
Skip this version (remembered). Unsigned app rules out silent
auto-update on macOS, so installation stays a manual replace.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On launch the home page checks the latest GitHub release; when a newer
version exists a bottom-right card offers Download (streams the right
installer for the platform into ~/Downloads and opens it), Later, or
Skip this version (remembered). Unsigned app rules out silent
auto-update on macOS, so installation stays a manual replace.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add browser-style project tabs: persistent home + one tab per project</title>
<updated>2026-08-18T12:24:40+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-08-18T12:24:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=ec8214a4d111d92ce7c44de29d1706f241aa9514'/>
<id>ec8214a4d111d92ce7c44de29d1706f241aa9514</id>
<content type='text'>
The project list is now a persistent home tab; each opened project runs
in its own WebContentsView tab below a 38px tab strip (hidden when only
home is open). Background tabs stay fully live (sync, collab, terminals).

Main process: per-project singletons (socket, sync bridge, compilation
manager, MCP state, compile watcher) become per-tab ProjectSession
objects keyed by webContents.id; PTYs are scoped per webContents.
Hardened against races found in review: concurrent ot:connect dedupe,
teardown/reopen serialization on the shared sync dir, destroyed-window
guards on all bridge sends, real logout that closes project tabs.

Renderer: tabs strip in the home renderer (wt-* classes, distinct from
the editor's .tab-bar file tabs), project tabs boot from ?projectId= and
connect straight into the editor; Back closes the tab.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The project list is now a persistent home tab; each opened project runs
in its own WebContentsView tab below a 38px tab strip (hidden when only
home is open). Background tabs stay fully live (sync, collab, terminals).

Main process: per-project singletons (socket, sync bridge, compilation
manager, MCP state, compile watcher) become per-tab ProjectSession
objects keyed by webContents.id; PTYs are scoped per webContents.
Hardened against races found in review: concurrent ot:connect dedupe,
teardown/reopen serialization on the shared sync dir, destroyed-window
guards on all bridge sends, real logout that closes project tabs.

Renderer: tabs strip in the home renderer (wt-* classes, distinct from
the editor's .tab-bar file tabs), project tabs boot from ?projectId= and
connect straight into the editor; Back closes the tab.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Upload Windows installer via gh CLI instead of electron-builder publisher</title>
<updated>2026-07-30T03:12:40+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-07-30T03:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=df3092328865949c088eed321e6675e3b7758c36'/>
<id>df3092328865949c088eed321e6675e3b7758c36</id>
<content type='text'>
The builder's GitHub publisher refuses to attach assets to releases
published more than two hours earlier.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The builder's GitHub publisher refuses to attach assets to releases
published more than two hours earlier.

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