mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-07 03:48:44 +08:00
Go: rename ragflow_cli to ragflow-cli (#16270)
### What problem does this PR solve? rename ragflow cli binary ### Type of change - [x] Refactoring Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -137,8 +137,8 @@ jobs:
|
||||
output_ext: .exe
|
||||
runs-on: ${{ matrix.runner }}
|
||||
env:
|
||||
CLI_NAME: ragflow_cli
|
||||
CLI_MAIN: ./cmd/ragflow_cli.go
|
||||
CLI_NAME: ragflow-cli
|
||||
CLI_MAIN: ./cmd/ragflow-cli.go
|
||||
DIST_DIR: dist/cli
|
||||
OFFICE_OXIDE_VERSION: "0.1.2"
|
||||
RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }}
|
||||
|
||||
4
build.sh
4
build.sh
@@ -17,7 +17,7 @@ BUILD_DIR="$CPP_DIR/cmake-build-release"
|
||||
RAGFLOW_SERVER_BINARY="$PROJECT_ROOT/bin/ragflow_server"
|
||||
ADMIN_SERVER_BINARY="$PROJECT_ROOT/bin/admin_server"
|
||||
INGESTOR_BINARY="$PROJECT_ROOT/bin/ingestor"
|
||||
RAGFLOW_CLI_BINARY="$PROJECT_ROOT/bin/ragflow_cli"
|
||||
RAGFLOW_CLI_BINARY="$PROJECT_ROOT/bin/ragflow-cli"
|
||||
|
||||
# office_oxide native library settings
|
||||
OFFICE_OXIDE_PREFIX="${HOME}/.office_oxide"
|
||||
@@ -286,7 +286,7 @@ build_go() {
|
||||
|
||||
echo -e "${GREEN}✓ Go ragflow_server built successfully: $RAGFLOW_SERVER_BINARY${NC}"
|
||||
echo -e "${GREEN}✓ Go admin_server built successfully: $ADMIN_SERVER_BINARY${NC}"
|
||||
echo -e "${GREEN}✓ Go ragflow_cli built successfully: $RAGFLOW_CLI_BINARY${NC}"
|
||||
echo -e "${GREEN}✓ Go ragflow-cli built successfully: $RAGFLOW_CLI_BINARY${NC}"
|
||||
echo -e "${GREEN}✓ Go ingestor built successfully: $INGESTOR_BINARY${NC}"
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
// The canvas builder (internal/agent/canvas) consumes the factory via
|
||||
// runtime.DefaultFactory() so it can resolve real component bodies at
|
||||
// BuildWorkflow time without importing the component package. The
|
||||
// orchestrator (cmd/server_main, cmd/ragflow_cli, ...) blank-imports
|
||||
// orchestrator (cmd/server_main, cmd/ragflow-cli, ...) blank-imports
|
||||
// internal/agent/component to trigger this init, which is the same
|
||||
// trigger that drives each component's Register(...) call.
|
||||
package component
|
||||
|
||||
@@ -21,8 +21,8 @@ This is the Go implementation of the RAGFlow command-line interface, compatible
|
||||
### Build and run
|
||||
|
||||
```bash
|
||||
go build -o ragflow_cli ./cmd/ragflow_cli.go
|
||||
./ragflow_cli
|
||||
go build -o ragflow-cli ./cmd/ragflow_cli.go
|
||||
./ragflow-cli
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
@@ -434,7 +434,7 @@ func parseHostPort(hostPort string) (string, int, error) {
|
||||
func PrintUsage() {
|
||||
fmt.Println(`RAGFlow CLI Client
|
||||
|
||||
Usage: ragflow_cli [options] [command]
|
||||
Usage: ragflow-cli [options] [command]
|
||||
|
||||
Options:
|
||||
-h, --host string RAGFlow service address (host:port, default "127.0.0.1:9380")
|
||||
@@ -796,11 +796,11 @@ Filesystem Commands (no quotes):
|
||||
Note: cat datasets or cat datasets/kb1 will error
|
||||
|
||||
Examples:
|
||||
ragflow_cli -f rf.yml "LIST USERS" # SQL mode (with quotes)
|
||||
ragflow_cli -f rf.yml ls datasets # Filesystem mode (no quotes)
|
||||
ragflow_cli -f rf.yml ls files # List files in root
|
||||
ragflow_cli -f rf.yml cat datasets # Error: datasets is a directory
|
||||
ragflow_cli -f rf.yml ls files/myfolder # List folder contents
|
||||
ragflow-cli -f rf.yml "LIST USERS" # SQL mode (with quotes)
|
||||
ragflow-cli -f rf.yml ls datasets # Filesystem mode (no quotes)
|
||||
ragflow-cli -f rf.yml ls files # List files in root
|
||||
ragflow-cli -f rf.yml cat datasets # Error: datasets is a directory
|
||||
ragflow-cli -f rf.yml ls files/myfolder # List folder contents
|
||||
|
||||
For more information, see documentation.
|
||||
`
|
||||
|
||||
@@ -40,7 +40,7 @@ Note: admin_server must be started first; otherwise, ragflow_server will encount
|
||||
```
|
||||
```bash
|
||||
# Run CLI
|
||||
./bin/ragflow_cli
|
||||
./bin/ragflow-cli
|
||||
```
|
||||
|
||||
## 4. Start Frontend
|
||||
@@ -67,10 +67,10 @@ After updating or implementing an API, update the frontend development environme
|
||||
|
||||
You can use the following CLI commands to test the corresponding API implementations.
|
||||
|
||||
### 6.1. Run ragflow_cli, register user, login, and logout:
|
||||
### 6.1. Run ragflow-cli, register user, login, and logout:
|
||||
|
||||
```
|
||||
$ ./ragflow_cli
|
||||
$ ./ragflow-cli
|
||||
Welcome to RAGFlow CLI
|
||||
Type \? for help, \q to quit
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ The Unix installer:
|
||||
|
||||
- detects `linux` or `darwin`
|
||||
- detects `amd64` or `arm64`
|
||||
- downloads `ragflow_cli-{VERSION}-{OS}-{ARCH}`
|
||||
- downloads `ragflow-cli-{VERSION}-{OS}-{ARCH}`
|
||||
- verifies the file with the release `SHA256SUMS`
|
||||
- installs to `/usr/local/bin` by default
|
||||
|
||||
@@ -59,7 +59,7 @@ Install to a custom directory:
|
||||
The Windows installer:
|
||||
|
||||
- detects `windows/amd64` or `windows/arm64`
|
||||
- downloads `ragflow_cli-{VERSION}-windows-{ARCH}.exe`
|
||||
- downloads `ragflow-cli-{VERSION}-windows-{ARCH}.exe`
|
||||
- verifies the file with the release `SHA256SUMS`
|
||||
- installs to `$env:LOCALAPPDATA\Programs\RAGFlow` by default
|
||||
- adds the install directory to the user `PATH`
|
||||
@@ -69,12 +69,12 @@ The Windows installer:
|
||||
The install scripts expect these names:
|
||||
|
||||
```text
|
||||
ragflow_cli-v1.0.0-linux-amd64
|
||||
ragflow_cli-v1.0.0-linux-arm64
|
||||
ragflow_cli-v1.0.0-darwin-amd64
|
||||
ragflow_cli-v1.0.0-darwin-arm64
|
||||
ragflow_cli-v1.0.0-windows-amd64.exe
|
||||
ragflow_cli-v1.0.0-windows-arm64.exe
|
||||
ragflow-cli-v1.0.0-linux-amd64
|
||||
ragflow-cli-v1.0.0-linux-arm64
|
||||
ragflow-cli-v1.0.0-darwin-amd64
|
||||
ragflow-cli-v1.0.0-darwin-arm64
|
||||
ragflow-cli-v1.0.0-windows-amd64.exe
|
||||
ragflow-cli-v1.0.0-windows-arm64.exe
|
||||
SHA256SUMS
|
||||
install.sh
|
||||
install.ps1
|
||||
|
||||
@@ -18,7 +18,7 @@ param(
|
||||
[string]$Version = "latest",
|
||||
[string]$InstallDir = "$env:LOCALAPPDATA\Programs\RAGFlow",
|
||||
[string]$GitHubRepo = "infiniflow/ragflow",
|
||||
[string]$CliName = "ragflow_cli"
|
||||
[string]$CliName = "ragflow-cli"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
@@ -19,7 +19,7 @@ set -eu
|
||||
|
||||
INSTALL_DIR="${INSTALL_DIR:-/usr/local/bin}"
|
||||
GITHUB_REPO="${GITHUB_REPO:-infiniflow/ragflow}"
|
||||
CLI_NAME="${CLI_NAME:-ragflow_cli}"
|
||||
CLI_NAME="${CLI_NAME:-ragflow-cli}"
|
||||
VERSION="${VERSION:-latest}"
|
||||
|
||||
RELEASE_API="https://api.github.com/repos/${GITHUB_REPO}/releases/latest"
|
||||
|
||||
Reference in New Issue
Block a user