Overview
What is File Editing Server?
A small Go-based server that exposes HTTP endpoints for reading, editing, and listing files in a specified working directory. It also offers a JSON‑RPC STDIO transport mode. Designed for developers who need programmable file operations over a network or standard I/O.
How to use File Editing Server?
Build it with go build ./cmd/file-editor, then run the binary with the required -dir flag to set the working directory. Choose transport via -transport (defaults to http) and optionally set the HTTP port with -port. Example: ./file-editor -dir /path/to/workdir -transport http -port 8080.
Key features of File Editing Server
- File reading, editing, and listing via HTTP endpoints
- JSON‑RPC STDIO transport mode
- Working directory restriction for safe operations
- Health endpoint at
/health - Graceful shutdown on
SIGTERMorCtrl+C
Use cases of File Editing Server
- Remote file editing in a controlled directory
- Programmatic file manipulation from other services
- Integration with tools that support HTTP or JSON‑RPC STDIO
FAQ from File Editing Server
What are the runtime dependencies?
Only a Go compiled binary – no external runtime dependencies beyond the operating system.
How is the working directory specified?
The -dir flag sets the only directory the server will serve files from.
Which transports are supported?
HTTP and JSON‑RPC STDIO, selected with the -transport flag (defaults to HTTP).
Does the server support authentication?
—