Skip to content

feat(cli): integrate clap_complete for shell command completions#49

Merged
senamakel merged 9 commits into
tinyhumansai:mainfrom
senamakel:feat/core-service
Mar 28, 2026
Merged

feat(cli): integrate clap_complete for shell command completions#49
senamakel merged 9 commits into
tinyhumansai:mainfrom
senamakel:feat/core-service

Conversation

@senamakel
Copy link
Copy Markdown
Member

Summary

  • Introduced a core CLI architecture refactor to centralize command structure and service lifecycle wiring.
  • Added shell completion support via clap_complete to improve CLI usability.
  • Initialized the app shell foundation for Tauri + React + TypeScript to align the desktop host and frontend entrypoint.
  • Updated local AI defaults and macOS service-management internals for improved local runtime behavior.
  • Added lint/format ignores for generated app/** content to keep CI and hooks focused on source files.

Problem

  • The CLI and service entrypoints lacked a cohesive core-service structure, which increased maintenance risk as runtime features expanded.
  • Developer ergonomics were limited without command completion support.
  • Tooling checks were noisy due to generated/app-layer files being included in ESLint/Prettier scopes.

Solution

  • Reorganized CLI command composition into a core-service oriented layout and tightened command routing responsibilities.
  • Integrated clap_complete for shell completion generation.
  • Added foundational Tauri + React + TypeScript app scaffolding and aligned project wiring.
  • Scoped lint/format ignores to exclude app/** where appropriate.

Testing

  • yarn -s compile
  • cargo check --manifest-path src-tauri/Cargo.toml
  • Other checks run (list commands)
    • npx prettier --check .
    • npx eslint .
    • npx tsc --noEmit
    • cargo fmt --manifest-path src-tauri/Cargo.toml --check
  • Manual validation completed (list scenarios)

Impact

  • Primarily affects desktop/CLI runtime paths.
  • Improves CLI developer UX through shell completions.
  • No expected end-user migration required; low compatibility risk.

Breaking Changes

  • None
  • Yes (describe clearly, including migration steps)

Related

  • Issue(s): N/A
  • Follow-up PR(s)/TODOs:
    • Add explicit manual test coverage notes for CLI completion flows (bash, zsh, fish).

- Updated the daemon service to support a new configuration structure for managing tray visibility.
- Added functions to load and save daemon host configuration from a JSON file.
- Implemented Tauri commands to retrieve and update the daemon host configuration.
- Enhanced the service management logic to account for legacy application labels and improve compatibility on macOS.
- Refactored executable resolution logic to streamline the process of locating the daemon executable across platforms.
…settings

- Added functionality to load and save daemon host configuration, specifically for managing the visibility of the daemon tray icon.
- Implemented UI components in both DaemonHealthPanel and TauriCommandsPanel to toggle the tray visibility setting.
- Integrated Tauri commands to retrieve and update the daemon host configuration, improving user control over the daemon's display options.
- Enhanced loading states and error handling for better user feedback during configuration updates.
- Changed default model IDs from `qwen2.5:1.5b` and `qwen3-vl:2b` to `gemma3:4b-it-qat` for chat and vision models, ensuring consistency in local AI settings.
- Added dynamic configuration for thread stack size in the CLI, allowing customization via the `OPENHUMAN_CORE_THREAD_STACK_SIZE` environment variable.
- Improved macOS service management by validating the LaunchAgent plist and ensuring it is installed before starting the service.
- Enhanced error handling and logging for service loading and plist validation, improving user feedback and reliability.
- Added essential project files including package.json, tsconfig.json, and Vite configuration for a Tauri application using React and TypeScript.
- Created initial HTML template and CSS styles for the application interface.
- Included .gitignore to exclude build artifacts and environment-specific files.
- Established basic README documentation to guide setup and development.
- Replaced the existing CLI command structure with a new design using `clap` for better organization and extensibility.
- Introduced a `CoreCli` struct with subcommands for various operations including server management, health checks, and configuration settings.
- Updated command handling to support new subcommands for settings and accessibility operations, enhancing the CLI's functionality.
- Modified the core process handling to reflect the new command structure, ensuring compatibility with the updated CLI design.
- Updated the ESLint configuration to include the 'app/**' directory in the list of ignored paths, ensuring that files in this directory are not linted during the development process.
- Updated the .prettierignore file to include the 'app' directory, preventing formatting checks on files within this path during development.
- Added support for generating shell completion scripts using `clap_complete`, enhancing the CLI's usability.
- Introduced new subcommands for generating completions and updated command structures to accommodate this feature.
- Implemented a new `capture_image_ref` command in the accessibility module for direct image reference capture.
- Enhanced the `Tools` command structure to include screenshot functionalities, improving CLI tool management.
@senamakel senamakel merged commit b6ec716 into tinyhumansai:main Mar 28, 2026
1 of 5 checks passed
@senamakel senamakel deleted the feat/core-service branch March 31, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant