Skip to content
Merged
Show file tree
Hide file tree
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
98 changes: 59 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,75 +13,95 @@ Fess is an open-source enterprise search server based on OpenSearch.

(Currently under development, more features and improvements are on the way. Stay tuned for updates!)

## Installation
## Installation and Usage

### Requirements
There are three ways to use fessctl:

- Python 3.13+
- [`uv`](https://github.com/astral-sh/uv) (recommended for environment setup)
### Method 1: Using Pre-built Docker Image

### Setup
The easiest way to get started is using the pre-built Docker image:

```bash
git clone https://github.com/your-org/fessctl.git
cd fessctl
uv venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
uv pip install -e src
docker run --rm \
-e FESS_ENDPOINT=https://your-fess-server \
-e FESS_ACCESS_TOKEN=your_access_token_here \
-e FESS_VERSION=15.1.0 \
ghcr.io/codelibs/fessctl:0.1.0 --help
```

## Run CLI
Run actual commands:

```bash
fessctl --help
```

### Example Commands
docker run --rm \
-e FESS_ENDPOINT=https://your-fess-server \
-e FESS_ACCESS_TOKEN=your_access_token_here \
-e FESS_VERSION=15.1.0 \
ghcr.io/codelibs/fessctl:0.1.0 ping

```bash
export FESS_ACCESS_TOKEN=...
export FESS_VERSION=15.1.0
fessctl ping
fessctl user list
fessctl webconfig create --name TestConfig --url https://test.config.com/
docker run --rm \
-e FESS_ENDPOINT=https://your-fess-server \
-e FESS_ACCESS_TOKEN=your_access_token_here \
-e FESS_VERSION=15.1.0 \
ghcr.io/codelibs/fessctl:0.1.0 user list
Comment on lines +39 to +45
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Docker image version is hardcoded to 0.1.0, but the project version has been bumped to 0.2.0.dev. Consider using a variable or updating to match the current version to avoid confusion.

Copilot uses AI. Check for mistakes.
Comment on lines +39 to +45
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Docker image version is hardcoded to 0.1.0, but the project version has been bumped to 0.2.0.dev. Consider using a variable or updating to match the current version to avoid confusion.

Copilot uses AI. Check for mistakes.
```

## Docker Build and Run
### Method 2: Building Your Own Docker Image

### Build Docker Image
Clone the repository and build the Docker image locally:

```bash
git clone https://github.com/your-org/fessctl.git
cd fessctl
docker build -t fessctl:latest .
```

### Run fessctl in Docker

You need to provide the following environment variables when running:

- FESS_ENDPOINT: The URL of your Fess server's API endpoint. (Default: `http://localhost:8080`)
- FESS_ACCESS_TOKEN: Your access token to authenticate with the Fess API.
- FESS_VERSION: Your Fess server version for API compatibility. (Default: `15.1.0`)

Example:
Then run with your custom image:

```bash
docker run --rm \
-e FESS_ENDPOINT=https://your-fess-server \
-e FESS_ACCESS_TOKEN=your_access_token_here \
-e FESS_VERSION=15.1.0 \
fessctl --help
fessctl:latest --help
```

To run an actual command, for example:
### Method 3: Install from Source with pip

For development or when you need to modify the source code:

#### Requirements
- Python 3.13+
- [`uv`](https://github.com/astral-sh/uv) (recommended for environment setup)

#### Setup
```bash
docker run --rm \
-e FESS_ENDPOINT=https://your-fess-server \
-e FESS_ACCESS_TOKEN=your_access_token_here \
-e FESS_VERSION=15.1.0 \
fessctl webconfig list
git clone https://github.com/your-org/fessctl.git
cd fessctl
uv venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
uv pip install -e src
```

#### Usage
```bash
export FESS_ACCESS_TOKEN=your_access_token_here
export FESS_ENDPOINT=https://your-fess-server
export FESS_VERSION=15.1.0

fessctl --help
fessctl ping
fessctl user list
fessctl webconfig create --name TestConfig --url https://test.config.com/
```

## Environment Variables

All three methods require the following environment variables:

- `FESS_ENDPOINT`: The URL of your Fess server's API endpoint (default: `http://localhost:8080`)
- `FESS_ACCESS_TOKEN`: Bearer token for API authentication (required)
- `FESS_VERSION`: Target Fess version for API compatibility (default: `15.1.0`)

## License

This project is licensed under the Apache License 2.0.
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fessctl"
version = "0.1.0"
version = "0.2.0.dev"
description = "CLI tool to manage Fess using the admin API"
authors = [{ name = "CodeLibs, Inc.", email = "info@codelibs.co" }]
requires-python = ">=3.13"
Expand Down Expand Up @@ -33,4 +33,4 @@ requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where = ["src"]
where = ["src"]