Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.57 KB

File metadata and controls

32 lines (24 loc) · 1.57 KB

AI Agent Developer Guide: flycomp

This document provides a simplified overview of flycomp.

flycomp parses CLI --help outputs and Unix man pages to dynamically synthesize shell completion scripts (via clap_complete) or output command structures as JSON.

Key Files

Useful Commands

# Build
cargo build

# Test (release build runs much faster)
cargo test --release

# Run / Generate Completions
cargo run -- <command> [options]

# Format the codebase after making changes
cargo fmt

Guidelines

  1. Safety: The --help strategy executes binaries using std::process::Command. Never run untrusted or malicious binaries.
  2. Adding Parsers: To support new help schemas, update HelpFormat in src/parse_help.rs and write matching parser functions.
  3. Tests: Keep help and man page parser tests within their respective modules. Never hardcode test help texts or man page contents inline; always save them under tests/help_texts/ or tests/man_pages/ respectively and load them in the tests.