Skip to main content
ONI Logo

ONI

Single-command context aggregation for LLMs, straight to your macOS clipboard.


ONI Demo

CLI that makes a single context widow from your files and sends it directly to your macOS clipboard.


Key Features

  • Direct to Clipboard: Uses macOS pbcopy under the hood to send your aggregated code context straight to your clipboard.
  • Smart Filtering: Ignores binary files and junk directories (.git, node_modules, .venv, build caches) automatically.
  • Syntax Awareness: Maps file extensions to Markdown code fences (py, ts, rs, go, sql, etc.) for LLM legibility.
  • Interactive Prompting: If run with no arguments, Oni prompts for target glob patterns.
  • Size Safeguards: Skips oversized source files with customizable thresholds.

Installation

Ensure you have Python 3.9+ installed:


Quick Usage

Parse everything in the current directory

oni

If called without patterns, Oni triggers an interactive prompt defaulting to **/*.

Parse specific directories or file globs

# Ingest entire src directory
oni src/**/*

# Combine specific file types
oni "src/**/*.py" "config/*.json"

# Ingest explicit targets
oni main.py pyproject.toml docs/README.md

CLI Options Reference

Usage: oni [OPTIONS] [PATTERNS]...
Flag / Option Short Default Description
[PATTERNS]... None (Prompts) File paths or glob patterns (e.g. src/**/*.py, main.py).
--meta / --raw --meta Includes repository file context header and aggregate statistics.
--max-kb -m 512 Upper size limit in KB per file. Larger files are spat out.
--preview -p False Prints the first 2,500 characters of the prompt to terminal.
--help Displays the command-line usage and exits.

Examples with Flags

Omit Metadata Header

Generate pure code fence blocks with no introductory repository summaries:

oni "src/**/*.rs" --raw

Adjust Max File Size Threshold

Lower file size limit to 200 KB and inspect the payload before pasting:

oni "**/*.ts" --max-kb 200 --preview

Automatic Exclusions

Oni ignores the following paths during scanning:

.git          node_modules     __pycache__
.venv         venv             .pytest_cache
.mypy_cache   dist             build
.DS_Store     .idea            .vscode

Binary files are detected via null-byte inspection and excluded from the output buffer.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oni_cli-1.0.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file oni_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: oni_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.7

File hashes

Hashes for oni_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e3fd3f14409d2497d68481f1897a2012453311deb95c47d0800e8c7e1fbd0f2
MD5 cbd7fdd05d69533c6db1d66774f71436
BLAKE2b-256 e7b016b84360cbf109cb1e772f62faedd49356a971b1249708c7033b3c2e9fca

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page