<feed xmlns='http://www.w3.org/2005/Atom'>
<title>demon/src, branch fix-tail-flag-logic</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/'/>
<entry>
<title>Refactor cat and tail flag logic for better readability</title>
<updated>2025-06-26T15:23:49+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-06-26T15:23:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/commit/?id=c81a2bd80ef827d1cdacf75d3770f29ccf196cb4'/>
<id>c81a2bd80ef827d1cdacf75d3770f29ccf196cb4</id>
<content type='text'>
Replace the cryptic boolean expressions with clearer if-else logic that
explicitly handles the flag combinations:

Old logic (functionally correct but hard to understand):
    let show_stdout = !args.stderr || args.stdout;
    let show_stderr = !args.stdout || args.stderr;

New logic (clear and self-documenting):
    let show_stdout = if args.stdout || args.stderr {
        args.stdout
    } else {
        true // Show both when no flags are specified
    };

This change improves code readability while maintaining identical behavior:
- No flags: show both stdout and stderr
- --stdout only: show only stdout
- --stderr only: show only stderr
- Both flags: show both stdout and stderr

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the cryptic boolean expressions with clearer if-else logic that
explicitly handles the flag combinations:

Old logic (functionally correct but hard to understand):
    let show_stdout = !args.stderr || args.stdout;
    let show_stderr = !args.stdout || args.stderr;

New logic (clear and self-documenting):
    let show_stdout = if args.stdout || args.stderr {
        args.stdout
    } else {
        true // Show both when no flags are specified
    };

This change improves code readability while maintaining identical behavior:
- No flags: show both stdout and stderr
- --stdout only: show only stdout
- --stderr only: show only stderr
- Both flags: show both stdout and stderr

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add comprehensive root directory validation tests</title>
<updated>2025-06-26T15:21:49+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-06-26T15:21:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/commit/?id=2ecd1296b6ba9ca8b07b3fbf4a11b7f3ec91038e'/>
<id>2ecd1296b6ba9ca8b07b3fbf4a11b7f3ec91038e</id>
<content type='text'>
These tests cover edge cases including:
- Root directory specified as file instead of directory
- Non-existent root directories
- .demon directory exists as file in git root
- Permission denied scenarios
- Symlink handling (valid and broken)
- Invalid UTF-8 paths
- Deeply nested paths

Most validation is already working correctly, but these tests
document and verify the expected behavior for edge cases.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These tests cover edge cases including:
- Root directory specified as file instead of directory
- Non-existent root directories
- .demon directory exists as file in git root
- Permission denied scenarios
- Symlink handling (valid and broken)
- Invalid UTF-8 paths
- Deeply nested paths

Most validation is already working correctly, but these tests
document and verify the expected behavior for edge cases.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add clippy check to pre-commit hook and fix all clippy warnings</title>
<updated>2025-06-23T09:44:45+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-06-23T09:44:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/commit/?id=154cc5c6ace2d19436bdbe9aa5a201cc68b53b8e'/>
<id>154cc5c6ace2d19436bdbe9aa5a201cc68b53b8e</id>
<content type='text'>
- Enhanced pre-commit hook to run cargo clippy with -D warnings
- Fixed uninlined_format_args warnings by using variables directly in format strings
- Removed needless borrows in .args() calls
- Fixed print_literal warnings by moving literals out of format placeholders
- Replaced seek_from_current with stream_position for better semantics
- Fixed len_zero warning by using is_empty() instead of len() &gt; 0

All code now passes both cargo fmt and cargo clippy checks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Enhanced pre-commit hook to run cargo clippy with -D warnings
- Fixed uninlined_format_args warnings by using variables directly in format strings
- Removed needless borrows in .args() calls
- Fixed print_literal warnings by moving literals out of format placeholders
- Replaced seek_from_current with stream_position for better semantics
- Fixed len_zero warning by using is_empty() instead of len() &gt; 0

All code now passes both cargo fmt and cargo clippy checks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add pre-commit hook for cargo fmt and apply formatting</title>
<updated>2025-06-23T09:36:24+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-06-23T09:36:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/commit/?id=b257b2259dc3ad7d0aa4df86ef241b66932204a9'/>
<id>b257b2259dc3ad7d0aa4df86ef241b66932204a9</id>
<content type='text'>
- Created pre-commit hook that runs cargo fmt --check
- If formatting issues found, runs cargo fmt and asks for re-commit
- Applied cargo fmt to fix existing formatting issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Created pre-commit hook that runs cargo fmt --check
- If formatting issues found, runs cargo fmt and asks for re-commit
- Applied cargo fmt to fix existing formatting issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Change default root directory to use .demon subdirectory</title>
<updated>2025-06-22T21:15:14+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-06-22T21:15:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/commit/?id=ea62efa29f99791030c6e486955580051ced3e29'/>
<id>ea62efa29f99791030c6e486955580051ced3e29</id>
<content type='text'>
- Modified find_git_root() to create and return &lt;git_root&gt;/.demon instead of &lt;git_root&gt;
- Auto-creates .demon directory if it doesn't exist
- Added proper error handling for edge cases (file vs directory conflicts, permissions)
- Maintains backward compatibility with explicit --root-dir flag
- Added comprehensive test to verify new default behavior
- Fixed test argument ordering for test_list_empty

Files are now organized as:
- Before: /project/daemon.pid, /project/daemon.stdout, /project/daemon.stderr
- After: /project/.demon/daemon.pid, /project/.demon/daemon.stdout, /project/.demon/daemon.stderr

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Modified find_git_root() to create and return &lt;git_root&gt;/.demon instead of &lt;git_root&gt;
- Auto-creates .demon directory if it doesn't exist
- Added proper error handling for edge cases (file vs directory conflicts, permissions)
- Maintains backward compatibility with explicit --root-dir flag
- Added comprehensive test to verify new default behavior
- Fixed test argument ordering for test_list_empty

Files are now organized as:
- Before: /project/daemon.pid, /project/daemon.stdout, /project/daemon.stderr
- After: /project/.demon/daemon.pid, /project/.demon/daemon.stdout, /project/.demon/daemon.stderr

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add environment variable support for root directory configuration</title>
<updated>2025-06-19T16:13:33+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-06-19T16:13:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/commit/?id=f8bac42e942d7223cecae65d74c91eb35be7830c'/>
<id>f8bac42e942d7223cecae65d74c91eb35be7830c</id>
<content type='text'>
Enable setting the root directory via DEMON_ROOT_DIR environment variable by adding 'env' feature to clap and configuring the root_dir argument to read from environment.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable setting the root directory via DEMON_ROOT_DIR environment variable by adding 'env' feature to clap and configuring the root_dir argument to read from environment.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add configurable root directory for daemon files with git root discovery</title>
<updated>2025-06-19T16:11:09+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-06-19T16:11:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/commit/?id=a365f12a6c6e7775a5bd3c6177050b74826c608c'/>
<id>a365f12a6c6e7775a5bd3c6177050b74826c608c</id>
<content type='text'>
Implement --root-dir global option to specify where daemon files (PID, stdout, stderr) are created. When not specified, automatically searches upward for git repository root. This addresses the issue of daemon files being scattered across various working directories.

Key features:
- Global --root-dir option available on all commands
- Automatic git root discovery when --root-dir not specified
- Proper error handling for invalid directories
- Updated all file operations to use configurable root directory
- Optimized HashMap usage with PathBuf for better performance
- Fixed ID extraction to show daemon names instead of full paths
- Updated tests to work with new directory structure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement --root-dir global option to specify where daemon files (PID, stdout, stderr) are created. When not specified, automatically searches upward for git repository root. This addresses the issue of daemon files being scattered across various working directories.

Key features:
- Global --root-dir option available on all commands
- Automatic git root discovery when --root-dir not specified
- Proper error handling for invalid directories
- Updated all file operations to use configurable root directory
- Optimized HashMap usage with PathBuf for better performance
- Fixed ID extraction to show daemon names instead of full paths
- Updated tests to work with new directory structure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Enhance tail command with follow mode control and line count options</title>
<updated>2025-06-19T15:47:58+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-06-19T15:47:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/commit/?id=9c3d24b08649ebf6d4a3614f3506ce2702aafd74'/>
<id>9c3d24b08649ebf6d4a3614f3506ce2702aafd74</id>
<content type='text'>
Add -f/--follow flag to control real-time following behavior and -n/--lines option to specify number of lines to display. By default, tail now shows the last 50 lines and exits, only following when -f is explicitly provided.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add -f/--follow flag to control real-time following behavior and -n/--lines option to specify number of lines to display. By default, tail now shows the last 50 lines and exits, only following when -f is explicitly provided.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add wait subcommand for blocking until process termination</title>
<updated>2025-06-19T09:03:56+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-06-19T09:03:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/commit/?id=5101d9c410a7c901ea20636d2a4e56b3282a1c14'/>
<id>5101d9c410a7c901ea20636d2a4e56b3282a1c14</id>
<content type='text'>
Implements a new 'wait' subcommand that blocks until a specified daemon process terminates, with configurable timeout and polling interval.

Features:
- Default 30-second timeout, configurable with --timeout flag
- Infinite wait with --timeout 0
- Configurable polling interval with --interval flag (default 1 second)
- Quiet operation - only shows errors on failure
- Preserves PID files (doesn't clean up)
- Exit codes: 0 for success, 1 for failure

Usage examples:
- demon wait my-process                    # Wait 30s
- demon wait my-process --timeout 0        # Wait indefinitely
- demon wait my-process --timeout 60 --interval 2  # Custom timeout/interval

Added comprehensive test suite covering:
- Non-existent processes
- Already terminated processes
- Normal process termination
- Timeout scenarios
- Infinite timeout behavior
- Custom polling intervals

Updated documentation:
- README.md with wait command reference and usage examples
- LLM guide with detailed wait command documentation
- Integration examples for development workflows

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implements a new 'wait' subcommand that blocks until a specified daemon process terminates, with configurable timeout and polling interval.

Features:
- Default 30-second timeout, configurable with --timeout flag
- Infinite wait with --timeout 0
- Configurable polling interval with --interval flag (default 1 second)
- Quiet operation - only shows errors on failure
- Preserves PID files (doesn't clean up)
- Exit codes: 0 for success, 1 for failure

Usage examples:
- demon wait my-process                    # Wait 30s
- demon wait my-process --timeout 0        # Wait indefinitely
- demon wait my-process --timeout 60 --interval 2  # Custom timeout/interval

Added comprehensive test suite covering:
- Non-existent processes
- Already terminated processes
- Normal process termination
- Timeout scenarios
- Infinite timeout behavior
- Custom polling intervals

Updated documentation:
- README.md with wait command reference and usage examples
- LLM guide with detailed wait command documentation
- Integration examples for development workflows

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add comprehensive README.md with complete documentation</title>
<updated>2025-06-19T08:48:21+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-06-19T08:48:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/demon/commit/?id=f464b78ac2f8fac6a267271486705e17a6233695'/>
<id>f464b78ac2f8fac6a267271486705e17a6233695</id>
<content type='text'>
- Add detailed overview highlighting key features and benefits
- Include installation instructions for multiple methods
- Provide comprehensive command reference with examples
- Document use cases for development, LLM integration, DevOps
- Add practical examples for each major workflow
- Include machine-readable output documentation for automation
- Document file management, security, and system requirements
- Add contributing guidelines and development setup
- Position as LLM-friendly tool for background process management
- Focus on developer experience and automation integration
- Highlight key differentiators vs similar tools

README emphasizes:
- Simplicity and zero-configuration approach
- LLM agent integration capabilities
- Development workflow optimization
- Practical examples for common scenarios
- Clear documentation for automation use cases

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add detailed overview highlighting key features and benefits
- Include installation instructions for multiple methods
- Provide comprehensive command reference with examples
- Document use cases for development, LLM integration, DevOps
- Add practical examples for each major workflow
- Include machine-readable output documentation for automation
- Document file management, security, and system requirements
- Add contributing guidelines and development setup
- Position as LLM-friendly tool for background process management
- Focus on developer experience and automation integration
- Highlight key differentiators vs similar tools

README emphasizes:
- Simplicity and zero-configuration approach
- LLM agent integration capabilities
- Development workflow optimization
- Practical examples for common scenarios
- Clear documentation for automation use cases

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
