{"id":16451061,"url":"https://github.com/auxten/age","last_synced_at":"2025-07-06T12:32:29.699Z","repository":{"id":240229929,"uuid":"801939747","full_name":"auxten/age","owner":"auxten","description":"AG Enhanced (age) extends ag (The Silver Searcher) by adding support for searching within more compressed file formats and automatically compressing older log files.","archived":false,"fork":false,"pushed_at":"2024-05-19T10:08:43.000Z","size":251,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T14:36:47.554Z","etag":null,"topics":["ag","compression","silver-searcher"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/auxten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-05-17T08:01:09.000Z","updated_at":"2024-11-03T22:50:02.000Z","dependencies_parsed_at":"2024-06-19T14:58:34.922Z","dependency_job_id":null,"html_url":"https://github.com/auxten/age","commit_stats":null,"previous_names":["auxten/greplogs"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/auxten/age","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auxten%2Fage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auxten%2Fage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auxten%2Fage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auxten%2Fage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/auxten","download_url":"https://codeload.github.com/auxten/age/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auxten%2Fage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263900814,"owners_count":23527321,"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":["ag","compression","silver-searcher"],"created_at":"2024-10-11T10:07:06.597Z","updated_at":"2025-07-06T12:32:29.680Z","avatar_url":"https://github.com/auxten.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AG Enhanced (age)\n\nAG Enhanced (`age`) is an extension of `ag` (The Silver Searcher), adding support for searching within various compressed file formats and automatically compressing older log files. This project maintains the same usage patterns as `ag`, ensuring seamless integration for existing users with additional functionality.\n\n## Features\n\n- **Search within Compressed Files**: Enables searching within zip, gz, tgz, and zstd compressed files directly.\n- **Automatic Log File Compression**: Automates the compression of `.log` files older than 7 days into `.log.zstd` to efficiently manage disk space.\n- **Familiar `ag` Interface**: Utilizes the same command-line interface as `ag`, allowing users to integrate with no additional learning curve.\n\n## Installation\n\n### Prerequisites\n\nEnsure that `ag` (The Silver Searcher) is installed on your system. For installation instructions, please refer to its [GitHub page](https://github.com/ggreer/the_silver_searcher).\n\n### Installing AG Enhanced\n\nDownload the latest release from the [releases page](https://github.com/auxten/age/releases) and extract the binary to a directory in your `PATH`.\n\nor\n\nInstall `age` directly from the source using Go:\n\n```bash\ngo install github.com/auxten/age@latest\n```\n\n\nThis command fetches the latest version of `age` from the GitHub repository and installs it.\n\n## Usage\n\nUse `age` exactly like `ag`. Here are some example commands to get started:\n\nPlease make sure that the Go binary directory is in your `PATH`.\nor you can use the following command:\n\n```bash\nexport PATH=$PATH:$(go env GOPATH)/bin\n```\n\n```bash\n# Perform a basic search\nage \"search pattern\" /path/to/search\n\n# Use additional `ag` options\nage -i \"search pattern\" /path/to/search\n\n# Search within compressed files\nage \"pattern\" /path/with/compressed/files\n```\n\n## With iterm2\n\nIt's highly recommended to use iterm2 with age. iterm2 has a feature called \"Semantic History\" which allows you to search through the output of the terminal. \nThis feature is very useful when you are searching for a specific command you ran in the past. But if you close the terminal, the history is gone.\nYou can let iterm2 save all the output of the terminal to a directory. This way you can search through the output of the terminal even after you close the terminal.\n\nBut the output of the terminal can be very large and take up a lot of disk space. age can help you with that. \nage can compress the log files automatically after a certain amount of time.\n\nTo activate the session logs, go to iTerm2 Preferences (⌘,), select the \"Profiles\" tab, then the \"Session\" tab. \nUnder \"Miscellaneous\" you can specify a folder where log files for your sessions shall be saved in the future.\n\n![iterm2](iterm2.png)\n\nSee: https://stackoverflow.com/a/35798807/896026\n\nYou can also make a shell function to search your iterm2 session logs:\n\n```bash\nagl() {\n    age \"$@\" ~/Documents/itermLog # change the path to your iterm2 log directory\n}\n```\n\n### Automatic Log File Compression\n\nThis functionality runs automatically. Any `.log` file older than 7 days is compressed to `.log.zstd`, and the original file is deleted.\n\n## Supported File Formats\n\n- **.zip**: Searches are conducted on each file within the zip archive.\n- **.gz**: Gzipped files are decompressed on-the-fly and searched.\n- **.zstd**: Files compressed with Zstandard are decompressed for searching.\n\n## Contributing\n\nContributions are highly appreciated.\n\n## License\n\nThis project is licensed under the Apache-2.0 license. See the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauxten%2Fage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauxten%2Fage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauxten%2Fage/lists"}