A C application that exports a codebase to a single markdown file with UTF-8 encoding.
- Recursively scans the current directory for source code files
- Respects exclusions defined in a
.gitignorefile - Automatically detects and excludes binary files
- Excludes files larger than 100KB (configurable)
- Formats code in markdown with appropriate language identifiers
- Outputs to
_export.mdby default (configurable, including stdout)
- C99 compiler (project is built with
-std=c99) - POSIX.1-2008 environment/APIs (project is built with
-D_POSIX_C_SOURCE=200809L) - Unix-like environment (Linux, macOS, etc.)
makeThis will create an executable named fuori.
# System-wide (often requires sudo)
make install PREFIX=/usr/local
# User-local install
make install PREFIX="$HOME/.local"fuori.c: Main program (CLI, traversal, export writer)ignore.c/ignore.h: Ignore pattern loading and matching
Simply run the executable in any directory you want to export:
./fuoriBy default, the application creates a file named _export.md in the current directory containing all source code files in markdown format.
./fuori [OPTIONS]Options:
-v, --verbose: Show progress information during processing-s <size_kb>: Set maximum file size limit in KB (default: 100)-o, --output <path>: Set output path (use-for stdout)--no-clobber: Fail if output file already exists-h, --help: Display help message
Examples:
# Basic usage
fuori
# With verbose output
fuori -v
# With custom file size limit
fuori -s 50
# Write to a custom output path
fuori -o exports/codebase.md
# Write to stdout (useful in pipelines)
fuori -o - > codebase.md
# Prevent overwriting an existing output file
fuori -o codebase.md --no-clobber
# Show help
fuori --helpYou can create a .gitignore file in the directory to specify files and patterns to exclude from the export.
This tool supports common gitignore-style rules (comments, ! negation, trailing / for directories),
but does not implement recursive ** glob semantics.
# Ignore build directories
build/
dist/
# Ignore specific file types
*.log
*.tmp
# Ignore node_modules directory
node_modules/
Files larger than the specified size limit (default 100KB) are automatically excluded from the export to prevent including large binary or data files. You can change this limit using the -s option.
The application automatically detects binary files by analyzing their content and excludes them from the export. Empty files are skipped. Symbolic links are skipped to avoid recursion cycles.
The output markdown file will contain:
- A header with the file path
- A code block with the file content
- Appropriate language identifiers for syntax highlighting
Example:
## src/main.c
```c
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
```To remove the compiled executable:
make clean