{"id":23222952,"url":"https://github.com/vindarel/lftp-wrapper","last_synced_at":"2026-01-18T11:42:02.923Z","repository":{"id":265231821,"uuid":"864550223","full_name":"vindarel/lftp-wrapper","owner":"vindarel","description":"lftp wrapper, sftp client for Common Lisp","archived":false,"fork":false,"pushed_at":"2024-11-29T13:22:44.000Z","size":8,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T16:35:04.072Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Common Lisp","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/vindarel.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"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":["vindarel"],"ko_fi":"vindarel"}},"created_at":"2024-09-28T14:17:33.000Z","updated_at":"2024-11-29T13:22:47.000Z","dependencies_parsed_at":"2025-04-05T16:29:49.691Z","dependency_job_id":"2c6797e6-187d-4127-95ff-d88526fe1803","html_url":"https://github.com/vindarel/lftp-wrapper","commit_stats":null,"previous_names":["vindarel/lftp-wrapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vindarel/lftp-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2Flftp-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2Flftp-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2Flftp-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2Flftp-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vindarel","download_url":"https://codeload.github.com/vindarel/lftp-wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2Flftp-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28535177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-12-18T23:15:29.175Z","updated_at":"2026-01-18T11:42:02.909Z","avatar_url":"https://github.com/vindarel.png","language":"Common Lisp","funding_links":["https://github.com/sponsors/vindarel","https://ko-fi.com/vindarel"],"categories":[],"sub_categories":[],"readme":"\nA wrapper around `lftp` to easily send files to a SFTP server.\n\nWhile you can very well format a command line yourself, we ship\nutilities to create profiles and assemble commands.\n\nFor FTP, see also [cl-ftp](https://github.com/pinterface/cl-ftp) which works very well.\n\n**status**: the original copy is running in production©, we are moving things around in this one and things might break. It is also limited, but extensible.\n\n~~~lisp\nCL-USER\u003e (use-package :lftp-wrapper)  ;; optional, or:\nCL-USER\u003e (uiop:add-package-local-nickname :lftp :lftp-wrapper)\n\nCL-USER\u003e (defvar profile (make-profile-from-plist (uiop:read-file-form \"CREDS.lisp-expr\"))\n#\u003cPROFILE protocol: \"sftp\", login: \"user\", port: 10022, server: \"prod.com\", password? T\u003e\n\nCL-USER\u003e (defvar command (put :cd \"I/\" :local-filename \"data.csv\"))\n#\u003cPUT cd: \"I/\", filename: \"data.csv\" {1007153883}\u003e\n\nCL-USER\u003e (run profile command)\n…\nsuccess!\n~~~\n\n## Installation\n\nlftp-wrapper is in [ocicl](https://github.com/ocicl/ocicl).\n\nOtherwise, clone the project where Quicklisp can find it (~/quicklisp/local-projects/, ~/common-lisp/).\n\n\n## Prerequisites\n\n    apt install lftp\n\nthe lftp program handles many protocols, and allows to easily use SFTP on the command line (including giving the password on the command, which otherwise is a bit tedious).\n\nNice to have:\n\ncreate a ~/.lftprc file with:\n\n```\ndebug\nset sftp:auto-confirm 1\n```\n\nthis answers \\\"yes\\\" to accept new servers connections.\n\n## Usage\n\nCreate a profile:\n\n~~~lisp\n(make-profile :login xxx :server xxx :port xxx :password xxx)\n~~~\n\n- it defaults to the \"sftp\" :protocol\n- the password is not revealed on stdout by default.\n\nWe have global variables if you use only one profile during development in your Lisp image:\n\n~~~lisp\n*ftp-server*\n*ftp-login*\n~~~\n\nWe also use a few environment variables to find the credentials:\n\n    LFTP_LOGIN\n    LFTP_PORT\n    etc for server and password\n\nWe also use files to read the credentials, if we don't find env vars:\n\n    LFTP_LOGIN.txt\n    etc\n\nso you can create a profile with only\n\n~~~lisp\n(make-profile)\n~~~\n\nand it looks up the environment variables and then the files.\n\nBut you can also put all your credentials into a lispy file like this:\n\n```lisp\n;; creds.lisp-expr\n(:server \"abc.prod.com\"\n :port 10022\n :login \"user\"\n :password \"****\"\n :protocol \"sftp\"\n )\n```\n\nand use:\n\n~~~lisp\n(make-profile-from-plist (uiop:read-file-form \"creds.lisp-expr\"))\n~~~\n\n## Commands\n\nOur OO ceremony is to easily create commands like\n\n    lftp -p 400 sftp://user:*****@test.org -e \" put file.txt ; bye\"\n\nObviously you can format the string yourself and run it with uiop:run-program, but you would loose out on publishing some code on GitHub.\n\nCreate commands:\n\n~~~lisp\n(defvar put (make-instance 'put :cd \"I/\" :local-filename \"test.txt\"))\n~~~\n\nCurrently we have a generic `command` class and only the `put` child.\n\n\n## Run commands\n\nRun commands for a profile:\n\n~~~lisp\n(run profile put)\n~~~\n\n\u003eNote: it is currently only implemented for `put` commands.  Why? Because of needs-driven development. You can extend the behaviour though, see below.\n\nwith optional arguments:\n\n- `:dry-run` to *not* run the lftp command. See also `*dry-run*`.\n\n## Extend for your own commands\n\nSo if you feel the present use case is pretty limited, you can create\na class of yours and create a method for `build-command`:\n\n~~~lisp\n(defclass my-command (command)\n  ())\n\n(defmethod build-command (profile (command my-command) \u0026key (dry-run *dry-run*))\n  (format nil \"echo building sftp command for user ~a\" (login profile)))\n~~~\n\nnow you can call `run` with a profile object and your command.\n\n\n## Debug and inspect commands\n\nYou can see the sftp command with\n\n~~~lisp\n(build-command profile put)\n~~~\n\n## Lisp?!\n\nThis library was driven by my needs running Common Lisp in production©. Read more: https://lisp-journey.gitlab.io/blog/running-my-4th-lisp-script-in-production/\n\n---\n\nlicence: WTFPL.\n\n@vindarel 2024-2099, running Common Lisp in production©\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvindarel%2Flftp-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvindarel%2Flftp-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvindarel%2Flftp-wrapper/lists"}