From 4108484a5ccf8abe5dcbb1077e7d7f7a189c47a8 Mon Sep 17 00:00:00 2001 From: Shinsuke Sugaya Date: Thu, 12 Mar 2026 14:19:54 +0900 Subject: [PATCH] docs: add CLAUDE.md with project overview and development guidelines Co-Authored-By: Claude Sonnet 4.6 --- CLAUDE.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..e71f40d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,50 @@ +# fessctl + +CLI tool to manage Fess search engine via the admin API. + +## Commands + +```bash +# Setup +uv sync # Install dependencies +uv sync --extra dev # Install with dev dependencies + +# Development +uv run fessctl --help # Run CLI +uv run pytest tests/unit/ # Run unit tests +uv run pytest tests/commands/ # Run integration tests (requires Docker) +``` + +## Architecture + +``` +src/fessctl/ +├── cli.py # Entry point, Typer app +├── utils.py # Shared utilities +├── api/ +│ └── client.py # HTTP client (httpx) for Fess admin API +├── config/ +│ └── settings.py # Configuration management +└── commands/ # One module per resource type (~22 modules) + ├── webconfig.py # Web crawling configs + ├── fileconfig.py # File crawling configs + ├── dataconfig.py # Data store configs + ├── scheduler.py # Scheduler jobs + ├── user.py # User management + ├── role.py # Role management + ├── group.py # Group management + └── ... +``` + +## Testing + +- **Unit tests**: `tests/unit/` — no external dependencies +- **Integration tests**: `tests/commands/` — use testcontainers (Docker Compose) to spin up Fess +- Set `FESS_VERSION` env var to control which Fess version to test against + +## Code Patterns + +- Uses Typer for CLI framework with subcommands per resource +- Uses httpx for HTTP calls to Fess admin API +- YAML/JSON input/output support +- Python 3.13+ required