Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
persist-credentials: false

- name: 'Dependency Review'
uses: actions/dependency-review-action@56339e523c0409420f6c2c9a2f4292bbb3c07dd3
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261
with:
comment-summary-in-pr: always
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ jobs:
path: artifacts/macos

- name: Create Release
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
with:
name: Release ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.changelog_reader.outputs.changes || 'No changelog provided' }}
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,10 @@ jobs:
package-manager-cache: false

- name: Install dependencies
run: |
if [ -f package-lock.json ]; then
npm ci --ignore-scripts
else
npm install --ignore-scripts --no-audit --no-fund
fi
run: npm ci --ignore-scripts

- name: Generate CycloneDX SBOM
run: |
mkdir -p dist/security/sbom
npx --yes @cyclonedx/cyclonedx-npm --output-format json --output-file dist/security/sbom/sbom.cyclonedx.json
run: npm run sbom

- name: Upload SBOM artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
Expand Down
25 changes: 24 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# Make these targets phony (they don't create files with these names)
.PHONY: all setup dev clean clean-all build build-win build-linux \
build-mac build-mac-arm build-mac-universal \
test css css-watch lint format validate setup-hooks sonar icons sample-logo release
test css css-watch lint format validate qa setup-hooks sonar \
security gitleaks sbom renovate renovate-local mend-scan \
icons sample-logo release

# Set executable permissions for scripts
setup-scripts:
Expand Down Expand Up @@ -63,12 +65,33 @@ format: setup-scripts
validate: setup-scripts
@node scripts/index.js validate

qa: setup-scripts
@node scripts/index.js qa

setup-hooks: setup-scripts
@node scripts/index.js hooks

sonar: setup-scripts
@node scripts/index.js sonar

security: setup-scripts
@node scripts/index.js security

gitleaks: setup-scripts
@node scripts/index.js gitleaks

sbom: setup-scripts
@node scripts/index.js sbom

renovate: setup-scripts
@node scripts/index.js renovate

renovate-local: setup-scripts
@node scripts/index.js renovate-local

mend-scan: setup-scripts
@node scripts/index.js mend-scan

release: setup-scripts
@node scripts/index.js release $(VERSION)

Expand Down
127 changes: 24 additions & 103 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,130 +2,51 @@

## Features

A desktop application for preparing and optimizing code repositories for AI processing and analysis. It helps you select specific files, count tokens, and process source code for AI systems.
A desktop app to prepare code repositories for AI workflows.

- Visual directory explorer for selecting code files
- Advanced file filtering with customizable patterns
- Accurate token counting for various AI models
- Code content processing with statistics
- File filtering with custom patterns and `.gitignore` support
- Token counting support for selected files
- Processed output ready to copy/export for AI tools
- Cross-platform support (Windows, macOS, Linux)

## Installation
## Download Release

### Download
Download the latest packaged build from GitHub Releases:
https://github.com/codingworkflow/ai-code-fusion/releases

Download the latest version for your platform from the [Releases page](https://github.com/codingworkflow/ai-code-fusion/releases).
- Windows: download and run the `.exe` installer
- macOS: download the `.dmg`, drag app to Applications
- Linux: download the `.AppImage`, then run:

### Windows

1. Download the `.exe` installer
2. Run the installer and follow the instructions
3. Launch from the Start Menu or desktop shortcut

### macOS

1. Download the `.dmg` file
2. Open the DMG and drag the application to your Applications folder
3. Launch from Applications

### Linux

1. Download the `.AppImage` file
2. Make it executable: `chmod +x AI.Code.Prep-*.AppImage`
3. Run it: `./AI.Code.Prep-*.AppImage`

## Usage Guide

### 1. Start and Filters

The application now features both Dark and Light modes for improved user experience.
![Start Panel Dark Mode](assets/ai_code_fusion_1.jpg)

![Start Panel Light Mode](assets/ai_code_fusion_2.jpg)

Extended file filtering options:

- Exclude specific file types and patterns (using glob patterns) to remove build folders, venv, node_modules, .git from tree view and file selection
- Automatically exclude files based on .gitignore files in your repository
- Reduce selection to only the file extensions you specify
- Display token count in real-time during selection (can be disabled for very large repositories)
- Include file tree in output (recommended for better context in AI models)

### 2. File Selection

Select specific files and directories to analyze and process.

![Analysis Panel](assets/ai_code_fusion_3.jpg)

- Browse and select your root project directory
- Use the tree view to select specific files or folders
- See file counts and token sizes in real-time (when token display is enabled)

### 3. Final Processing

Generate the processed output ready for use with AI systems.

![Processing Panel](assets/ai_code_fusion_4.jpg)

- View the final processed content ready for AI systems
- Copy content directly to clipboard for immediate use
- Export to file for later reference
- Review files by token count to help identify large files you may want to exclude
```bash
chmod +x *.AppImage
./*.AppImage
```

## Building from Source
## Build from Source

### Prerequisites
Requirements:

- Node.js (v14 or later)
- Node.js (v20 or later)
- npm
- Git

### Setup

```bash
# Clone the repository
git clone https://github.com/codingworkflow/ai-code-fusion
cd ai-code-fusion

# Install dependencies
make setup
# or
npm install
npm ci
npm run build:webpack
npm run build
```
Comment on lines +39 to 42

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find and read the build script
fd -t f 'index.js' scripts/ --max-depth 1 -x cat {} \;

# Also check package.json for build script definitions
echo "=== package.json build scripts ==="
cat package.json | jq '.scripts | select(. != null) | with_entries(select(.key | contains("build")))'

Repository: codingworkflow/ai-code-fusion

Length of output: 7613


🏁 Script executed:

#!/bin/bash
# Read the build module
cat scripts/lib/build.js

Repository: codingworkflow/ai-code-fusion

Length of output: 4823


Remove the redundant npm run build:webpack call from the build instructions.

The npm run build command already includes TypeScript compilation (build:ts), CSS building (build:css), and webpack building internally via lib/build.js. Running npm run build:webpack explicitly before npm run build causes webpack to execute twice, wasting build time. The instructions should be simplified to just npm ci followed by npm run build.

🤖 Prompt for AI Agents
In `@README.md` around lines 39 - 42, Remove the redundant npm run build:webpack
step from the README build instructions: keep the sequence as npm ci followed by
npm run build because the npm run build script already runs build:ts, build:css
and the webpack build internally (via lib/build.js), so delete the explicit npm
run build:webpack line to avoid running webpack twice.


### Development

```bash
# Start the development server
make dev
# or
npm run dev
```

#### Troubleshooting Development

If you encounter issues with the development server:

1. For Windows users: The `make.bat` file has special handling for the `dev` command that properly sets environment variables
2. If you're still having issues:
- Ensure all dependencies are installed: `npm install`
- Try rebuilding: `npm run rebuild`
- Close any running instances of the app
- Restart your terminal/command prompt
- As a last resort, try direct electron launch: `npm run dev:direct`

### Building
Optional platform-specific builds:

```bash
# Build for current platform
make build

# Build for specific platforms
make build-win # Windows
make build-linux # Linux
make build-mac # macOS (Intel)
make build-mac-arm # macOS (Apple Silicon)
make build-mac-universal # macOS (Universal)
npm run build:win
npm run build:linux
npm run build:mac
```

## License
Expand Down
Loading
Loading