You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update documentation with new installation method, needlectl configs, and demo button
- Add demo button to homepage after video
- Update installation method with virtual environments and new architecture
- Add new needlectl commands: update, ui start/stop
- Update needlectl parameters and options
- Add profiles (dev/prod) and configuration options
- Create new UI component documentation
- Update all needlectl component docs with current functionality
- Add macOS support to prerequisites
-**Git:** Required for cloning the repository and managing updates.
17
+
[Install Git](https://git-scm.com/downloads)
18
+
13
19
> **Warning:** Make sure your user account is added to the Docker group so you can run Docker commands (e.g., `docker ps`) without needing root privileges.
14
20
15
-
> **Note:** Currently, Needle is supported only on **Linux**.
21
+
> **Note:** Currently, Needle is supported on **Linux** and **macOS**.
16
22
17
23
## Installation
18
24
25
+
### Quick Install (Recommended)
26
+
19
27
To install Needle, run the following one-liner in your terminal:
During the installation process, you will be prompted to choose the database mode. The available options are:
26
51
27
52
-**Fast:** Offers quick responses and indexing with lower accuracy.
28
53
-**Balanced:** Provides a compromise between speed and accuracy.
29
54
-**Accurate:** Prioritizes high accuracy, which may come at the cost of slower performance.
30
55
31
-
32
56
> **Warning:** Once the database mode is set, it cannot be changed without uninstalling and reinstalling Needle, which will result in data loss.
33
57
34
-
> **Note:**" Needle automatically checks for GPU accessibility and will use the GPU if available to optimize performance.
58
+
> **Note:** Needle automatically checks for GPU accessibility and will use the GPU if available to optimize performance.
59
+
60
+
### What Gets Installed
61
+
62
+
The installation process sets up:
63
+
64
+
-**Virtual Environments:** Separate Python environments for backend and image generator services
65
+
-**Docker Infrastructure:** PostgreSQL, Milvus, and Redis services via Docker Compose
66
+
-**Configuration Files:** Performance-optimized settings based on your chosen mode
67
+
-**needlectl CLI:** Command-line interface for managing Needle
68
+
-**Web UI:** Optional web interface for easier interaction
35
69
36
70
After the installation completes, please close and reopen your terminal session (or source your shell configuration file) to ensure that all environment variables are correctly set.
Copy file name to clipboardExpand all lines: docs/src/needlectl/README.md
+53-9Lines changed: 53 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,22 +7,51 @@ needlectl is the primary command-line interface that connects to the Needle back
7
7
The following options are available with needlectl:
8
8
9
9
-**`--api-url`**: Specifies the backend URL to connect to.
10
-
_Default:_`127.0.0.1:8000`
10
+
_Default:_`http://127.0.0.1:8000`
11
11
12
12
-**`--output`**: Determines the format of the output.
13
-
_Supported formats:_ human-readable, JSON, YAML.
14
-
_Default:_ human-readable.
13
+
_Supported formats:_ human, json, yaml.
14
+
_Default:_ human.
15
15
16
-
-**`--version`**: Prints the version information for both the Needle backend and the needlectl tool.
16
+
-**`--version`** or **`-v`**: Prints the version information for both the Needle backend and the needlectl tool.
17
17
18
-
-**`--install-completion`**: Installs auto-completion for your current shell.
18
+
-**`--home`** or **`-H`**: Specifies the Needle installation directory.
19
+
_Default:_ Auto-detected from installation
19
20
21
+
-**`--profile`**: Selects the runtime profile (prod or dev).
22
+
_Default:_ prod
23
+
24
+
-**`--config-dir`**: Overrides the configuration directory path.
20
25
21
26
> **Note:**`--api-url` and `--output` are accessible globally and in all commands, for example, in order to get the outputs of a query in JSON format you can use following command:
22
27
> ```bash
23
28
> needlectl --output json query run "a wolf howling"
24
29
>```
25
30
31
+
## Profiles & Configuration
32
+
33
+
You can use the `--home`/`-H` flag to point needlectl at a custom Needle installation or local checkout, and selecta runtime profile (`prod` or `dev`) that auto-configures the compose files and config directory.
34
+
35
+
### Development Profile
36
+
```bash
37
+
needlectl --home $(pwd) --profile dev service start
Copy file name to clipboardExpand all lines: docs/src/needlectl/service.md
+30-2Lines changed: 30 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Service Component
2
2
3
-
The service component of `needlectl` manages the core operations of Needle. It connects to the Needle backend service and uses Docker Compose to start, stop, restart, check status, view logs, and configure the service environment.
3
+
The service component of `needlectl` manages the core operations of Needle. It connects to the Needle backend service and uses Docker Compose to start, stop, restart, check status, view logs, update components, and configure the service environment.
4
4
5
-
> **Note:** Most commands rely on the `--api-url` option (default: `127.0.0.1:8000`) to connect to the backend API. You can set this globally if needed.
5
+
> **Note:** Most commands rely on the `--api-url` option (default: `http://127.0.0.1:8000`) to connect to the backend API. You can set this globally if needed.
6
6
7
7
## Commands Overview
8
8
@@ -77,6 +77,34 @@ Displays the logs from the Needle backend service.
77
77
needlectl service log
78
78
```
79
79
80
+
### `update`
81
+
Updates Needle components to the latest versions.
82
+
83
+
-**Options:**
84
+
-**`--force`** or **`-f`**: Force update even if already up to date
85
+
-**`--component`** or **`-c`**: Update specific component (needlectl, backend, ui, or all)
86
+
87
+
-**What it does:**
88
+
- Checks for the latest release information
89
+
- Shows current versions of all components
90
+
- Updates the specified components
91
+
- Provides status updates during the process
92
+
93
+
-**Usage Examples:**
94
+
```bash
95
+
# Update all components
96
+
needlectl service update
97
+
98
+
# Update only the backend
99
+
needlectl service update --component backend
100
+
101
+
# Force update even if up to date
102
+
needlectl service update --force
103
+
```
104
+
105
+
-**Output:**
106
+
Displays current and latest versions, then updates the specified components with progress indicators.
107
+
80
108
### `config`
81
109
Manages the configuration for the Needle service environment.
The UI component of `needlectl` manages the web-based user interface for Needle. It allows you to start and stop the web UI, which provides a graphical interface for interacting with Needle's features.
4
+
5
+
## Commands Overview
6
+
7
+
### `start`
8
+
9
+
Starts the Needle web UI on a specified port.
10
+
11
+
-**Options:**
12
+
-**`--port`** or **`-p`**: Port to run the UI on (default: 3000)
13
+
14
+
-**What it does:**
15
+
- Starts the web UI server
16
+
- Serves the React-based interface
17
+
- Provides access to all Needle features through a web browser
18
+
19
+
-**Usage Examples:**
20
+
```bash
21
+
# Start UI on default port (3000)
22
+
needlectl ui start
23
+
24
+
# Start UI on custom port
25
+
needlectl ui start --port 8080
26
+
```
27
+
28
+
-**Output:**
29
+
Displays the URL where the UI is accessible (e.g., `http://localhost:3000`)
30
+
31
+
### `stop`
32
+
33
+
Stops the running Needle web UI.
34
+
35
+
-**What it does:**
36
+
- Stops the web UI server
37
+
- Frees up the port for other uses
38
+
39
+
-**Usage Example:**
40
+
```bash
41
+
needlectl ui stop
42
+
```
43
+
44
+
-**Output:**
45
+
Confirms that the UI has been stopped
46
+
47
+
## Web UI Features
48
+
49
+
The web interface provides:
50
+
51
+
-**Search Interface**: Interactive query interface with sample queries
52
+
-**Directory Management**: Visual management of image directories
53
+
-**Generator Configuration**: Easy configuration of image generators
54
+
-**System Status**: Real-time monitoring of service health
55
+
-**Results Visualization**: Rich display of search results and generated images
56
+
57
+
## Accessing the UI
58
+
59
+
Once started, you can access the web UI by opening your browser and navigating to:
60
+
61
+
-**Default URL**: `http://localhost:3000`
62
+
-**Custom Port**: `http://localhost:[PORT]` (where [PORT] is your chosen port)
63
+
64
+
The UI will automatically connect to your running Needle backend service.
</video>*Watch as Needle transforms natural language queries into precise image retrieval results in real time.*
16
16
17
+
## 🎨 Try the Interactive Demo
18
+
19
+
Experience Needle's full capabilities with our interactive demo! Test different queries, explore the interface, and see how Needle works with real data.
0 commit comments