Core filesystem and execution tools for Axio
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axio_tools_local-0.9.5.tar.gz.
File metadata
- Download URL: axio_tools_local-0.9.5.tar.gz
- Upload date:
- Size: 41.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a721b1b9997b0f7f8d943eeb6080af911c996f21312d313142705c2fb4e896f0
|
|
| MD5 |
1c09ecf06476005b0e7cf318f8935f06
|
|
| BLAKE2b-256 |
29555a4db82bb6d1eae8abfc888a53fe9dab275ca473e73feba08bd27bdaa548
|
Provenance
The following attestation bundles were made for axio_tools_local-0.9.5.tar.gz:
Publisher:
publish.yml on mosquito/axio-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axio_tools_local-0.9.5.tar.gz -
Subject digest:
a721b1b9997b0f7f8d943eeb6080af911c996f21312d313142705c2fb4e896f0 - Sigstore transparency entry: 1508798905
- Sigstore integration time:
-
Permalink:
mosquito/axio-agent@90f6fcda0e13a8af35ac444d6c09161037e11a38 -
Branch / Tag:
refs/tags/0.9.5 - Owner: https://github.com/mosquito
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@90f6fcda0e13a8af35ac444d6c09161037e11a38 -
Trigger Event:
release
-
Statement type:
File details
Details for the file axio_tools_local-0.9.5-py3-none-any.whl.
File metadata
- Download URL: axio_tools_local-0.9.5-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4fe2e8cfdcbf0db5d3200eb6d1fc62c85bd8cfa8ba962924f29e896944048b8
|
|
| MD5 |
9b04c1893c264ef56974f7673fd5c427
|
|
| BLAKE2b-256 |
62ac009ccb02745c462f02014c9f9454537df8ffc4de67d8d072d1b2e9969b0a
|
Provenance
The following attestation bundles were made for axio_tools_local-0.9.5-py3-none-any.whl:
Publisher:
publish.yml on mosquito/axio-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axio_tools_local-0.9.5-py3-none-any.whl -
Subject digest:
c4fe2e8cfdcbf0db5d3200eb6d1fc62c85bd8cfa8ba962924f29e896944048b8 - Sigstore transparency entry: 1508798980
- Sigstore integration time:
-
Permalink:
mosquito/axio-agent@90f6fcda0e13a8af35ac444d6c09161037e11a38 -
Branch / Tag:
refs/tags/0.9.5 - Owner: https://github.com/mosquito
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@90f6fcda0e13a8af35ac444d6c09161037e11a38 -
Trigger Event:
release
-
Statement type: