Skip to content

Implement nodespace CLI binary with node subcommands #1116

Closed

Description

@malibio

Overview

Build the nodespace CLI binary — a thin gRPC client that connects to nodespaced on localhost:50051 and exposes knowledge graph operations as shell commands. This gives developers and power users Ollama-style command-line access to NodeSpace without opening the desktop UI.

Problem Statement

NodeSpace currently has no command-line interface. All interaction requires the Tauri desktop application. Under ADR-031 the daemon runs independently of the UI, making a CLI both possible and natural. Developers need to script node operations, query the graph from terminal workflows, and verify daemon state without a GUI.

Proposed Solution

A standalone nodespace binary that initializes a tonic gRPC client and exposes subcommands for common node operations. The CLI is stateless — each invocation connects, executes, and disconnects. Output is human-readable by default with --json flag for scripting.

Acceptance Criteria

  • nodespace binary builds and is installable alongside nodespaced
  • nodespace node get <id> retrieves and prints a node
  • nodespace node create --type <type> --content <content> [--parent <id>] creates a node and prints the result
  • nodespace node update <id> --content <content> updates a node
  • nodespace node delete <id> deletes a node
  • nodespace node children <id> lists child nodes
  • nodespace search <query> runs a semantic search and prints results
  • --json flag on all commands outputs raw JSON for scripting
  • Clear error message when nodespaced is not running (connection refused)
  • nodespace --help and nodespace <subcommand> --help print useful usage text
  • cargo build --bin nodespace succeeds
  • Code passes bun run quality:fix

Technical Specifications

Files to create

  • packages/cli/ (NEW crate) — or packages/daemon/src/bin/nodespace.rs if kept in the daemon crate
  • packages/cli/src/main.rs — CLI entry point, argument parsing, gRPC client init
  • packages/cli/src/commands/node.rs — get, create, update, delete, children subcommands
  • packages/cli/src/commands/search.rs — semantic search subcommand
  • packages/cli/src/output.rs — human-readable and JSON output formatters
  • Cargo.toml (workspace root) — add cli crate member

Argument parsing crate

clap with derive macros:

[dependencies]
clap = { version = "4", features = ["derive"] }
tonic = "0.12"
tokio = { version = "1", features = ["full"] }
serde_json = "1"

Command structure

nodespace [--json] <subcommand>

nodespace node get <id>
nodespace node create --type <type> --content <content> [--parent <id>]
nodespace node update <id> --content <content>
nodespace node delete <id>
nodespace node children <id>
nodespace search <query> [--limit <n>]

gRPC client init

let channel = Channel::from_static("http://[::1]:50051")
    .connect()
    .await
    .map_err(|_| "nodespaced is not running — start it with `nodespaced`")?;
let client = NodeServiceClient::new(channel);

Output format

Human-readable: pretty-printed node fields. With --json: raw proto-to-JSON serialization via serde_json.

Reference files

Dependencies

Non-Goals

  • PTY agent session commands (launch, attach, sessions, kill) — covered by the PTY CLI issue
  • Interactive REPL or TUI mode (future)
  • Authentication or multi-instance daemon selection (future)

Activity

  1. malibio commented on May 17, 2026

    @malibio
    CollaboratorAuthor

    Baseline (frontend): 128 test files / 3918 tests passing in 39.3s on worktree branch worktree-issue-1116-nodespace-cli (off main @ 5e7ef28).

  2. self-assigned this
    on May 17, 2026
  3. added a commit that references this issue on Jun 22, 2026
    2177bd4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions