{"id":13491353,"url":"https://github.com/Gabriella439/turtle","last_synced_at":"2025-03-28T08:32:59.051Z","repository":{"id":25971723,"uuid":"29413716","full_name":"Gabriella439/turtle","owner":"Gabriella439","description":"Shell programming, Haskell style","archived":false,"fork":false,"pushed_at":"2024-05-23T15:37:10.000Z","size":910,"stargazers_count":949,"open_issues_count":43,"forks_count":90,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-03-25T09:09:25.244Z","etag":null,"topics":["haskell","scripting"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gabriella439.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-01-18T02:53:20.000Z","updated_at":"2025-03-21T22:08:49.000Z","dependencies_parsed_at":"2023-02-11T23:15:54.817Z","dependency_job_id":"f54b4473-9668-487e-9725-631dc8abea42","html_url":"https://github.com/Gabriella439/turtle","commit_stats":null,"previous_names":["gabriel439/haskell-turtle-library"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gabriella439%2Fturtle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gabriella439%2Fturtle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gabriella439%2Fturtle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gabriella439%2Fturtle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gabriella439","download_url":"https://codeload.github.com/Gabriella439/turtle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245996475,"owners_count":20707246,"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":["haskell","scripting"],"created_at":"2024-07-31T19:00:56.013Z","updated_at":"2025-03-28T08:32:58.666Z","avatar_url":"https://github.com/Gabriella439.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"# `turtle`\n\nTurtle is a reimplementation of the Unix command line environment in Haskell so\nthat you can use Haskell as a scripting language or a shell.  Think of `turtle`\nas `coreutils` embedded within the Haskell language.\n\n## Quick start\n\n* Install [Stack](https://github.com/commercialhaskell/stack)\n\n```\n$ stack ghci turtle\nPrelude\u003e :set -XOverloadedStrings\nPrelude\u003e import Turtle\n```\n\n... and try out some basic filesystem operations:\n\n```\nPrelude Turtle\u003e cd \"/tmp\"\nPrelude Turtle\u003e mkdir \"test\"\nPrelude Turtle\u003e touch \"test/foo\"\nPrelude Turtle\u003e testfile \"test/foo\"\nTrue\nPrelude Turtle\u003e rm \"test/foo\"\nPrelude Turtle\u003e testfile \"test/foo\"\nFalse\nPrelude Turtle\u003e rmdir \"test\"\nPrelude Turtle\u003e view (lstree \"/usr/lib\")\nFilePath \"/usr/lib/gnome-screensaver\"\nFilePath \"/usr/lib/gnome-screensaver/gnome-screensaver-dialog\"\nFilePath \"/usr/lib/libplist.so.1.1.8\"\nFilePath \"/usr/lib/tracker\"\nFilePath \"/usr/lib/tracker/tracker-miner-fs\"\nFilePath \"/usr/lib/tracker/tracker-extract\"\nFilePath \"/usr/lib/tracker/tracker-writeback\"\nFilePath \"/usr/lib/tracker/tracker-search-bar\"\nFilePath \"/usr/lib/tracker/tracker-store\"\nFilePath \"/usr/lib/libgif.so.4.1\"\n...\n```\n\nTo learn more, read the [turtle tutorial](https://hackage.haskell.org/package/turtle/docs/Turtle-Tutorial.html).\n\n## Goals\n\nThe `turtle` library focuses on being a \"better Bash\" by providing a typed and\nlight-weight shell scripting experience embedded within the Haskell language.\nIf you have a large shell script that is difficult to maintain, consider\ntranslating it to a \"`turtle` script\" (i.e. a Haskell script using the `turtle`\nlibrary).\n\nAmong typed languages, Haskell possesses a unique combination of features that\ngreatly assist scripting:\n\n* Haskell has global type inference, so all type annotations are optional\n* Haskell is functional and not object-oriented, so boilerplate is minimal\n* Haskell can be type-checked and interpreted quickly (\u003c 1 second startup time)\n\n## Features\n\n* *Batteries included:* Command an extended suite of predefined utilities\n\n* *Interoperability:* You can still run external shell commands\n\n* *Portability:* Works on Windows, OS X, and Linux\n\n* *Exception safety:* Safely acquire and release resources \n\n* *Streaming:* Transform or fold command output in constant space\n\n* *Patterns:* Use typed regular expressions that can parse structured values\n\n* *Formatting:* Type-safe `printf`-style text formatting\n\n* *Modern:* Supports `text` and `system-filepath`\n\n## Caveats\n\nUnlike `shelly`, this package does not use a monad transformer to keep track of\nstate like the current working directory or environment variables.  Instead, all\nstate changes are made to the process's global state.\n\n## Development Status\n\n[![Build Status](https://github.com/Gabriella439/turtle/actions/workflows/haskell-ci.yml/badge.svg)](https://github.com/Gabriella439/turtle/actions/workflows/haskell-ci.yml)\n\n`turtle`'s types and idioms are reasonably complete and I don't expect there\nto be significant changes to the library's core API.  The only major\nfunctionality that I might add in the future would be to wrap\n`optparse-applicative` in a simpler API.\n\nThe set of available tools currently covers as many filesystem utilities as I\ncould find across Hackage, but I would like to continue to add to the set of\navailable tools to minimally match `coreutils`.\n\n## Community Resources\n\n* The\n  [haskell-turtle tag](http://stackoverflow.com/questions/tagged/haskell-turtle)\n  on Stack Overflow\n\n## How to contribute\n\n* Contribute more utilities\n\n* Write `turtle` tutorials\n\n## License (BSD 3-clause)\n\nCopyright (c) 2017 Gabriella Gonzalez\\\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n   * Redistributions of source code must retain the above copyright notice,\n     this list of conditions and the following disclaimer.\n   * Redistributions in binary form must reproduce the above copyright notice,\n     this list of conditions and the following disclaimer in the documentation\n     and/or other materials provided with the distribution.\n   * Neither the name of Gabriella Gonzalez nor the names of other contributors\n     may be used to endorse or promote products derived from this software\n     without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGabriella439%2Fturtle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGabriella439%2Fturtle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGabriella439%2Fturtle/lists"}