-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor installation instructions and bump version to 0.2.0.dev #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
|
||
| ``` | ||
|
|
||
| ## 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. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.