Feature request: Support line range syntax in CLI (@file:L1-L10)
Resolved 💬 3 comments Opened Mar 4, 2026 by juliocleal13 Closed Mar 8, 2026
Feature Request
Add support for referencing specific line ranges in files directly in the CLI, similar to how the VS Code extension supports @file#lines.
Proposed Syntax
@src/config.ts:50-70
or
@src/config.ts#L50-L70
Use Case
When working in the terminal, it would be helpful to reference specific lines of a file without having to describe them in natural language or copy/paste the code.
Currently, the VS Code extension supports this with @file#lines syntax and keyboard shortcuts, but CLI users don't have an equivalent native feature.
Current Workaround
- Mention lines in natural language: "look at lines 50-70 of src/config.ts"
- Copy and paste the relevant code snippet
- Reference the entire file with
@file
Expected Behavior
The CLI should parse the line range syntax and automatically read only the specified lines, providing them as context to the conversation.
---
Suggested by a CLI user who prefers terminal workflows over IDE extensions.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗