36 cross process cli for aimdb introspection#42
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements the AimDB CLI tool, providing a command-line interface for introspecting and managing running AimDB instances via the AimX v1 remote access protocol. This addresses the "CLI Tools" priority mentioned in the project's next priorities.
Key Changes:
- Implements a full-featured CLI with commands for instance management, record operations, and real-time monitoring
- Adds client implementation for the AimX protocol over Unix domain sockets with NDJSON messaging
- Provides multiple output formats (table, JSON, YAML) for flexible integration with other tools
- Updates timestamp format from integer to floating-point (seconds.nanoseconds) for higher precision event tracking
Reviewed Changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/aimdb-cli/Cargo.toml | Adds dependencies for CLI framework (clap), async runtime (tokio), output formatting (tabled, colored), and error handling |
| tools/aimdb-cli/src/main.rs | Main CLI entry point with command routing for instance, record, and watch operations |
| tools/aimdb-cli/src/error.rs | Comprehensive error types with actionable hints for common failure scenarios |
| tools/aimdb-cli/src/output/*.rs | Output formatting modules for table, JSON, and live event display |
| tools/aimdb-cli/src/commands/*.rs | Command implementations for instance management, record operations, and real-time watching |
| tools/aimdb-cli/src/client/*.rs | AimX protocol client with connection management, discovery, and protocol utilities |
| tools/aimdb-cli/README.md | Comprehensive documentation with examples and command reference |
| aimdb-core/src/remote/mod.rs | Exports ErrorObject type for CLI error handling |
| aimdb-core/src/remote/handler.rs | Fixes timestamp generation to use proper formatting (seconds.nanoseconds) |
| examples/remote-access-demo/src/server.rs | Updates Temperature struct to use f64 timestamp matching new format |
| Cargo.lock | Adds CLI dependencies and resolves unicode-width version |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added
aimdbCLI tool for cross-process introspection and management of running AimDB instances via the AimX v1 remote access protocol. ([Cross-Process CLI for AimDB Introspection #36])aimdb instance list- Discover and list all running AimDB instances by scanning Unix domain socketsaimdb instance info- Display detailed information about a specific instanceaimdb instance ping- Test connectivity to an AimDB instanceaimdb record list- List all registered records with metadata (type, buffer type, producer/consumer counts, writable status)aimdb record get <name>- Retrieve the current value of a specific recordaimdb record set <name> <value>- Set the value of a writable record (with JSON input validation)aimdb watch <record>- Subscribe to record updates and display events in real-time with proper Ctrl+C handling/tmpand/var/run/aimdbdirectories for.sockfilesChanged
seconds.nanosecondsformat instead of Debug format) for better parsing and compatibility with CLI tools. ([Cross-Process CLI for AimDB Introspection #36])Fixed