2 unstable releases
| 0.2.0 | Dec 4, 2025 |
|---|---|
| 0.1.0 | Sep 12, 2025 |
#497 in Filesystem
11KB
208 lines
toai
toai is a tiny Rust CLI that dumps a folder into an AI-friendly text format.
Each file is printed with its relative path header, followed by its contents.
By default, the output is copied directly to your clipboard – ready to paste into any AI chat.
Example of the output format:
src/main.tsx
-- file content here --
package.json
-- file content here --
By default, toai skips heavy folders (node_modules, target, .git, …) and common binary/cache files via glob patterns.
Install
From source:
- git clone https://github.com/devmaxde/toai.git
- cd toai
- cargo install --path .
or
- cargo install toai
Usage
toai [OPTIONS]
Common examples:
-
Dump current directory to clipboard (default)
toai --path . -
Dump a specific folder to clipboard
toai --path ./my-project -
Write output to a file
toai --path . --output output.txt -
Print to stdout (for piping)
toai --path . --stdout -
Add custom ignores (repeatable, supports globs)
toai --path . --ignore somefolder --ignore "*.png" --ignore "*.log" -
Disable default ignores and specify your own
toai --path . --no-ignore-default --ignore build --ignore cache --ignore "*.o" -
Ensure the output file isn't included (handled automatically if it's inside the scanned tree)
toai --path . --output ./dump/project.txt
Options
--path
--output
Write output to a file instead of clipboard
--stdout
Print output to stdout instead of clipboard (useful for piping)
--ignore
--no-ignore-default
Disable the default ignore set
Default ignore set
Applied unless --no-ignore-default is used.
Directories
nodemodules
target
dist
build
.next
.turbo
.git
.idea
.vscode
pycache
.pytest_cache
.mypy_cache
.ruff_cache
CMakeFiles
cmake-build-
Pods
buck-out
bazel-_
Files
Cargo.lock
LICENSE
.DS_Store
Binary and cache extensions
Python: _.pyc, _.pyo, _.pyd
C/C++/Rust: _.o, _.obj, _.so, _.dll, _.dylib, _.exe, _.out, _.a, _.lib
Logs/Temp: _.log, _.tmp, _.swp
Images: _.png, _.jpg, _.jpeg, _.gif, _.bmp, _.tiff, _.ico, _.svg, _.webp, _.heic, _.heif
3D assets: _.vrm, _.fbx, _.glb, _.gltf, _.blend, _.obj, _.stl
Archives: _.zip, _.tar, _.gz, _.bz2, _.xz, _.7z, _.rar
Dependencies
~4–21MB
~263K SLoC