{"id":20721488,"url":"https://github.com/cleancut/headtail","last_synced_at":"2025-04-06T01:06:33.847Z","repository":{"id":57850440,"uuid":"528522620","full_name":"CleanCut/headtail","owner":"CleanCut","description":"head and tail simultaneously","archived":false,"fork":false,"pushed_at":"2025-01-14T23:36:55.000Z","size":95,"stargazers_count":44,"open_issues_count":5,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T00:05:40.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CleanCut.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license/APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["cleancut"],"patreon":"nathanstocks"}},"created_at":"2022-08-24T17:17:28.000Z","updated_at":"2025-03-19T10:53:10.000Z","dependencies_parsed_at":"2024-02-08T22:25:01.530Z","dependency_job_id":"47d85142-1062-479c-b904-662f9cb93e1b","html_url":"https://github.com/CleanCut/headtail","commit_stats":{"total_commits":85,"total_committers":8,"mean_commits":10.625,"dds":0.3176470588235294,"last_synced_commit":"1e36ded0c4ef355643d90003e37ab7fbb9de8bdf"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Fheadtail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Fheadtail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Fheadtail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanCut%2Fheadtail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CleanCut","download_url":"https://codeload.github.com/CleanCut/headtail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419859,"owners_count":20936012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T03:28:03.341Z","updated_at":"2025-04-06T01:06:33.785Z","avatar_url":"https://github.com/CleanCut.png","language":"Rust","readme":"# headtail\n\n`head` and `tail` simultaneously!\n\n## Backstory\n\nNot finding an existing utility to head _and_ tail the output, nor a good way to combine existing utilities even with the help of a [couple](https://github.com/jorendorff) [friends](https://github.com/bensherman) of [mine](https://github.com/CleanCut), we decided to make one. We ended up doing a \"day of learning\" session with about 50 other engineers from GitHub and collaboritively came up with a minimum viable solution that worked well!\n\nNow it's a real utility that we keep improving. Go try it out!\n\n## Contributing\n\nContributions are welcome! Here are some [good first issues](https://github.com/CleanCut/headtail/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) you could look into.\n\n## Quick Start\n\nYou need to [have Rust installed](https://www.rust-lang.org/tools/install).\n\n```shell\n# Install latest *release* version of headtail\n$ cargo install headtail\n```\n\n```\n# Use it on a file - prints the first 10 and last 10 lines\n$ headtail somebigfile.txt\n\n# Pipe stdout to it - prints the first 10 and last 10 lines\n$ somecommand | headtail\n\n# Print the first 25 and last 5 lines of a file\n$ headtail somebigfile.txt -H 25 -T 5\n\n# Print the default amount of first lines, but only 3 last lines\n$ headtail somebigfile.txt -T 3\n\n# Do the default thing...but then keep tailing the file and print\n# out anything new that is appended to it.\n$ headtail somebigfile.txt -f\n```\n\nSee `headtail -h` for a full list of command-line options.\n\n## Development\n\n```\n# Run locally with arguments\n$ cargo run -- YOUR_ARGS_GO_HERE\n\n# Enable debug logging\n$ RUST_LOG=trace cargo run -- YOUR_ARGS_GO_HERE\n\n# Install local development version of headtail into your ~/.cargo/bin\n$ cargo install --path .\n```\n\n## Software License\n\nDistributed under the terms of both the MIT license and the Apache License (Version 2.0).\n\nSee [license/APACHE](license/APACHE) and [license/MIT](license/MIT).\n","funding_links":["https://github.com/sponsors/cleancut","https://patreon.com/nathanstocks"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleancut%2Fheadtail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleancut%2Fheadtail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleancut%2Fheadtail/lists"}