Code completion CLI.
npm install @ishaanranjan/code-completionA tiny Node.js CLI that sends your file content and an instruction prompt to a completion API and prints the result.
bash
npm i -g @ishaanranjan/code-completion
`Usage
`bash
Print completion
code-completion -f path/to/file.py -p "Continue the code. Only code, no fences."Append completion to the file
code-completion -f path/to/file.py --append -p "Add input validation."Write to a new file
code-completion -f path/to/file.py -o path/to/file.completed.py -p "Refactor into functions."
`$3
- -f, --file : required source file
- -p, --prompt : instruction prompt
- --max-tokens : max tokens (default 512)
- --temperature : sampling temperature (default 0.2)
- -o, --out : write result to this path
- --append: append result to the input file
- --keep-fences`: keep triple-backtick code fences if present