shareai
v1.4.1
Published
CLI tool to collect and format whitelisted project files for AI input
Readme
ShareAI
A CLI tool to collect whitelisted project files and output them in a clean, AI-ready format. Ideal for code review, debugging, or sharing code snippets with context.
Features
- Default behavior: Uses
.gitignoreas a blacklist (i.e., excludes ignored files by default) - Override with
.aiignore: Optionally specify files/folders to exclude only from ShareAI using.aiignore - Use whitelist instead with
.aiwhitelist: Specify folders and files to be copied and exclude everything else. This will ignore .gitignore and .aiignore. - Supports glob
*for recursive inclusion - Skips hidden files and
node_modulesby default - Outputs formatted files to
ShareAIOutput.txt - [ROUTE] / [Code] format for easy copy-paste
- Written in TypeScript, easy to extend
Installation
Global
pnpm add -g shareai
npm install -g shareai
yarn global add shareaiLocal / Dev
pnpm add -D shareai
pnpm shareaiUsage
Create
.aiignorein your project root (optional)
This file works like.gitignore, but only affects ShareAI's behavior.Alternatively, use
.aiwhitelistto use whitelisting instead. Note: this will exclude any contents of.gitignoreand.aiignoreand only use the whitelist.The file will be automatically created with common non-code file patterns if it doesn't exist.
Example:
apps/backend/tsconfig.jsonRun:
pnpm shareaiOutput written to:
ShareAIOutput.txt
Output Format:[PROJECT NAME]: name-of-the-parent-folder [QUANTITY OF FILES]: number [ROUTE]: relative/path/to/file [Code]: <file content> [eof] [ROUTE]: relative/path/to/file [Code]: <file content> [eof] ...
License
MIT © w0nd3rl4nd
