Kaleidoscope Command-Line Tool

Kaleidoscope's ksdiff command-line tool lets you compare and merge any number of files from the Terminal. To install or remove, follow these instructions:

1
Install the ksdiff command-line tool The ksdiff tool is installed in /usr/local/bin
Usage example:
ksdiff ~/Documents/Draft1.txt ~/Documents/Draft2.txt ~/Desktop/Final.doc
Versions Subversion Client

Kaleidoscope is supported by Versions 1.0.8 and later.

1
Select Kaleidoscope as your comparison tool in Versions' Preferences
Quit and restart Versions if Kaleidoscope doesn't appear right away.
Subversion Command-Line Integration

To integrate Kaleidoscope directly with the Subversion command-line integration, set it up as your default SVN diff or merge tool, or use it without making it the default. To make Kaleidoscope your default diff or merge tool, follow these steps:

1
First install the ksdiff command-line tool
2
Open the ~/.subversion/config file
3
Add and save the following:
[helpers]
diff-cmd = ksdiff
merge-tool-cmd = ksdiff
Usage example:
svn diff /path/to/working_copy

To diff images from SVN, you need to add the --force parameter:

svn diff --force img/icon.png

To use Kaleidoscope with Subversion without making it your default diff tool:

1
Install the ksdiff command-line tool
Usage example:
svn diff --diff-cmd=ksdiff /path/to/working_copy

If an svn update command results in merge conflicts, it prompts you as to the action you wish to take. The l (lowercase l, for launch) option will launch Kaleidoscope to complete the merge.

Git Command-Line Integration

To integrate Kaleidoscope directly with Git, set up Kaleidoscope as a Git diff and merge tool.

To make Kaleidoscope your default diff and merge tool, follow these steps:

1
First install the ksdiff command-line tool
2
Make Kaleidoscope Git's default diff and merge tool
Usage example:
git difftool
git mergetool

To automatically configure Kaleidoscope as an optional diff and merge tool without making it the default:

1
First install the ksdiff command-line tool
2
Make Kaleidoscope one of Git's diff and merge tools
Usage example:
git difftool -y -t Kaleidoscope
git mergetool -y -t Kaleidoscope

'git difftool' takes the same arguments as 'git diff', see the man page for more information. To learn how Kaleidoscope's Git integration works, or for instructions on how to manually edit your .gitconfig to add Kaleidoscope integration, see the Git Integration topic in Kaleidoscope Help.

Mercurial Command-Line Integration

To integrate Kaleidoscope directly with Mercurial, you'll need the extdiff extension. This extension is included in Mercurial by default, but it will need to be activated. To set everything up, follow these instructions:

1
First install the ksdiff command-line tool
2
Open the ~/.hgrc file
3
Add and save the following:
[extensions]
hgext.extdiff =
[extdiff]
cmd.ksdiff = /usr/local/bin/ksdiff
opts.ksdiff = --changeset --wait --filelist
[ui]
merge = Kaleidoscope
[merge-tools]
Kaleidoscope.executable = /usr/local/bin/ksdiff
Kaleidoscope.args = --merge --output $output --base $base -- $local $other
Usage example:
hg ksdiff
hg merge
P4 Command-Line Integration

To integrate Kaleidoscope directly with Perforce, you can use the p4 command line tool. To set up the command line tool, follow these instructions:

1
First install the ksdiff command-line tool
2
Open your shell profile
3
Add and save the following:
export P4DIFF=/usr/local/bin/ksdiff
export P4MERGE=/usr/local/bin/ksdiff
Usage example:
p4 resolve
p4 diff
P4V GUI Integration

To integrate Kaleidoscope directly with Perforce, you can use the P4V GUI application. To set up P4V, follow these instructions:

1
First install the ksdiff command-line tool
2
Open P4V
3
Open preferences
4
Select Diff
Set Location to:
/usr/local/bin/ksdiff
Set Arguments to:
%1 %2
5
Select Merge
Set Location to:
/usr/local/bin/ksdiff
Set Arguments to:
--merge --output %r --base %b -- %1 %2
Bazaar Command-Line Integration

To integrate Kaleidoscope directly with Bazaar, set it up as your default diff and merge tool, or configure it without making it the default. To use it as an external merge tool, you'll need qbzr and Bazaar 2.4 or later. To make Kaleidoscope your default diff and merge tool, follow these steps:

1
First install the ksdiff command-line tool
2
Make Kaleidoscope Bazaar's default diff and merge tool
Usage example:
bzr diff

To set up Kaleidoscope as a diff/merge tool without making it the default:

1
First install the ksdiff command-line tool
2
Make Kaleidoscope one of Bazaar's diff/merge tools
Diff usage example:
bzr ksdiff
Merge usage example:
bzr qconflicts
TextMate Subversion Integration

To use Kaleidoscope as TextMate's Subversion diff tool, follow these instructions:

1
First install the ksdiff command-line tool
2
Open TextMate and go to TextMate's preferences
3
Go to the “Variables” tab (TextMate 1 users, go to “Advanced” tab, and then to “Shell Variables”)
4
Create a new variable by pressing the plus button
5
Enter the following variable name:
TM_SVN_DIFF_CMD
6
Enter the following value:
/usr/local/bin/ksdiff
Usage example:

Select a changed file in the file shelf. Press ⌃⇧A (control + shift + A) to pop up the Subversion Bundle commands. Select "Diff with Working Copy". Your changes should now be displayed in Kaleidoscope.

TextMate Mercurial Integration

To use Kaleidoscope as TextMate's Mercurial diff tool, follow these instructions:

1
First install the ksdiff command-line tool
2
Open TextMate and go to TextMate's preferences
3
Go to the “Variables” tab (TextMate 1 users, go to “Advanced” tab, and then to “Shell Variables”)
4
Create a new variable by pressing the plus button
5
Enter the following variable name:
TM_HG_EXT_DIFF
6
Enter the following value:
/usr/local/bin/ksdiff
7
Create a new variable by pressing the plus button
8
Enter the following variable name:
TM_HG
9
Enter the following value:
/usr/local/bin/hg
Usage example:

Select a changed file in the file shelf. Press ⌃⇧M (control + shift + M) to pop up the Mercurial Bundle commands. Select "Diff with Working Copy". Your changes should now be displayed in Kaleidoscope.