feat: add project creation command - #47
Conversation
Resolves the conflict introduced by ten commits that landed on main after this branch was opened: the diff command from aloth#48, dead-code removal, pull request CI with a working lint setup, the engines correction to Node >=20.18.1, and the 0.10.0 release. CHANGELOG.md was the only conflict. Both sections are kept as they are: the Unreleased entry from this branch and the [0.10.0] entry from main describe different work, and consolidating them into a single release entry is a separate step. src/cli.ts and src/client.ts merged cleanly despite both being touched on main, because this branch adds new blocks rather than editing existing ones.
|
Thanks for this - the local HTTP server in the tests is the right call. Asserting on the actual request that goes out, without needing an Overleaf account, is exactly the split this repo wants more of. I pushed a merge of What changed on
Only One note on your validation section: Verified on the merged state: build and lint clean, 38 tests passing, Merging this now and shipping it as part of 0.11.0. A |
`olcli project create` landed in #47 as a CLI command only. The MCP server exposes 18 tools covering listing, pulling, pushing, compiling, renaming and diffing, but nothing that creates a project - so an assistant asked to start a new paper either shells out to the CLI or cannot help. This is a separate commit because `createProject()` only exists on main after that merge; the tool could not have been written before it. Unlike `plan_project_renames`, this one applies rather than previews. The plan-only restriction there exists because a bulk rename across an account is unrecoverable: Overleaf keeps no name history and tolerates duplicates, so a bad pattern succeeds silently. Creating is the opposite case - additive, nothing existing is touched, and an unwanted project can be deleted afterwards. Making it plan-only would have been caution copied without its reason. The response is the `CreatedProject` shape from the client plus the template that was used, so a caller can tell a blank project from an example one without asking again. Registration verified over a real MCP handshake rather than by reading the source: initialize followed by tools/list returns 19 tools including create_project, with `name` required and `template` optional.
…nfig path #47 landed with its own Unreleased section. It becomes the 0.11.0 entry, together with the create_project MCP tool added in the previous commit. 0.11.0 rather than 0.10.1: `olcli project create` and `createProject()` are new surface, and the package root exports three new types. mohamedsobhi777 gets a Contributors line, following the convention already used in 0.4.0, 0.6.0 and 0.10.0. The merge commit records the code authorship; this records the credit where the release notes are read. The README also stops naming a global config path that is only correct on Linux. Reported in #50: `conf` resolves to ~/Library/Preferences/olcli-nodejs/config.json on macOS, verified here, and no config exists under ~/.config at all. The docs now point at `olcli check`, which prints the real path on any platform. While there, `olcli auth --save-local` is documented as writing .olauth into the current directory, which is usually the user's LaTeX project: this repository gitignores that file, theirs will not. The remaining points in #50 are left open on purpose. The reporter offered to implement them and they form one coherent piece of work around credential handling; splitting it would put two people in the same code at the same time.
…nfig path #47 landed with its own Unreleased section. It becomes the 0.11.0 entry, together with the create_project MCP tool added in the previous commit. 0.11.0 rather than 0.10.1: `olcli project create` and `createProject()` are new surface, and the package root exports three new types. mohamedsobhi777 gets a Contributors line, following the convention already used in 0.4.0, 0.6.0 and 0.10.0. The merge commit records the code authorship; this records the credit where the release notes are read. The README also stops naming a global config path that is only correct on Linux. `conf` resolves to ~/Library/Preferences/olcli-nodejs/config.json on macOS, verified here, and no config exists under ~/.config at all. The docs now point at `olcli check`, which prints the real path on any platform. While there, `olcli auth --save-local` is documented as writing .olauth into the current directory, which is usually the user's LaTeX project: this repository gitignores that file, theirs will not. The release notes deliberately carry no reference to the open credential issue. The README correction stands on its own, and naming that issue here would send a reader of the release notes to open work about logout and plaintext passwords that 0.11.0 does not address.
Summary
OverleafClient.createProject()for blank and example projectsolcli project create <name>with--template blank|exampleand--jsonUsage
Validation
npm test— 10 passingnpm run buildnpm pack --dry-rungit diff --checknpm run lintis currently unavailable because the repository does not install the ESLint executable referenced by that script.Live verification
The authenticated
/project/newflow was also verified against overleaf.com with a temporary test project before implementation. The automated suite uses a local HTTP server and does not create remote projects.