CatchTheTornado / CatchTheTornado/askql
Command line CLI should allow (but not require) wrapping code in ask {}
- Dominant language
- TypeScript
- Stars
- 387
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
Currently when people wrap their code with `ask {}` when using the command line CLI tool, they get the following error:
```
marcin@Marcins-MacBook-Pro-2 askql % npm run cli
> askql@1.2.2 cli /Users/marcin/Repositories/askql
> node dist/cli.js
Welcome to AskQL CLI!
For multi-line mode please type:
.editor
🦄 ask {}
Uncaught:
Error [SyntaxError]: Expected " ", "(", ".", "//", ":", ";", "=", "[", "\n", "\r", "\t", "}", [/], or [\-!<>+*\^%=&|] but "{" found.
Location: {
"start": {
"offset": 10,
"line": 2,
"column": 5
},
"end": {
"offset": 11,
"line": 2,
"column": 6
}
}
🦄
```
Then command line should allow wrapping code in `ask {}` and not show this confusing error.
Contributor guide
Research direction
Reproduce the failure with `npm run cli`, then inspect the CLI input parsing behind `node dist/cli.js` and the `ask {}` wrapper handling. Done means code wrapped in `ask {}` is accepted without requiring the wrapper, while existing unwrapped CLI input continues to work without the confusing syntax error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100