axio-tools-local
Core filesystem and shell tool handlers for axio.
Gives your agent the ability to read, write, and patch files, run shell commands, execute Python snippets, and browse directory trees - the essential toolkit for a coding assistant.
Tools
| Function | Entry point | Description |
|---|---|---|
shell |
shell |
Run any shell command with configurable timeout, cwd, and stdin |
run_python |
run_python |
Execute a Python snippet in a subprocess |
read_file |
read_file |
Read a file, optionally with line range |
write_file |
write_file |
Write or overwrite a file |
patch_file |
patch_file |
Replace a range of lines in an existing file (1-indexed, both ends inclusive) |
list_files |
list_files |
List files in a directory |
Installation
pip install axio-tools-local
Usage
Standalone (without TUI)
from axio.agent import Agent
from axio.context import MemoryContextStore
from axio_transport_openai import OpenAITransport, OPENAI_MODELS
from axio_tools_local.shell import shell
from axio_tools_local.read_file import read_file
from axio_tools_local.write_file import write_file
from axio_tools_local.list_files import list_files
from axio.tool import Tool
tools = [
Tool(name="shell", handler=shell),
Tool(name="read_file", handler=read_file),
Tool(name="write_file", handler=write_file),
Tool(name="list_files", handler=list_files),
]
agent = Agent(
system="You are a coding assistant with access to the local filesystem.",
tools=tools,
transport=OpenAITransport(api_key="sk-...", model=OPENAI_MODELS["gpt-4o"]),
)
Via plugin (with axio-tui)
pip install "axio-tui[local]"
uv run axio # shell, read_file, write_file, patch_file, list_files, run_python appear automatically
Tool details
shell
import asyncio
from axio_tools_local.shell import shell
asyncio.run(shell(command="echo hello", cwd=".", timeout=30))
asyncio.run(shell(command="cat", stdin="hello"))
Parameters: command: str, timeout: int = 5, cwd: str = ".", stdin: str | None = None
patch_file
Replaces a range of lines in an existing file - safe for surgical edits without
rewriting the whole file. Lines are 1-indexed and both from_line and to_line
are inclusive. To insert without deleting any existing lines, set
to_line = from_line - 1. Always read the file first with line_numbers=True to
get correct line numbers.
import asyncio
import tempfile, os
from axio_tools_local.patch_file import patch_file
with tempfile.NamedTemporaryFile(mode="w", suffix=".py", delete=False) as f:
f.write("line1\nline2\nline3\n")
name = f.name
# Replace line 2
asyncio.run(patch_file(file_path=name, from_line=2, to_line=2, content="replaced\n"))
os.unlink(name)
Parameters: file_path: str, from_line: int, to_line: int, content: str, mode: int = 0o644
list_files
import asyncio
from axio_tools_local.list_files import list_files
asyncio.run(list_files(directory="."))
run_python
import asyncio
from axio_tools_local.run_python import run_python
asyncio.run(run_python(code="import sys; print(sys.version)"))
Plugin registration
[project.entry-points."axio.tools"]
shell = "axio_tools_local.shell:shell"
run_python = "axio_tools_local.run_python:run_python"
write_file = "axio_tools_local.write_file:write_file"
patch_file = "axio_tools_local.patch_file:patch_file"
read_file = "axio_tools_local.read_file:read_file"
list_files = "axio_tools_local.list_files:list_files"
Part of the axio ecosystem
axio · axio-tools-mcp · axio-tools-docker · axio-tui
License
MIT
Local instruction provider
LocalToolProvider owns filesystem tools, scoped AGENTS.md loading, and local
Agent Skills discovery. It implements the axio.tools.providers contract.
Applications supply directories explicitly and bind each agent separately.
import asyncio
from pathlib import Path
from tempfile import TemporaryDirectory
from axio import Agent, MemoryContextStore
from axio.testing import StubTransport, make_text_response
from axio_tools_local.provider import LocalOptions, LocalToolProvider
async def main():
with TemporaryDirectory() as directory:
root = Path(directory)
provider = LocalToolProvider()
await provider.init(LocalOptions(cwd=root, roots=(root,), isolated=True))
try:
agent = Agent(
"Follow the project instructions.", StubTransport([make_text_response()]), providers=[provider]
)
provider.bind(agent)
await agent.run("Hello", MemoryContextStore())
finally:
await provider.close()
asyncio.run(main())
Relative tool arguments use the configured cwd. roots must be existing,
non-overlapping directories. Binding adds required instructions and hooks without
changing the base system prompt or replacing caller hooks. Bind copied agents
separately so their scoped instruction snapshots remain independent.
Unless isolated=True, file instructions include global Axio AGENTS.md and
root-to-target AGENTS.md files. Explicit instruction_files remain enabled in
isolated mode. The combined byte limit rejects oversized snapshots without
truncation. A project instruction symlink cannot escape its project root.
Preflight uses each selected tool's Tool.access declaration, including tools
from other providers. New or changed instructions defer the entire batch until
the model receives the updated content. An instruction edit runs separately from
other operations in its batch. These checks do not provide filesystem isolation.
They cannot observe paths hidden inside shell commands, Python code, or MCP calls
that do not declare their local file effects.
Local skills expose short metadata through Instruction. Loading a skill returns
its full text, a resource reader, and the provider's local execution tools.
Dependencies are not inferred from Markdown or installed automatically. Tools
retain their access declarations and remain subject to the agent's guards.
reload() replaces the skill catalog; each bound agent updates it before its next
model call. Removed skills lose their active text and tools unless those tools
remain independently configured on the agent.
Metadata
Release files for axio-tools-local 0.12.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 |
|---|---|---|---|---|
| axio_tools_local-0.12.0.tar.gz | 61.9 kB | With provenance | Details for axio_tools_local-0.12.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| axio_tools_local-0.12.0-py3-none-any.whl | Python 3 | none | any | Details for axio_tools_local-0.12.0-py3-none-any.whl |
Total release size: 87.2 kB
Release files / axio_tools_local-0.12.0.tar.gz
| Download URL | axio_tools_local-0.12.0.tar.gz |
|---|---|
| Size | 61.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e28341bcb167202d907606ae4b19529216555af05912e6e2689eef47b42825bc
|
|
BLAKE2b-256 checksum How to use checksums |
707edeb02eea83e47654cfb875cfbf955cadb2ef222c06d5afdee6b84a36d5d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / axio_tools_local-0.12.0-py3-none-any.whl
| Download URL | axio_tools_local-0.12.0-py3-none-any.whl |
|---|---|
| Size | 25.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45fefed6db0205c11d1253cad9f90c0858d7a92bd319bedc9ddecfd9d73a0853
|
|
BLAKE2b-256 checksum How to use checksums |
61f3a5ac06937fa928a90cfe553f62b00ce2163eeba817272b34d6d43d67af9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logSecurity for axio-tools-local 0.12.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for axio_tools_local-0.12.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logA 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.