2 |
3 |
Join the Community
4 |
5 | Code2Prompt is built by and for developers. Contribute, suggest features,
6 | and help shape the future of AI-driven code analysis.
7 |
8 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/website/src/content/docs/docs/how_to/ssh.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Use Code2prompt CLI with SSH
3 | description: A guide to using Code2Prompt CLI with SSH for remote codebase analysis.
4 | ---
5 |
6 | ## Why it doesn't work?
7 |
8 | When you try to run the `code2prompt` CLI on a remote server via SSH, the command is unable to find the clipboard. This is because the `code2prompt` CLI uses the clipboard to copy the generated prompt, and SSH sessions typically do not have access to the local clipboard.
9 |
10 | ## Solution
11 |
12 | To use the `code2prompt` CLI with SSH, you can redirect the output to a file instead of copying it to the clipboard. This way, you can still generate the prompt and save it for later use.
13 |
14 | Use the `--output-file` option to specify the output file where the generated prompt will be saved. For example:
15 |
16 | ```sh
17 | ssh user@remote-server "code2prompt path/to/codebase -O output.txt"
18 | ```
19 |
--------------------------------------------------------------------------------
/website/src/assets/SDK.svg:
--------------------------------------------------------------------------------
1 |
2 |