{"id":20586412,"url":"https://github.com/piger/fox","last_synced_at":"2025-07-29T09:33:55.949Z","repository":{"id":45435518,"uuid":"173480435","full_name":"piger/fox","owner":"piger","description":"🦊 is a mini automation framework; it runs commands on remote servers, kinda like Fabric.","archived":false,"fork":false,"pushed_at":"2021-12-14T03:15:37.000Z","size":78,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-26T13:52:36.798Z","etag":null,"topics":["fabric","python","remote-execution","ssh"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piger.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}},"created_at":"2019-03-02T17:53:46.000Z","updated_at":"2022-12-08T23:52:12.000Z","dependencies_parsed_at":"2022-09-22T08:06:26.490Z","dependency_job_id":null,"html_url":"https://github.com/piger/fox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/piger/fox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piger%2Ffox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piger%2Ffox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piger%2Ffox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piger%2Ffox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piger","download_url":"https://codeload.github.com/piger/fox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piger%2Ffox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267662435,"owners_count":24123884,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fabric","python","remote-execution","ssh"],"created_at":"2024-11-16T07:11:39.835Z","updated_at":"2025-07-29T09:33:55.921Z","avatar_url":"https://github.com/piger.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🦊 (Fox)\n\n![tests](https://github.com/piger/fox/actions/workflows/test.yml/badge.svg)\n[![Documentation Status](https://readthedocs.org/projects/fox-py/badge/?version=latest)](https://fox-py.readthedocs.io/en/latest/?badge=latest)\n\n🦊 (Fox) is an _experimental_ alternative implementation of _some_ of the\n[Fabric 1.14](http://docs.fabfile.org/en/1.14/) APIs.\n\nCheck out the documentation on [readthedocs](https://fox-py.readthedocs.io/en/latest/index.html).\n\n**NOTE**: this project is under development.\n\n## Why?\n\nI want to keep using the old Fabric 1.14 APIs with Python3:\n\n- Fabric 2 changed the APIs\n- Fabric3 (a fork of Fabric 1.14 for Python3) has some issues with Python3\n- Maybe it's better to start from scratch with smaller project scope and focusing on Python3 only\n\n## Example usage\n\nAdapting code that uses Fabric 1.x should be easy enough, but some features will be missing and some\nwill behave differently.\n\n``` python\nfrom fox.conf import env\nfrom fox.api import run, sudo\n\nenv.host_string = \"server.example.com\"\nenv.sudo_password = \"very secret\"\n\nrun(\"./configure --with-prefix=/90s\", cd=\"/code/project\")\nsudo(\"make install\", cd=\"/code/project\")\n\n# escaping should be handled correctly, for example:\nrun(\n    \"\"\"tail -n 1 \u003c /etc/passwd | awk 'BEGIN { FS=\":\" } { print $1 \" and \" $3 }'\"\"\"\n)\n```\n\nYou can also use an explicit API:\n\n``` python\nfrom fox.connection import Connection\nfrom fox.conf import env\n\nenv.sudo_password = \"much more secret\"\nconn = Connection(\"app1.example.com\")\nconn.put(\"nginx.conf\", \"/tmp/nginx.conf\")\n# NOTE there is no \"put() with sudo\"\nconn.sudo(\"mv /tmp/nginx.conf /etc/nginx/\")\nconn.sudo(\"systemctl restart nginx\")\nconn.disconnect()\n```\n\nYou can also use Cluster mode when you want to run the same command on several hosts in parallel:\n\n``` python\nfrom fox.cluster import Cluster\n\ncluster = Cluster(\"app1.example.com\", \"app2.example.com\", \"app3.example.com\")\ncluster.run(\"sleep $((1 + RANDOM % 5)) \u0026\u0026 hostname\", limit=2)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiger%2Ffox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiger%2Ffox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiger%2Ffox/lists"}