Code Input
CodeSnap CLI code input type
Code Input
CodeSnap input type can be the following types:
file
- A file path to a code filestdin
- A code input from stdinstring
- input code as a stringclipboard
- input code from clipboard
Language
CodeSnap can auto detect what programming language is used based on code content, but it's not always accurate, we recommend to specify the language explicitly or you can capture a file directly.
File input
Generate a code snapshot from a file is the most common use case. You can specify the file path using --from-code
or -f
flag.
From code
You can also provide a code snippet directly using --from-code
or -c
flag. This is useful for quick code snippets or when you don't want to create a file.
From stdin
If you want to provide a code snippet form stdin, you can also use --from-code
or -c
flag.
From clipboard
It's also possible to take a code input from clipboard. This is useful when you want to take a screenshot of a code snippet from your editor.