aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Store command in PID file and display in list/status outputdiogo4642025-06-191-145/+151
| | | | | | | | | | | | | | | | | | | | - Add PidFileData struct to represent PID file contents - Store both PID and command in PID file (first line: PID, remaining lines: command args) - Implement write_to_file() and read_from_file() methods for structured data handling - Update run_daemon() to write command alongside PID - Update all functions to use PidFileData instead of raw PID parsing: - is_process_running() - stop_daemon() - list_daemons() - now shows actual command instead of "N/A" - status_daemon() - shows command in detailed output - clean_orphaned_files() - Add command_string() method for formatted display - Maintain backward compatibility with error handling for invalid PID files - All tests pass, command display works correctly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Format code with rustfmtdiogo4642025-06-191-132/+170
| | | | | | | | | | | | - Apply standard Rust formatting conventions - Improve code readability and consistency - Reorganize imports alphabetically - Fix line lengths and indentation - All tests continue to pass 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Replace glob dependency with std::fs directory traversaldiogo4642025-06-191-98/+100
| | | | | | | | | | | | | - Remove glob crate usage in favor of std::fs::read_dir() - Create find_pid_files() helper function using std::fs - Update list_daemons() and clean_orphaned_files() functions - Maintain same functionality while reducing dependencies - Fix indentation issues after conversion - All tests pass, functionality preserved 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Add llm command for comprehensive usage documentationdiogo4642025-06-191-0/+238
| | | | | | | | | | | | | | | | - Add 'demon llm' command that outputs detailed usage guide - Comprehensive documentation targeted at LLM consumption - Covers all commands with syntax, behavior, and examples - Includes common workflows, best practices, and integration tips - Explains file management, error handling, and scripting patterns - Add test to verify LLM command output contains key sections This provides a complete reference that other LLMs can use to understand how to effectively use the demon CLI tool. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Add quiet flag to list command for machine-readable outputdiogo4642025-06-191-14/+34
| | | | | | | | | | | | | | | | | - Add ListArgs struct with quiet boolean flag - Convert List command from unit variant to struct variant - In quiet mode: no headers, colon-separated format (id:pid:status) - In normal mode: preserve existing table format - Handle quiet mode in all output scenarios (normal, error cases) - Add comprehensive test for quiet mode functionality Example usage: demon list # Normal table output demon list -q # Quiet: process1:123:RUNNING 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Switch to anyhow for improved error handlingdiogo4642025-06-191-17/+18
| | | | | | | | | | | | | | - Replace Box<dyn std::error::Error> with anyhow::Result throughout - Add comprehensive assert_cmd documentation to CLAUDE.md - Create detailed improvement plan in IMPROVEMENT_PLAN.md - Use anyhow::anyhow\! for custom error messages - Add Context trait for better error context where applicable This provides better error messages and more idiomatic Rust error handling. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Initial implementation of demon CLI tooldiogo4642025-06-191-0/+706
Implement complete daemon process management CLI with the following features: - demon run: spawn background processes with stdout/stderr redirection - demon stop: graceful process termination with SIGTERM/SIGKILL timeout - demon tail: real-time file watching and log tailing - demon cat: display log file contents - demon list: show all managed processes with status - demon status: detailed process information - demon clean: remove orphaned files from dead processes Technical implementation: - Uses clap for CLI with enum-based subcommands - Structured logging with tracing crate - File watching with notify crate for efficient tailing - Process management with proper signal handling - Creates .pid, .stdout, .stderr files in working directory - Comprehensive error handling and edge case coverage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>