Agent-oriented filesystem CLI for precise, Chinese-friendly file and path operations with stronger non-ASCII support.
Project description
FileGlide
Agent-oriented filesystem CLI for precise, Chinese-friendly file and path operations with stronger non-ASCII support.
Traverse trees, inspect sizes, search names and content, edit exact line ranges, handle binary payloads, and execute explicit batch plans from one consistent command tree.
Installation | Agent Skills | Quick Start | Command Tree | Output and Encoding | Search and Editing | Batch Execution | More Docs
Installation
Install the published PyPI package fileglide. The package exposes the fileglide CLI directly after installation.
uv add -U fileglide
fileglide --help
pip install -U fileglide
fileglide --help
Python 3.10+ is required. The CLI is implemented with click and exposes JSON as the default output contract.
Agent Skills
FileGlide also provides agent skills for Codex, Claude Code, and other coding agents.
When you want an agent to install them, just say:
Please install skills from
https://github.com/vortezwohl/fileglide, and place them in my global user skill directory.
These skills are intended for repository workflows built around constrained filesystem access, precise text editing, OpenSpec change management, and verifiable step-by-step execution.
Quick Start
1. Create a scoped workspace path
fileglide path create 'tests/tmp/demo/docs' --root 'D:\github-project\fileglide' --parents --exist-ok
Use --root to keep all relative paths constrained to a known workspace root.
2. Create and write a text file
fileglide file create 'tests/tmp/demo/docs/notes.txt' --root 'D:\github-project\fileglide' --parents --exist-ok
fileglide text write 'tests/tmp/demo/docs/notes.txt' --root 'D:\github-project\fileglide' --mode overwrite --content "alpha`nbravo`ncharlie"
Use overwrite, append, or insert modes to control how text mutations are applied.
3. Read exact line ranges
fileglide text read 'tests/tmp/demo/docs/notes.txt' --root 'D:\github-project\fileglide' --start-line 2 --end-line 3
This is useful when an agent needs precise context instead of loading an entire file.
4. Search file content with regex
fileglide text grep 'bravo|charlie' 'tests/tmp/demo' --root 'D:\github-project\fileglide' --include '*.txt'
Content search supports regular expressions and scoped traversal.
5. Fuzzy search file names
fileglide file search 'note' 'tests/tmp/demo' --root 'D:\github-project\fileglide' --mode fuzzy
Fuzzy filename and pathname matching is powered by vortezwohl Levenshtein distance utilities.
Command Tree
| Command | Role | Typical use |
|---|---|---|
file |
File lifecycle and file-only traversal | Create, delete, list, test existence, and search files |
path |
Directory lifecycle and path-only traversal | Create, delete, list, test existence, and search directories |
tree |
Mixed tree traversal | Return both files and directories from a scoped start path |
text |
Text and binary content operations | Read, write, grep, replace line ranges, insert by anchor, and copy binary payloads |
inspect |
Size and byte inspection | Measure file or directory size and read binary-safe byte slices |
batch |
Explicit batch execution | Validate and execute JSON plans step by step |
Output and Encoding
Current public-facing defaults:
--format json--pretty- scoped path resolution through
--root - UTF-8 without BOM works directly
- common encodings such as UTF-8 BOM, UTF-16 LE, GBK, GB18030, and Shift-JIS are detected and handled in the text workflow
- binary commands keep payloads binary-safe instead of forcing text decoding
Practical notes:
- Use
--format textwhen a human-readable console summary is preferable. - Keep
jsonfor scripts, automation, and agent tool invocation. - Text commands can force an encoding explicitly with
--encoding. - Binary write and byte-slice inspection avoid accidental corruption of non-text data.
Search and Editing
Representative editing and search operations:
fileglide text write 'tests/tmp/demo/docs/notes.txt' --root 'D:\github-project\fileglide' --mode append --content "`ndelta"
fileglide text write 'tests/tmp/demo/docs/notes.txt' --root 'D:\github-project\fileglide' --mode insert --position 6 --content '[INSERT]'
fileglide text replace-lines 'tests/tmp/demo/docs/notes.txt' --root 'D:\github-project\fileglide' --start-line 2 --end-line 2 --content 'BRAVO'
fileglide text insert-anchor 'tests/tmp/demo/docs/notes.txt' --root 'D:\github-project\fileglide' --after --anchor 'BRAVO' --content "`nANCHOR-INSERT"
fileglide path search 'doc' 'tests/tmp/demo' --root 'D:\github-project\fileglide' --mode fuzzy --kind directory
fileglide tree list 'tests/tmp/demo' --root 'D:\github-project\fileglide' --kind all
fileglide inspect size 'tests/tmp/demo' --root 'D:\github-project\fileglide'
These commands are designed for AI agents that need exact, local, and verifiable filesystem actions instead of ad hoc shell parsing.
Batch Execution
fileglide supports explicit JSON plans for grouped operations.
Example plan shape:
{
"steps": [
{
"action": "path.create",
"params": {
"target": "tests/tmp/batch-demo",
"root": "D:\\github-project\\fileglide",
"parents": true,
"exist_ok": true
}
},
{
"action": "text.write",
"params": {
"target": "tests/tmp/batch-demo/readme.txt",
"root": "D:\\github-project\\fileglide",
"mode": "overwrite",
"content": "batch-ready"
}
}
]
}
Preview first, then apply when the plan looks correct:
fileglide batch run 'D:\github-project\fileglide\tests\fixtures\batch\sample-plan.json' --dry-run
fileglide batch run 'D:\github-project\fileglide\tests\fixtures\batch\sample-plan.json' --apply
More Docs
License
MIT License.
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 fileglide-0.0.1.tar.gz.
File metadata
- Download URL: fileglide-0.0.1.tar.gz
- Upload date:
- Size: 81.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfa0e7b5689bdb4e156a33e10a5ab300ddfefd0ef70c926db08a601220328f6b
|
|
| MD5 |
0ba7cfb53eb05db1e087ad3506defc34
|
|
| BLAKE2b-256 |
c994c0012455d9122c1f4fe7f3d17620f5dc2e61b1903726b244f3442e92ae84
|
File details
Details for the file fileglide-0.0.1-py3-none-any.whl.
File metadata
- Download URL: fileglide-0.0.1-py3-none-any.whl
- Upload date:
- Size: 37.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ac76f946b1b7194c612d5907cf8130c3854842d5882a7bfaf2fe1ed3ba6043e
|
|
| MD5 |
403ef941a875bb79a3fd6dd3c154e2cd
|
|
| BLAKE2b-256 |
6fde469e35d2d1da05ae9cc0df6a559df90a18dbf0d0c1965ccdd99305dd0e6a
|