eyeball
Code introspection CLI for LLM-assisted development with structured JSON output.
eyeball gives LLMs "eyes" to see into your code - exploring modules, verifying API usage, running quick probes, and analyzing dependencies.
Installation
# Install as a dev dependency
pip install jaymd96-eyeball
# Or with optional dependencies for full functionality
pip install "jaymd96-eyeball[dev,toml]"
Quick Start
# Discover all public items in a module
eyeball discover mypackage.models
# Inspect a class or function
eyeball inspect mypackage.models:User
# Run a function with arguments
eyeball run mypackage.utils:process_data --kwargs '{"input": "test"}'
# Execute arbitrary code
eyeball exec 'from mypackage import VERSION; print(VERSION)'
# Run tests with structured output
eyeball test mypackage.models
# Quick verification probe
eyeball probe "assert 1 + 1 == 2"
# Analyze dependencies of a function/class
eyeball deps mypackage.models:User
# Find all callers of a target
eyeball callers mypackage.models:User
# Get API documentation for third-party libraries
eyeball api requests:get
Commands
| Command | Description |
|---|---|
discover |
List all public classes and functions in a module |
inspect |
Get detailed information about a module, class, or function |
run |
Execute a function or instantiate a class |
exec |
Execute arbitrary Python code |
test |
Run pytest with structured JSON output |
source |
Show source code of a target |
reload |
Hot-reload a module after changes |
list-tests |
List all test files in the project |
probe |
Run quick verification probes (lightweight testing) |
fixtures |
List available fixtures for probes |
deps |
Analyze dependencies of a function/class using AST |
callers |
Find all references to a target (reverse dependencies) |
module-deps |
Analyze all imports in a module |
api |
Get comprehensive API docs (works on third-party libs) |
search-api |
Search for items in a module by name |
help-json |
Output help as JSON for LLM consumption |
Configuration
Configure eyeball via pyproject.toml:
[tool.eyeball]
package_name = "mypackage" # Auto-detected from project.name
tests_dir = "tests" # Test directory (default: "tests")
fixtures_module = "mypackage.fixtures" # Custom fixtures module
Or use a standalone eyeball.toml file with the same options.
Custom Fixtures
Create custom fixtures for your probes:
# mypackage/fixtures.py
from eyeball.harness import Fixtures
@Fixtures.register("database")
def database_fixture():
"""In-memory database for testing."""
from mypackage.db import create_test_db
db = create_test_db()
return {
"db": db,
"create_user": db.create_user,
"get_user": db.get_user,
}
@Fixtures.register("sample_data")
def sample_data_fixture():
"""Sample test data."""
return {
"users": [{"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}],
"products": [{"id": 1, "name": "Widget", "price": 9.99}],
}
Then configure:
[tool.eyeball]
fixtures_module = "mypackage.fixtures"
Use in probes:
eyeball probe --fixture database "assert db.get_user(1) is not None"
eyeball probe --fixture sample_data "assert len(users) == 2"
JSON Output
All commands output JSON for easy parsing by LLMs and scripts:
# Pretty-print with -p flag
eyeball -p inspect mypackage.models:User
{
"status": "success",
"target": "mypackage.models:User",
"type": "class",
"class_name": "User",
"attributes": [
{"name": "id", "type": "int", "required": true},
{"name": "name", "type": "str", "required": true},
{"name": "email", "type": "str", "required": false}
],
"methods": [...]
}
API Introspection
Explore third-party libraries to verify correct usage:
# Search for functions in a library
eyeball -p search-api requests get
{
"status": "success",
"module": "requests",
"query": "get",
"results": [
{"name": "get", "type": "function", "signature": "(url, params=None, **kwargs)", "summary": "Sends a GET request."}
]
}
# Get full API documentation
eyeball -p api requests:get
{
"status": "success",
"target": "requests:get",
"type": "function",
"name": "get",
"signature": "(url, params=None, **kwargs)",
"parameters": [
{"name": "url", "required": true, "kind": "POSITIONAL_OR_KEYWORD", "description": "URL for the new Request object."},
{"name": "params", "required": false, "default": "None", "description": "Dictionary or bytes to send in the query string."},
{"name": "kwargs", "required": false, "kind": "VAR_KEYWORD", "description": "Optional arguments that request takes."}
],
"return_type": "Response",
"summary": "Sends a GET request.",
"source_available": true,
"source_preview": "def get(url, params=None, **kwargs):\n ..."
}
Works on any importable Python code - your project, stdlib, or third-party packages.
Dependency Analysis
Analyze what a function or class depends on:
eyeball -p deps mypackage.models:User
{
"status": "success",
"target": "mypackage.models:User",
"target_type": "class",
"imports": [
{"module": "dataclasses", "name": "dataclass"},
{"module": "typing", "name": "Optional"}
],
"calls": [
{"name": "field", "is_method": false, "args_count": 0, "kwargs_count": 1}
],
"instantiations": [
{"name": "UUID", "is_method": false}
],
"summary": {
"imports": 2,
"calls": 3,
"instantiations": 1
}
}
Find all code that uses a target:
eyeball -p callers mypackage.models:User
{
"status": "success",
"target": "mypackage.models:User",
"callers": [
{
"file": "mypackage/services/user_service.py",
"references": [
{"type": "import_from", "line": 3, "text": "from mypackage.models import User"},
{"type": "name", "line": 15, "context": "load"}
]
}
],
"total_files": 5,
"total_references": 12
}
Analyze module-level imports:
eyeball -p module-deps mypackage.models
Use with LLMs
eyeball is designed for LLM-assisted development workflows:
- Exploration: LLMs can use
discoverandinspectto understand your codebase - Verification: Quick
probecommands let LLMs verify their understanding - Testing: Structured test output helps LLMs understand test failures
- Hot-reloading:
reloadenables rapid iteration without restarts - Dependency Analysis:
depsandcallershelp understand code relationships - API Introspection:
apiandsearch-apilet LLMs verify correct library usage
Built-in Fixtures
| Fixture | Description | Provides |
|---|---|---|
mocks |
Mocking utilities | Mock, MagicMock, patch |
async_helpers |
Async testing | asyncio, run_async |
temp_files |
Temporary files | temp_dir, temp_file, Path |
License
MIT
Metadata
Release files for jaymd96-eyeball 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jaymd96_eyeball-0.1.0.tar.gz | 27.4 kB | Without provenance | Details for jaymd96_eyeball-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jaymd96_eyeball-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for jaymd96_eyeball-0.1.0-py3-none-any.whl |
Total release size: 60.5 kB
Release files / jaymd96_eyeball-0.1.0.tar.gz
| Download URL | jaymd96_eyeball-0.1.0.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
94a941525caa0f7179c26ac2588a1192b9430f2d296b0f1fb1c23bc373802413
|
|
BLAKE2b-256 checksum How to use checksums |
485d7670c2f17fcb51a9d4c757bfd0acedca05456b044be068f501d44e6ac674
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.3 cpython/3.13.0 HTTPX/0.28.1
|
Release files / jaymd96_eyeball-0.1.0-py3-none-any.whl
| Download URL | jaymd96_eyeball-0.1.0-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bd7e4375f0057817789f4363bde9817eb9ad71f364dc8a94f8b2f407325b9fd
|
|
BLAKE2b-256 checksum How to use checksums |
e9ea6a6708331aae65d6e550206f4f96eba40f7d07f44ce1e4a9865b138e9bc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.3 cpython/3.13.0 HTTPX/0.28.1
|
Security for jaymd96-eyeball 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.