OneSource Back to overview

GET STARTED / INSTALLATION

Your first context starts here.

Choose your platform below. Install the CLI, check that it works, then package a project into reusable AI context. No Rust installation is required when using a prebuilt binary.

01 /

Windows

Open PowerShell from the Start menu. The prebuilt Windows executable targets x86_64. Run the following command with an internet connection.

PowerShell
irm https://raw.githubusercontent.com/TW-RF54732/onesource/main/install.ps1 | iex

The installer downloads the latest GitHub release into %LOCALAPPDATA%\Programs\onesource and adds that folder to your user PATH. Close and reopen your terminal, then follow “Verify installation” below.

02 /

macOS

Open Terminal. With curl and an internet connection available, run the command below. The installer selects the Intel or Apple Silicon binary automatically.

Bash
curl -sSL https://raw.githubusercontent.com/TW-RF54732/onesource/main/install.sh | bash

The installer places onesource in /usr/local/bin. It may ask for your sudo password to move the executable into that folder. Next, verify the installation below.

03 /

Linux

Open a terminal with Bash and curl available. The released Linux binary targets x86_64 with GNU libc. For other architectures, use Cargo to build for your machine instead of running the network installer.

Bash
curl -sSL https://raw.githubusercontent.com/TW-RF54732/onesource/main/install.sh | bash

The installer places onesource in /usr/local/bin. It may ask for your sudo password to move the executable into that folder. Next, verify the installation below.

04 /

Install with Cargo

If Rust and Cargo are installed, build and install OneSource for your machine. A working native linker and the build prerequisites for your platform are also required.

Rust installation instructions ↗
Terminal
cargo --version
cargo install onesource

Cargo normally installs commands in ~/.cargo/bin (Windows: %USERPROFILE%\.cargo\bin). With a custom CARGO_HOME, use its bin folder instead. Make sure that folder is on PATH; reopen the terminal after installing Rust.

05 /

Download a portable executable

Open GitHub Releases and download the asset matching your platform. These are executables, not archives. On macOS or Linux, rename the downloaded file to onesource; on Windows, keep onesource.exe.

Open GitHub Releases ↗
Download a portable executable
PlatformDownload asset
Windows x86_64onesource.exe
Linux x86_64 (GNU)onesource-linux
macOS Intelonesource-macos
macOS Apple Silicononesource-macos-arm64

In the folder containing the downloaded executable, run the matching commands below. Portable executables do not modify PATH; use ./onesource or .\onesource.exe for subsequent commands, or add their folder to PATH yourself.

macOS / Linux
chmod +x onesource
./onesource --version

Windows · PowerShell
.\onesource.exe --version

06 /

Verify installation

In a new terminal, check the installed version and available commands. A version beginning with “onesource” and the help text confirm that the executable is available. The version number depends on the release you installed.

Terminal
onesource --version
onesource --help

07 /

Create your first context

Replace my-project with your project folder. Preview the selected files and token estimate, then create the output file.

Terminal
cd my-project
onesource --dry-run
onesource

OneSource creates <project-name>.onesource in the scanned project folder, containing a directory tree and selected file contents. To copy context without creating a file, run the following command.

Terminal
onesource --copy

Packaging runs locally and does not upload your code. Review the output before sharing it with AI. Token counts are estimates.

08 /

Update OneSource

For a compatible prebuilt installation, download the latest GitHub release and replace the current executable with the built-in update command. On Windows, replacement finishes after the process exits; verify in a new terminal.

Terminal
onesource update
onesource --version

For Cargo installations, especially on architectures without a matching release asset, rebuild using Cargo. This preserves the native build for your platform.

Cargo
cargo install onesource --force
onesource --version

If updating fails because the installation folder is not writable, rerun the original installer or replace a portable executable in a folder you can write to.

09 /

Troubleshooting

“Command not found” or “not recognized”

Reopen the terminal first. Check that the installation folder listed above is on PATH. In PowerShell, use Get-Command onesource; on macOS/Linux, use command -v onesource. A portable executable needs its relative or absolute path. If multiple installations exist, these commands show which one is being used.

Permission denied

For a manually downloaded macOS/Linux executable, run chmod +x onesource in its folder. Installing into /usr/local/bin may require sudo. If you cannot write to the system folder, keep a portable executable in a folder you own.

Download failed or asset missing

Check access to GitHub and your network connection. GitHub API requests may be rate limited; retry later or download the matching asset directly from Releases.

Executable format or architecture error

Check the platform table and download the matching executable. On macOS/Linux, uname -m shows the machine architecture. For platforms without a matching asset, build with Cargo and also update through Cargo.

Clipboard unavailable

Clipboard access may be unavailable in remote terminals or environments without a desktop session. Run onesource without --copy to save a file instead.

Read the full documentation ↗