Your first context starts here.

Install OneSource on Windows, macOS or Linux. Verify your installation, create your first AI context, update the CLI and troubleshoot common issues.

Before you install

Choose one installation method below. For the network installers you need access to GitHub and its API; macOS/Linux also need Bash and curl, Windows needs PowerShell. Prebuilt assets cover Windows x86_64, Linux x86_64 GNU, and macOS Intel/Apple Silicon. Other platforms should use Cargo with Rust and a native linker. After installing, verify both the command path and version before bundling a project.

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.

First run cargo --version. A cargo version line confirms the tool is available; if the command is missing, install Rust using the link above and open a new terminal. Only then run cargo install onesource and wait for installation to finish.

Rust installation instructions ↗
Terminal
cargo --version

Cargo
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.

Choose your OS and architecture in the table, download that named asset (not the source archive), and put it in a folder you can write to. On macOS/Linux, use uname -m to distinguish x86_64 from arm64/aarch64; then rename as described below. Running the relative path verifies the download before you decide whether to add it to PATH.

Open GitHub Releases ↗ View release notes ↗
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

Expect a version line beginning with onesource and a help screen showing Usage and Options. On macOS/Linux, command -v onesource should point to the install location; on Windows use Get-Command onesource. If a different location is selected, fix PATH or run the intended executable by its full path. These checks identify a working CLI; the following preview checks actual bundling.

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 current working directory, 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 ↗

Set up PATH

Windows installer uses %LOCALAPPDATA%\Programs\onesource and updates User PATH; restart your terminal. Unix installer moves to /usr/local/bin, requesting sudo if needed. Cargo uses ~/.cargo/bin. For manual installs, add the containing directory to PATH; Unix users can place the binary in ~/.local/bin and add export PATH="$HOME/.local/bin:$PATH" to the shell startup file. On Windows add the folder in Environment Variables → User Path, then open a new terminal. Run command -v onesource or Get-Command onesource to verify which binary is selected.