{"id":16939458,"url":"https://github.com/a8m/tree","last_synced_at":"2025-04-04T20:10:32.293Z","repository":{"id":52906853,"uuid":"49580851","full_name":"a8m/tree","owner":"a8m","description":"An implementation of the Unix tree command written in Go, that can be used programmatically","archived":false,"fork":false,"pushed_at":"2024-01-04T21:27:47.000Z","size":197,"stargazers_count":93,"open_issues_count":6,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-14T21:04:47.125Z","etag":null,"topics":["go","golang","tree","tree-structure"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a8m.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":"2016-01-13T15:01:50.000Z","updated_at":"2024-09-18T00:21:10.000Z","dependencies_parsed_at":"2024-06-18T13:56:01.765Z","dependency_job_id":"9715e77e-7917-438d-a4b5-593ec8298138","html_url":"https://github.com/a8m/tree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a8m%2Ftree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a8m%2Ftree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a8m%2Ftree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a8m%2Ftree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a8m","download_url":"https://codeload.github.com/a8m/tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242678,"owners_count":20907134,"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":["go","golang","tree","tree-structure"],"created_at":"2024-10-13T21:04:48.226Z","updated_at":"2025-04-04T20:10:32.273Z","avatar_url":"https://github.com/a8m.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"tree [![Build status][travis-image]][travis-url] [![License][license-image]][license-url]\n---\n\u003e An implementation of the [`tree`](http://mama.indstate.edu/users/ice/tree/) command written in Go, that can be used  programmatically.\n\n\u003cimg src=\"https://raw.githubusercontent.com/a8m/tree/assets/assets/tree.png\" height=\"300\" alt=\"tree command\"\u003e\n\n#### Installation:\n```sh\n$ go get github.com/a8m/tree/cmd/tree\n```\n\n#### How to use `tree` programmatically ?\nYou can take a look on [`cmd/tree`](https://github.com/a8m/tree/blob/master/cmd/tree/tree.go), and [s3tree](http://github.com/a8m/s3tree) or see the example below.\n```go\nimport (\n    \"github.com/a8m/tree\"\n)\n\nfunc main() {\n    opts := \u0026tree.Options{\n        // Fs, and OutFile are required fields.\n        // fs should implement the tree file-system interface(see: tree.Fs),\n        // and OutFile should be type io.Writer\n        Fs: fs,\n        OutFile: os.Stdout,\n        // ...\n    }\n    inf.New(\"root-dir\")\n    // Visit all nodes recursively\n    inf.Visit(opts)\n    // Print nodes \n    inf.Print(opts)\n}\n```\n\n### License\nMIT\n\n\n[travis-image]: https://img.shields.io/travis/a8m/tree.svg?style=flat-square\n[travis-url]: https://travis-ci.org/a8m/tree\n[license-image]: http://img.shields.io/npm/l/deep-keys.svg?style=flat-square\n[license-url]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa8m%2Ftree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa8m%2Ftree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa8m%2Ftree/lists"}