Metadata-Version: 2.4
Name: quick-file-server
Version: 0.1.0
Summary: Portable single-command file manager and editor (FastAPI + React).
Project-URL: Homepage, https://github.com/anupamkris/quick-file-server
Author: Anupam
License: MIT License
        
        Copyright (c) 2025 Anupam
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: cli,editor,fastapi,file-manager
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: FastAPI
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Filesystems
Requires-Python: >=3.10
Requires-Dist: fastapi>=0.110
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: typer>=0.12
Requires-Dist: uvicorn[standard]>=0.27
Description-Content-Type: text/markdown

# file-tool

Portable single-command file manager + editor. FastAPI backend, React (Vite + Tailwind + Shadcn UI) frontend, shipped as one Python wheel.

## Usage

```bash
uvx file-tool              # serve the current directory
uvx file-tool /some/dir    # serve a specific directory
uvx file-tool --port 9000 --no-open
```

The browser opens to a file explorer; click files to edit, drag/click Upload to push files into the current directory.

## Build from source

```bash
# 1. Build the frontend bundle
cd frontend
pnpm install
pnpm build                 # writes frontend/dist/

# 2. Build the Python wheel (picks up frontend/dist via force-include)
cd ../backend
pip install hatch
hatch build                # writes dist/file_tool-*.whl

# 3. Publish
hatch publish              # or `twine upload dist/*`
```

The wheel ships `frontend/dist/` as `file_tool/static/`, so the installed package is self-contained — no internet or Node required at runtime.

## API

| Method | Path           | Purpose                          |
|--------|----------------|----------------------------------|
| GET    | `/api/list`    | List directory (`?path=sub/dir`) |
| GET    | `/api/read`    | Read text file                   |
| POST   | `/api/write`   | Save text file                   |
| POST   | `/api/upload`  | Multipart upload                 |
| DELETE | `/api/delete`  | Remove file or directory         |

All paths are sandboxed to the directory passed on the CLI.
