docs(readme): added docs for Python tool, Todo tool, CLI subcommands, and Bedrock provider
- Added documentation for Python tool with IPython kernel integration. - Added documentation for Todo tool with task tracking capabilities. - Added documentation for new CLI subcommands (config, setup) and xhigh thinking level. - Updated AI package description to include Bedrock provider.
This commit is contained in:
@@ -78,6 +78,23 @@ Download binaries directly from [GitHub Releases](https://github.com/can1357/oh-
|
||||
|
||||
---
|
||||
|
||||
## + Python Tool (IPython Kernel)
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/can1357/oh-my-pi/blob/main/assets/python.webp?raw=true" alt="python">
|
||||
</p>
|
||||
|
||||
Execute Python code with a persistent IPython kernel and 30+ shell-like helpers:
|
||||
|
||||
- **Streaming output**: Real-time stdout/stderr with image and JSON rendering
|
||||
- **Prelude helpers**: `cat()`, `sed()`, `rsed()`, `find()`, `grep()`, `batch()`, `sh()`, `run()` and more
|
||||
- **Git utilities**: `git_status()`, `git_diff()`, `git_log()`, `git_show()` for repository operations
|
||||
- **Line operations**: `extract_lines()`, `delete_lines()`, `insert_lines()`, `lines_matching()` for text manipulation
|
||||
- **Shared gateway**: Resource-efficient kernel reuse across sessions (`python.sharedGateway` setting)
|
||||
- **Custom modules**: Load extensions from `.omp/modules/` and `.pi/modules/` directories
|
||||
- **Rich output**: Supports `display()` for HTML, Markdown, images, and interactive JSON trees
|
||||
- Install dependencies via `omp setup python`
|
||||
|
||||
## + LSP Integration (Language Server Protocol)
|
||||
|
||||
<p align="center">
|
||||
@@ -151,6 +168,16 @@ Configure different models for different purposes with automatic discovery:
|
||||
- CLI args (`--smol`, `--slow`) and env vars (`OMP_SMOL_MODEL`, `OMP_SLOW_MODEL`)
|
||||
- Configure via `/model` selector with keybindings (Enter=default, S=smol, L=slow)
|
||||
|
||||
## + Todo Tool (Task Tracking)
|
||||
|
||||
Structured task management with persistent visual tracking:
|
||||
|
||||
- **`todo_write` tool**: Create and manage task lists during coding sessions
|
||||
- **Persistent panel**: Todo list displays above the editor with real-time progress
|
||||
- **Task states**: `pending`, `in_progress`, `completed` with automatic status updates
|
||||
- **Completion reminders**: Agent warned when stopping with incomplete todos (`todoCompletion` setting)
|
||||
- **Toggle visibility**: `Ctrl+T` expands/collapses the todo panel
|
||||
|
||||
## + Ask Tool (Interactive Questioning)
|
||||
|
||||
<p align="center">
|
||||
@@ -161,6 +188,7 @@ Structured user interaction with typed options:
|
||||
|
||||
- **Multiple choice questions**: Present options with descriptions for user selection
|
||||
- **Multi-select support**: Allow multiple answers when choices aren't mutually exclusive
|
||||
- **Multi-part questions**: Ask multiple related questions in sequence via `questions` array parameter
|
||||
|
||||
## + Custom TypeScript Slash Commands
|
||||
|
||||
@@ -284,6 +312,7 @@ Modern terminal interface with smart session management:
|
||||
- **LSP status**: Shows which language servers are active and ready
|
||||
- **Hotkeys**: `?` displays shortcuts when editor empty
|
||||
- **Persistent prompt history**: SQLite-backed with `Ctrl+R` search across sessions
|
||||
- **Grouped tool display**: Consecutive Read calls shown in compact tree view
|
||||
- **Emergency terminal restore**: Crash handlers prevent terminal corruption
|
||||
|
||||
## + Edit Fuzzy Matching
|
||||
@@ -296,6 +325,9 @@ Handles whitespace and indentation variance automatically:
|
||||
|
||||
## ... and many more
|
||||
|
||||
- **`omp config` subcommand**: Manage settings from CLI (`list`, `get`, `set`, `reset`, `path`)
|
||||
- **`omp setup` subcommand**: Install optional dependencies (e.g., `omp setup python` for Jupyter kernel)
|
||||
- **`xhigh` thinking level**: Extended reasoning for Anthropic models with increased token budgets
|
||||
- **Background mode**: `/background` detaches UI and continues agent execution
|
||||
- **Completion notifications**: Configurable bell/OSC99/OSC9 when agent finishes
|
||||
- **Structured git tool**: Safety guards, caching, GitHub operations with typed output
|
||||
@@ -314,7 +346,7 @@ Handles whitespace and indentation variance automatically:
|
||||
|
||||
| Package | Description |
|
||||
| ------------------------------------------------------ | ----------------------------------------------------------------------------- |
|
||||
| **[@oh-my-pi/pi-ai](packages/ai)** | Multi-provider LLM client (Anthropic, OpenAI, Gemini, Cursor, Codex, Copilot) |
|
||||
| **[@oh-my-pi/pi-ai](packages/ai)** | Multi-provider LLM client (Anthropic, OpenAI, Gemini, Bedrock, Cursor, Codex, Copilot) |
|
||||
| **[@oh-my-pi/pi-agent-core](packages/agent)** | Agent runtime with tool calling and state management |
|
||||
| **[@oh-my-pi/pi-coding-agent](packages/coding-agent)** | Interactive coding agent CLI |
|
||||
| **[@oh-my-pi/pi-git-tool](packages/git-tool)** | Structured Git tool with safety guards and typed output |
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
@@ -10,26 +10,6 @@ import { AgentStorage } from "./core/agent-storage";
|
||||
import type { AuthCredential } from "./core/auth-storage";
|
||||
import { logger } from "./core/logger";
|
||||
|
||||
/**
|
||||
* Migrate PI_* environment variables to OMP_* equivalents.
|
||||
* If PI_XX is set and OMP_XX is not, set OMP_XX to PI_XX's value.
|
||||
* This provides backwards compatibility for users with existing PI_* env vars.
|
||||
*
|
||||
* @returns Array of PI_* env var names that were migrated
|
||||
*/
|
||||
export function migrateEnvVars(): string[] {
|
||||
const migrated: string[] = [];
|
||||
for (const [key, value] of Object.entries(process.env)) {
|
||||
if (key.startsWith("PI_") && value !== undefined) {
|
||||
const ompKey = `OMP_${key.slice(3)}`; // PI_FOO -> OMP_FOO
|
||||
if (process.env[ompKey] === undefined) {
|
||||
process.env[ompKey] = value;
|
||||
migrated.push(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
return migrated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrate legacy oauth.json and settings.json apiKeys to agent.db.
|
||||
@@ -199,24 +179,12 @@ export async function runMigrations(_cwd: string): Promise<{
|
||||
migratedAuthProviders: string[];
|
||||
deprecationWarnings: string[];
|
||||
}> {
|
||||
// First: migrate env vars (before anything else reads them)
|
||||
const migratedEnvVars = migrateEnvVars();
|
||||
|
||||
// Then: run data migrations
|
||||
const migratedAuthProviders = migrateAuthToAgentDb();
|
||||
migrateSessionsFromAgentRoot();
|
||||
migrateToolsToBin();
|
||||
|
||||
// Collect deprecation warnings
|
||||
const deprecationWarnings: string[] = [];
|
||||
if (migratedEnvVars.length > 0) {
|
||||
for (const envVar of migratedEnvVars) {
|
||||
const ompVar = `OMP_${envVar.slice(3)}`;
|
||||
deprecationWarnings.push(`${envVar} is deprecated. Use ${ompVar} instead.`);
|
||||
}
|
||||
}
|
||||
|
||||
return { migratedAuthProviders, deprecationWarnings };
|
||||
return { migratedAuthProviders, deprecationWarnings: [] };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user