Skip to main content

Add your description here

Project description

orun-py

A Python CLI Agent wrapper for Ollama. It combines chat capabilities with autonomous tools (file I/O, shell execution, web fetching), built-in screenshot analysis, and 200+ prompt/strategy templates.

Features

  • Autonomous Agent: Can read/write files, run shell commands, search the web, and fetch URLs (with user confirmation).
  • Web Search: Google Custom Search API (with DuckDuckGo fallback) for internet searches.
  • URL Fetching: Jina AI Reader converts web pages to clean markdown optimized for LLM analysis.
  • arXiv Integration: Search and retrieve academic papers directly from arXiv.
  • Screenshot Analysis: Auto-detects and attaches recent screenshots from your Pictures folder.
  • Prompt Templates: 200+ pre-defined templates for coding, analysis, writing, and more.
  • Strategy Templates: Chain-of-Thought, Tree-of-Thought, and other reasoning strategies.
  • Conversation History: SQLite-backed history lets you resume any session.
  • Model Management: Sync models from Ollama and manage shortcuts.

Installation

pip install orun-py

Usage

Agent & Query

Ask a question or give a task. The AI will use tools if necessary.

orun "Why is the sky blue?"
orun "Scan the current directory and list all Python files"
orun "Read src/main.py and explain how it works"

Interactive Chat

Start a continuous session:

orun chat

Start chat with a specific model:

orun chat -m coder

Prompt & Strategy Templates

Use a prompt template:

orun "Review this code" -p review_code
orun "Analyze this paper" -p analyze_paper

Use a reasoning strategy:

orun "Explain step by step" -s cot
orun "Explore multiple approaches" -s tot

Combine prompt and strategy:

orun "Debug this issue" -p analyze_incident -s cod

List available templates:

orun prompts      # List all prompt templates
orun strategies   # List all strategy templates

In chat mode, apply templates dynamically:

/prompt analyze_paper
/strategy cot

Analyze Screenshots

Attach the most recent screenshot:

orun "What is this error?" -i

Attach the last 3 screenshots:

orun "Compare these images" -i 3x

arXiv Integration

Search for academic papers and let the AI analyze them:

orun "Find recent papers about transformers in NLP"
orun "Get details about arXiv paper 1706.03762"
orun "Search for papers by Geoffrey Hinton and summarize his latest work"

In interactive chat, use the /arxiv command for direct access:

orun chat
> /arxiv quantum computing
> /arxiv 1706.03762
> /arxiv https://arxiv.org/abs/2301.07041

The AI can autonomously:

  • Search arXiv by keywords, topics, or authors
  • Retrieve full paper details (title, abstract, authors, PDF links)
  • Analyze and summarize research papers
  • Find relevant literature for your projects

The /arxiv command automatically detects whether you're searching or requesting a specific paper, fetches the data, and provides AI analysis without showing raw output.

Web Search & URL Fetching

Search the web or fetch specific web pages in interactive chat:

Web Search (Google/DuckDuckGo):

orun chat
> /search Python asyncio tutorials
> /search latest news about AI

Fetch URL (via Jina AI Reader):

orun chat
> /fetch https://example.com
> /fetch github.com/user/repo

Configure Google Custom Search API (optional):

# Get API key from https://console.cloud.google.com/
# Get CSE ID from https://programmablesearchengine.google.com/
orun config-search YOUR_API_KEY YOUR_CSE_ID

# View current configuration
orun config-search

Features:

  • Web Search: Google Custom Search API (100 free queries/day) with DuckDuckGo fallback
  • URL Fetching: Jina AI Reader converts pages to clean markdown optimized for LLM analysis
  • Automatic Fallback: If Google quota exceeded, automatically uses DuckDuckGo
  • AI Analysis: All results are analyzed and summarized by the AI

The AI can also autonomously call web_search() and fetch_url() tools during conversations.

Model Management

Sync models from Ollama:

orun refresh

List available models:

orun models

Set default active model:

orun set-active llama3.1

Create a shortcut:

orun shortcut llama3.1:8b l3

Conversation History

List recent conversations:

orun history

Continue a conversation by ID:

orun c 1

Continue the last conversation:

orun last

Requirements

  • Python 3.12+
  • Ollama running locally

Project details


Download files

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

Source Distribution

orun_py-1.2.5.tar.gz (486.6 kB view details)

Uploaded Source

Built Distribution

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

orun_py-1.2.5-py3-none-any.whl (547.3 kB view details)

Uploaded Python 3

File details

Details for the file orun_py-1.2.5.tar.gz.

File metadata

  • Download URL: orun_py-1.2.5.tar.gz
  • Upload date:
  • Size: 486.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for orun_py-1.2.5.tar.gz
Algorithm Hash digest
SHA256 c49628a4acc75b0968b1aea05fbf7062c67297d57cdc89b4b056703ecb11c8e9
MD5 9dacf5f5061f4daf918dd9616f1fd0bf
BLAKE2b-256 0141e4f4bc9381ed554cce8bfcce1f97eaf3ff23d2e969b24a470ef4301499e0

See more details on using hashes here.

File details

Details for the file orun_py-1.2.5-py3-none-any.whl.

File metadata

  • Download URL: orun_py-1.2.5-py3-none-any.whl
  • Upload date:
  • Size: 547.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for orun_py-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d04f22f95bab8263146dc833f2b18774bd104c4b8138c5560ebcdd01cf2ef1c8
MD5 3cfa2967dc0c87696c03b4adc8b74c0e
BLAKE2b-256 f5fe5c9e776668ad3c516a530de0b3aa7317cf6b2693ad9a9a468c8a84cdb4e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page