Skip to content

Commit 3f6f94b

Browse files
committed
fix: Update clickgraph-client and add documentation
- Fix Cargo edition from 2024 to 2021 (2024 doesn't exist) - Lower rust-version to 1.70 to match main project - Fix typo: 'brahamnd' -> 'ClickGraph' in welcome message - Add Interactive CLI Client section to README with usage examples - Tested build: clickgraph-client.exe compiles successfully (4MB binary) Resolves issue with building clickgraph-client package
1 parent 5560175 commit 3f6f94b

File tree

3 files changed

+50
-3
lines changed

3 files changed

+50
-3
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,53 @@ Both protocols share the same underlying query engine and ClickHouse backend.
272272

273273
📖 **[Complete Setup Guide →](docs/getting-started.md)**
274274

275+
---
276+
277+
## 💻 Interactive CLI Client
278+
279+
ClickGraph includes an interactive command-line client for easy querying:
280+
281+
### Build and Run
282+
283+
```bash
284+
# Build the client
285+
cargo build --release -p clickgraph-client
286+
287+
# Run with default settings (connects to http://localhost:8080)
288+
./target/release/clickgraph-client
289+
290+
# Or connect to a custom server
291+
./target/release/clickgraph-client --url http://your-server:8080
292+
```
293+
294+
### Usage
295+
296+
```
297+
clickgraph-client :) MATCH (u:User) RETURN u.name LIMIT 5
298+
299+
Tim Duncan
300+
Tony Parker
301+
LaMarcus Aldridge
302+
Manu Ginobili
303+
Boris Diaw
304+
305+
clickgraph-client :) MATCH (u:User)-[:FOLLOWS]->(friend) WHERE u.user_id = 101 RETURN friend.name
306+
307+
Tim Duncan
308+
LaMarcus Aldridge
309+
310+
clickgraph-client :) <Ctrl+C or Ctrl+D to exit>
311+
I'll be back:)
312+
```
313+
314+
**Features**:
315+
- Interactive REPL with history support
316+
- Automatic result formatting (JSON or text)
317+
- Command history (up/down arrows)
318+
- Simple connection to any ClickGraph server
319+
320+
---
321+
275322
## 📊 View-Based Graph Model
276323

277324
Transform existing relational data into graph format through YAML configuration:

brahmand-client/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "clickgraph-client"
33
version = "0.0.1"
4-
edition = "2024"
5-
rust-version = "1.85"
4+
edition = "2021"
5+
rust-version = "1.70"
66

77
[dependencies]
88
clap = { version = "4", features = ["derive"] }

brahmand-client/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
1515
let args = Args::parse();
1616
let client = Client::new();
1717

18-
println!("\nConnected to brahamnd server at {}.\n", args.url);
18+
println!("\nConnected to ClickGraph server at {}.\n", args.url);
1919

2020
let mut rl = DefaultEditor::new()?;
2121

0 commit comments

Comments
 (0)