Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -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
Loading