{"id":14956272,"url":"https://github.com/jadedctrl/cl-ipfs-api2","last_synced_at":"2025-10-01T17:31:17.910Z","repository":{"id":49140125,"uuid":"188358037","full_name":"JadedCtrl/cl-ipfs-api2","owner":"JadedCtrl","description":"Lisp bindings for the IPFS HTTP API. (🪞 Mirror)","archived":false,"fork":false,"pushed_at":"2024-05-30T17:59:22.000Z","size":106,"stargazers_count":9,"open_issues_count":7,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T12:00:27.003Z","etag":null,"topics":["ipfs","ipfs-api","ipfs-client","ipfs-http-client"],"latest_commit_sha":null,"homepage":"https://hak.xwx.moe/jadedctrl/cl-ipfs-api2","language":"Common Lisp","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JadedCtrl.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":"COPYING.txt","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":"2019-05-24T05:30:47.000Z","updated_at":"2024-05-30T17:59:27.000Z","dependencies_parsed_at":"2024-05-30T20:39:13.290Z","dependency_job_id":"89253f2d-7923-4627-ab59-cabcbe6f1548","html_url":"https://github.com/JadedCtrl/cl-ipfs-api2","commit_stats":{"total_commits":42,"total_committers":3,"mean_commits":14.0,"dds":0.1428571428571429,"last_synced_commit":"d5c2aa25110c4e086445efbf7ad430e5ac722d9e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadedCtrl%2Fcl-ipfs-api2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadedCtrl%2Fcl-ipfs-api2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadedCtrl%2Fcl-ipfs-api2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadedCtrl%2Fcl-ipfs-api2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JadedCtrl","download_url":"https://codeload.github.com/JadedCtrl/cl-ipfs-api2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234883233,"owners_count":18901366,"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":["ipfs","ipfs-api","ipfs-client","ipfs-http-client"],"created_at":"2024-09-24T13:12:37.864Z","updated_at":"2025-10-01T17:31:12.588Z","avatar_url":"https://github.com/JadedCtrl.png","language":"Common Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"===============================================================================\nCL-IPFS-API²                                                                   \n===============================================================================\n\n:cl-ipfs-api² is a pretty simple set of IPFS bindings for Common Lisp, using\nthe HTTP API for (almost) everything, except for pubsub (which uses the locally\ninstalled go-ipfs program).\nIt uses Drakma, YASON, and UIOP.\n\n\n————————————————————————————————————————\nUSAGE\n————————————————————————————————————————\n:cl-ipfs-api² is available on Quicklisp, so just run:\n        \u003e (ql:quickload :cl-ipfs-api2)\n\nThen you can do things like:\n\t\u003e (ipfs:add #p\"~/.bashrc\")\n\t\"QmZweanA1JRNio6DKnPN6yECWCrxmWqqG7WWUNtyuji9hZ\"\n\n\t\u003e (ipfs:cat \"/ipns/ipfs.io/index.html\")\n\t\"\u003c!DOCTYPE html\u003e\n\t……\"\n\nMost commands available are one-to-one with their API/cli counter-parts,\nwith a few notable exceptions:\n\t* #'dl\t(counter-part to the /get call. the name is different, so\n\t         as to not conflict with #'common-lisp:get)\n\nThe calls implemented so far:\n\t* root (cat, add, id, ls, resolve, etc)\n\t* bitswap, block, bootstrap\n\t* cid, config (config, config/show)\n\t* dag, dht, diag\n\t* file, files, filestore\n\t* key, name, object\n\t* p2p, pin, pubsub\n\t* refs, repo, stats\n\t* swarm, urlstore\n\t* version (version, version/deps)\n\nSome calls were skipped over, but wouldn't be hard to add:\n\t* object/put, object/set-data object/patch/append-data\n\t* tar calls were deliberately ignored (useless)\n\nFunctions return either strings, lists, or associative lists, depending on\ncontext. All errors return two values— nil and an error message (string).\n\nMake sure to read docstrings for specific information, and keeping the API\nreference handy is a good idea (/ipns/docs.ipfs.io/reference/api/http/).\n\n————————————————————\nUSEFUL VARIABLES\n————————————————————\nThere are three exported variables:\n\tipfs:*api-host*    →   \"http://127.0.0.1:5001\"\n\tipfs:*api-root*    →   \"/api/v0/\"\n\tipfs:*ipfs-root*   →   NIL\n\n*api-host* is the protocol, host, and port of the API server— unless you're\nusing a custom port or remote server, this probably won't need to change.\n*api-root* is the URL root of all API calls on the server— only changes under\nvery strange circumstances.\n*ipfs-root* is the “root” of the local IPFS daemon. This is only used with\nthe pubsub commands, since they actually invoke the local `ipfs` program.\nYou only need to change this variable if your $IPFS_PATH is irregular, like\n\"/var/ipfs/\" or something weird like that.\n\n————————————————————\nPUBSUB USAGE\n————————————————————\nPubsub usage here is such an abberation that it warrants its own section.\nSince there isn't a (functional) HTTP API for pubsub yet, we're using the\nactual go-ipfs program from your computer.\n\nIf you don't have go-ipfs locally installed, it won't work.\nIf you are using Windows, or anything but *nix, it probably won't work.\nIf you haven't enabled pubsub (--enable-pubsub-experiment argument to daemon),\nit won't work.\n\nYou can sub to a topic with, ofc, #'pubsub-sub, which will return a\nUIOP-originated process-info stream— while the `ipfs pubsub sub` command runs\nin the background.\n\nThis stream can't be directly #'read-char or #'listen with, which is exactly\nwhat you wanna do— instead, running #'uiop/launch-program:process-info-output\non it is necessary to expose a usable stream.\n\nTo make all that easier, there's a little abstraction I added which obfuscates\nUIOP use and is adequate shorthand:\n\t* #'pubsub-sub-read-char\n\t* #'pubsub-sub-listen\n\t* #'pubsub-sub-process\n\t* #'pubsub-sub-close\n\nAll of those operate on the original UIOP-originated process-info stream, and\nwork exactly like you'd expect.\nThe only weird, non-obvious one is probably #'pubsub-sub-process, which applies\n#'uiop/launch-program:process-info-output— just in case you need the raw,\nusable stream.\n\nAnyway, with this, you can get a continuous read on what's going on with the\ntopic you're subbed to. To publish to a topic, run #'pubsub-pub with the topic\nand data as arguments. Pretty simple.\n\nBoth #'pubsub-sub and #'pubsub-pub, being the only functions that run a shell\ncommand, include an :env argument. If you supply a string as the :env argument,\nthat string will prefix the \"ipfs\" command— basically only useful for changing\nsomething with the \"env\" command (like $IPFS_PATH).\n\nAlso, if you change the ipfs:*ipfs-root* variable (to the correct value of\n$IPFS_PATH), the :env arguments (unless otherwise specified) will default to\n\"env IPFS_PATH=\" + ipfs:*ipfs-root* + \" \u003e /dev/null;\"\n\n\n————————————————————————————————————————\nBORING STUFF\n————————————————————————————————————————\nLicense is the GNU LGPLv3:\n       check COPYING.txt (/ipfs/QmR8Rnk5QdXgrXRqmgMLmG5PuHZEjujfa3rfVhPV99TLY7)\nAuthor is Jaidyn Ann \u003cjadedctrl@posteo.at\u003e\nSauce is at https://hak.xwx.moe/jadedctrl/cl-ipfs-api2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadedctrl%2Fcl-ipfs-api2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjadedctrl%2Fcl-ipfs-api2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadedctrl%2Fcl-ipfs-api2/lists"}