feat(cli): lingo.dev init cursor Command for .cursorrules Setup (#1101)#1409
feat(cli): lingo.dev init cursor Command for .cursorrules Setup (#1101)#1409maxprilutskiy merged 29 commits intolingodotdev:mainfrom
Conversation
|
Hii @sumitsaurabh927 |
|
Hii @sumitsaurabh927 @The-Best-Codes |
The-Best-Codes
left a comment
There was a problem hiding this comment.
Your PR is looking awesome @SK8-infi 🔥
I've left a review of a couple things that need fixed below. Also, some general reminders:
- Run
pnpm run formatbefore committing - Run
pnpm newto create a changeset (do this once for your PR)
|
@The-Best-Codes Thanks for reviewing the code. Resolved all the issues. The code looks much cleaner now. Please also do point if anything else is off. |
The-Best-Codes
left a comment
There was a problem hiding this comment.
Just one change I'd recommend making! I haven't tested locally to make sure everything is working fine, but your PR is looking great 😀
I also have two questions:
- Will this work well on Windows
- Will this work well in productions builds that are deployed to npm (the file tree is different in prod than in dev)
|
Hii @The-Best-Codes |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new lingo.dev init cursor subcommand that automates the creation of a .cursorrules file by copying a template from the package's assets directory. The command supports interactive prompts for overwriting existing files and a --force flag for non-interactive usage.
Key changes:
- New
cursorsubcommand underlingo.dev initfor generating.cursorrulesfiles - Asset template file (
agents.md) added to the CLI package - Dependency updates in the monorepo lockfile (
@types/nodefrom 24.2.0 to 24.9.2)
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/src/cli/cmd/init/cursor.ts | Implements the new cursor subcommand with file copy logic, overwrite prompts, and --force flag support |
| packages/cli/src/cli/cmd/init.ts | Registers the cursor subcommand to the init command; removes extraneous blank line |
| packages/cli/assets/agents.md | Adds template file for .cursorrules content (currently contains placeholder text) |
| .changeset/nasty-nails-repair.md | Documents the feature addition as a minor version bump |
| pnpm-lock.yaml | Updates @types/node from 24.2.0 to 24.9.2 and associated transitive dependencies across the monorepo |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@maxprilutskiy Resolved all the issues pointed by Copilot. Ready for review. |
|
Hii @sumitsaurabh927 |
|
@SK8-infi this happens when pakcage json and lockfile are out of sync. Typically the reason is you added a dependency to package.json manually or using a different package manager instead of using pnpm add. A typical solution is to run pnpm i from the root of the repo, and commit the updated lockfile |
|
Let me know once that is done and let's merge the PR! @SK8-infi |
|
@SK8-infi Please enable commit signature in your account, and re-push the commits so they're signed - otherwise GitHub won't let us merge the PR due to the security settings. Thank you! https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Head branch was pushed to by a user without write access
|
@maxprilutskiy Thanks for approval. I have re-pushed the commits with signature. Please check. Thanks. |
|
@maxprilutskiy just checking in |
Change after discussion with The-Best-Codes over Discord
Signed-off-by: SK8-infi <shivansh.katiyar1712@gmail.com>
Signed-off-by: SK8-infi <shivansh.katiyar1712@gmail.com>
|
For reference: last time I tested this locally, it didn't work. I'll try it again ASAP. |
Updated path resolution for AGENTS_MD to handle both development and production environments. Was causing error of "agents.md not found" with help from @the_best_codes resolved the issue
|
Works great! |
|
@SK8-infi @The-Best-Codes 🎉 🎉 🎉 |
…odotdev#1101) (lingodotdev#1409) * feat: add init cursor command * feat: add init cursor command * feat: add init cursor command * Delete package-lock.json * Rename cursor.md to agents.md * Delete package-lock.json * feat(cli): lingo.dev init cursor Command for .cursorrules Setup (lingodotdev#1101) refactored * Delete agents.md * feat(cli): lingo.dev init cursor Command for .cursorrules Setup (lingodotdev#1101) changeset * feat(cli): lingo.dev init cursor Command for .cursorrules Setup (lingodotdev#1101) minor fixes * Update packages/cli/src/cli/cmd/init/cursor.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/cli/src/cli/cmd/init/cursor.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/cli/src/cli/cmd/init/cursor.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/cli/src/cli/cmd/init/cursor.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Restore accidentally deleted file * Restore accidentally deleted file * Add i18n rules for Cursor AI agents * Update localization guidelines for Lingo.dev CLI Change after discussion with The-Best-Codes over Discord * Removing out of scope changes * remove out of scope changes * remove out of scope changes * feat(cli): add agents.md in package.json Signed-off-by: SK8-infi <shivansh.katiyar1712@gmail.com> * feat(cli): add agents.md in package.json Signed-off-by: SK8-infi <shivansh.katiyar1712@gmail.com> * Refactor path resolution for agents.md Updated path resolution for AGENTS_MD to handle both development and production environments. Was causing error of "agents.md not found" with help from @the_best_codes resolved the issue --------- Signed-off-by: SK8-infi <shivansh.katiyar1712@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Add
lingo.dev init cursorCommand for.cursorrulesSetupCloses #1101
Summary
Adds a new
cursorsubcommand tolingo.dev initthat automates the creation of a.cursorrulesfile in the project root by copying the template fromagents.md.Features & Implementation
New Command:
lingo.dev init cursor.cursorrulesin your repo root by copying the contents ofagents.md(also in the root).File Handling:
.cursorrulesalready exists:--force, which skips prompt and overwrites directly).agents.mddoes not exist.User Feedback:
CLI Structure:
initto support subcommands (projectfor the original logic,cursoras a sibling).Scenarios Tested
.cursorrulescreation when file does not exist..cursorrules(prompt and forced mode).agents.mdis missing.--forcefor scripted/non-interactive use.User Experience
Usage:
lingo.dev init cursor # or, for non-interactive scripting: lingo.dev init cursor --forceOutput:
Ready for review!
This PR brings core parity with expected subcommand conventions and ensures proper rules bootstrapping for the Cursor AI developer workflow.