savecodex reads all the files in the folder you select, generate input automatically using ai, types those inputs, takes screenshots, makes documents and downloads it (docx). Just select your folder and enter your GEMINI API KEY to begin with.
Ensure you have Rust installed, then build the project:
cargo build --releasesavecodex leverages AI (like Gemini, Groq, or Ollama) for intelligent code generation and automation (used by the solve command or internal AI modules).
- Copy
.env.exampleto.env:cp .env.example .env
- Open
.envand fill in your preferred API keys. By default, savecodex uses Google Gemini, but you can configure any OpenAI-compatible provider (Groq, Ollama, etc.) for either code generation or input generation. - Verify your keys are working by running the included utility script:
./apitest
savecodex provides several commands to handle different workflows. You can run the CLI via cargo run -- <command> or by executing the compiled binary directly.
Starts the backend HTTP API server. This is used to connect the savecodex frontend application.
Usage:
savecodex serve --host 127.0.0.1 --port 7878 --debug--host: The address to bind the server to (default:127.0.0.1).--port: The port to listen on (default:7878).--debug: Enable detailed debug logging, especially for AI provider communications.
Reads all source code files matching specific extensions in one or more files/folders, uses AI to generate mock stdin for each, executes them to capture their output (with term_gen), and packages everything into beautifully formatted DOCX documents.
Usage:
savecodex pack test_folder -o test_output --ext java,py --doc-title "Assignment {}"<folder_paths...>: One or more files or directories containing your source code (e.g.,test_folder/ortest_main.rs).-o, --output: The base name for the output files (.docx). Supports the{}placeholder to dynamically insert the file/folder name.--ext: Comma-separated list of file extensions to include (e.g.,java,py,rs).--doc-title: Main heading for the document. Supports the{}placeholder.--doc-text: Optional description text under the heading. Supports the{}placeholder.
(Note: pack also supports all the terminal styling arguments available in the term command, such as --theme, --font-size, --style, etc.)
Configuring Defaults via .env:
You can set default values for any pack argument in your .env file to avoid passing them in the CLI:
SAVECODEX_STYLE=macos
SAVECODEX_OUTPUT="1234567890_{}.docx"
SAVECODEX_DOC_TEXT="\nJohn Doe - 1234567890 - {}\n"Automates the assignment workflow entirely. It reads questions from an input PDF or DOCX file, uses AI to write the code solutions, runs the code to verify it and capture output, and finally exports the results into DOCX and PDF.
Usage:
savecodex solve test_input.pdf -o test_output<input_file>: The assignment file to parse (PDF or DOCX).-o, --output: The base name for the generated solutions files (.docxand.pdf).
A utility command that reads text (plain or ANSI-colored) from a file or standard input and renders it into a PNG image of a fake terminal window. This is highly customizable and useful for generating code snippets or terminal outputs for documentation.
Usage:
savecodex term -i test_input.txt -o test_term.png --style windows --title "Title" --theme dark-i, --input: The file to read text from. If omitted, reads fromstdin.-o, --output: The path to save the generated PNG (default:term.png).--style: The window control style. Options arewindows(default),macos, orlinux.--title: The text to display in the window's title bar (default:bash).--theme: The color theme of the window. Options aredark(default) orlight.--font-size: The font size in pixels (default:18.0).--padding: Padding around the text inside the window (default:28).--username: Realistic prompt username (default:local).--hostname: Realistic prompt hostname (default:host).--cwd: Realistic prompt current working directory (default:~).