{"id":20208830,"url":"https://github.com/palantir/giraffe","last_synced_at":"2025-07-12T18:36:41.787Z","repository":{"id":31675081,"uuid":"35240600","full_name":"palantir/giraffe","owner":"palantir","description":"Gracefully Integrated Remote Access For Files and Execution","archived":false,"fork":false,"pushed_at":"2024-12-13T18:25:31.000Z","size":2583,"stargazers_count":51,"open_issues_count":19,"forks_count":15,"subscribers_count":269,"default_branch":"develop","last_synced_at":"2025-04-02T08:11:20.064Z","etag":null,"topics":["command-execution","filesystem-interaction","giraffe","java","nio2","octo-correct-managed","ssh"],"latest_commit_sha":null,"homepage":"https://palantir.github.io/giraffe/","language":"Java","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/palantir.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":"2015-05-07T19:57:32.000Z","updated_at":"2025-03-12T10:42:01.000Z","dependencies_parsed_at":"2024-12-06T18:39:43.086Z","dependency_job_id":null,"html_url":"https://github.com/palantir/giraffe","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palantir%2Fgiraffe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palantir%2Fgiraffe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palantir%2Fgiraffe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palantir%2Fgiraffe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palantir","download_url":"https://codeload.github.com/palantir/giraffe/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248018060,"owners_count":21034048,"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":["command-execution","filesystem-interaction","giraffe","java","nio2","octo-correct-managed","ssh"],"created_at":"2024-11-14T05:37:18.087Z","updated_at":"2025-04-09T10:08:37.365Z","avatar_url":"https://github.com/palantir.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"docs/src/static/logo.png?raw=true\" alt=\"The Giraffe logo, a giraffe wearing glasses\" width=\"120\" height =\"120\"/\u003e\n\n# Giraffe [![CircleCI](https://circleci.com/gh/palantir/giraffe/tree/develop.svg?style=svg)](https://circleci.com/gh/palantir/giraffe/tree/develop)\n\nGracefully Integrated Remote Access For Files and Execution\n\u003e A long neck to reach far-away places\n\n- [Home](http://palantir.github.io/giraffe/)\n- [Documentation](http://palantir.github.io/giraffe/docs/0.10.1/)\n\n## Overview\n\nGiraffe is a Java library that integrates local and remote file system access\nwith command execution behind a common, familiar API. It combines new classes\nfor command execution with remote implementations of the `java.nio.file` API\nintroduced in Java 7.\n\n```java\nSshHostAccessor ssh = SshHostAccessor.forPassword(\"example.com\", \"giraffe\", \"l0ngN3ck\");\n\ntry (HostControlSystem hcs = ssh.open()) {\n    Path logs = hcs.getPath(\"server/logs\");\n    Files.copy(logs.resolve(\"access.log\"), Paths.get(\"log/example-access.log\"));\n\n    Command archive = hcs.getCommand(\"server/bin/archive.sh\", \"--format=zip\", \"logs\");\n    Commands.execute(archive);\n}\n```\n\n## Get Giraffe\n\nGiraffe is available from [Maven Central][maven-central].\n\nWith **Gradle**:\n\n```gradle\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    compile 'com.palantir.giraffe:giraffe-ssh:0.10.1'\n    // or 'com.palantir.giraffe:giraffe-core:0.10.1' for local features only\n}\n```\n\n[maven-central]: https://repo1.maven.org/maven2/com/palantir/giraffe/\n\n## Why Giraffe?\n\nWhy did we write Giraffe and why might you use it?\n\nWhile working on deployment and test tools we found many situations where we\nwanted to write code that worked easily on both the local host and remote hosts\nusing SSH. This required at least three different APIs with different\nabstractions:\n\n1. Native Java functionality (with third-party utilities) for local files\n2. Native Java functionality or commons-exec for local command execution\n3. An SSH library (sshj, jsch, ganymed-ssh2) for remote file manipulation and\n   command execution\n\nThis led to duplicated abstraction layers in our projects and complicated code\nthat had to know what type of host it was targeting.\n\nWith Giraffe, a single library is required and there are only two APIs: native\nJava functionality for files and an intentionally similar API for command\nexecution.\n\n### Alternatives\n\nThe closest equivalent to Giraffe is XebiaLabs's [Overthere][overthere]. In our\nview, Giraffe has two major benefits when compared to Overthere:\n\n1. It uses the standard `java.nio.file` API introduced in Java 7\n2. It's offered under the Apache 2.0 license instead of the GPLv2\n\nThat said, _Overthere_ supports more protocols and supports Windows, which may\nmake it more appropriate for your use case.\n\n[commons-exec]: https://commons.apache.org/proper/commons-exec/\n[sshj]: https://github.com/hierynomus/sshj\n[jsch]: http://www.jcraft.com/jsch/\n[ganymed-ssh2]: https://code.google.com/p/ganymed-ssh-2/\n[overthere]: https://github.com/xebialabs/overthere\n\n## Support\n\nIn general, any release of Giraffe is supported until a newer version is\nreleased. Users should update to newer versions as soon as possible.\n\nOccasionally, we continue to provide bug fixes and support for the previous\nmajor version series after a new major version release. These releases are\nlisted below. We support old releases for at most 6 months after a new major\nversion release.\n\n*No supported old releases at this time*\n\n## Development\n\nGiraffe builds with Gradle and is configured to use Eclipse as an IDE:\n\n```shell\n$ ./gradlew eclipse     # generate Eclipse projects\n$ ./gradlew build       # compile libraries and run tests\n```\n\nSee `./gradlew tasks` for more options.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalantir%2Fgiraffe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalantir%2Fgiraffe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalantir%2Fgiraffe/lists"}