AIPy integrates a complete Python environment with a Large Language Model (LLM). You type a command, hit enter, and see the result immediately. It functions exactly like the Python REPL you already know, but with the added capability to understand and act on plain English instructions.
If you work with data, this workflow will feel familiar:
AIPy removes the friction from this process. By staying entirely within the terminal, you simply describe the task you want to complete. AIPy writes the necessary code and executes it on the spot.
What Changes
AIPy (executed as aipython) is a Python interpreter with an embedded LLM.
Both approaches share a single session. You can let the AI process a large CSV and then immediately inspect the resulting DataFrame using a standard command like df.head().
Task Mode Designed for users who want to focus on the result rather than the implementation. Just state the job and let the tool handle the rest.
uv run aipy
>>> Get the latest posts from Reddit r/LocalLLaMA
......
>>> /done
Alternatively, install it globally for quick access:
pip install aipyapp
aipy
Python Mode
Built for developers who prefer working within a REPL environment. Use the --python flag to enable this mode.
>>> ai("Get the title of Google's homepage")
The tool also manages dependencies automatically. If the LLM determines that a library like psutil is required, it will prompt you for permission to install it.
>>> ai("Use psutil to list all processes on MacOS")
📦 LLM requests to install third-party packages: ['psutil']
If you agree and have installed, please enter 'y [y/n] (n): y
To get started, set up an aipy.toml configuration file to manage your LLM settings.
[llm.deepseek]
type = "deepseek"
api_key = "Your DeepSeek API Key"
enable = true
default = true
The ai Object
ai(instruction): Initiates an automation loop that runs until the LLM completes the task.ai.save(path): Exports the current session as an SVG or HTML file.ai.llm: Provides direct access to the LLM client.ai.runner: Provides access to the execution context.The LLM Object
history: Contains the full message thread for the current session.The Runner Object
globals / locals: The Python namespaces where the code is executed. This allows you to manually inspect variables after the AI has finished its task.The runtime Object
This object is utilized internally by LLM-generated code.
install_packages(packages): Prompts the user to install any missing libraries.getenv(name, desc=None): Retrieves environment variables safely.display(path=None, url=None): Renders images directly within the terminal.
MuMuAINovel: Write Novels With AI, Minus the Clutter
AI Podcast Transcriber Turns Audio Into Clean Text and Smart Summaries
Open Source 3D Tetris in Your Browser With React and Three.js
AhaSpeed VPN Review: High-Speed Performance, No Ads, and Unlimited Bandwidth
Lens Desktop Installation Guide: macOS, Windows, Linux
Strapi Setup Guide: Local Development & Cloud Deployment
Agentic-Trading: Multi-Agent Simulator with A2A Protocol and ADK
Agents From Scratch: AI Email Assistant with Human-in-the-Loop Approval
Twenty CRM Local Setup and Docker Deployment Guide for Developers
KVoiceWalk: Clone Any Voice for Kokoro TTS Using Random Walks
Build Web Apps Using Only SQL: A Guide to SQLPage
ALLinSSL: Automated SSL Certificate Lifecycle Management