{"id":22244643,"url":"https://github.com/tchaudhry91/envyr","last_synced_at":"2026-02-08T16:04:48.431Z","repository":{"id":182266707,"uuid":"662076801","full_name":"tchaudhry91/envyr","owner":"tchaudhry91","description":"Envyr is a tool to automagically package an application and run it in a sandboxed environment.","archived":false,"fork":false,"pushed_at":"2024-04-25T08:11:42.000Z","size":106,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-26T08:17:48.372Z","etag":null,"topics":["automation","docker","podman","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/envyr","language":"Rust","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/tchaudhry91.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":"2023-07-04T09:56:52.000Z","updated_at":"2024-04-26T08:17:48.373Z","dependencies_parsed_at":"2024-01-07T10:48:30.648Z","dependency_job_id":"a7b7e028-16aa-46c2-bb0e-36c849c7483d","html_url":"https://github.com/tchaudhry91/envyr","commit_stats":null,"previous_names":["tchaudhry91/envy","tchaudhry91/envyr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchaudhry91%2Fenvyr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchaudhry91%2Fenvyr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchaudhry91%2Fenvyr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchaudhry91%2Fenvyr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tchaudhry91","download_url":"https://codeload.github.com/tchaudhry91/envyr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227857344,"owners_count":17830167,"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":["automation","docker","podman","rust"],"created_at":"2024-12-03T04:37:51.449Z","updated_at":"2026-02-08T16:04:48.426Z","avatar_url":"https://github.com/tchaudhry91.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Envyr\n\nEnvyr automagically packages applications and runs them in sandboxed (or native) environments. It detects the language, installs dependencies, and executes projects — from local paths or git repos — without requiring any local setup.\n\n\u003e This project is in active development and may break.\n\n```bash\n# Run a Python script straight from a git repo — no clone, no pip install, nothing\nenvyr run --autogen git@github.com:tchaudhry91/python-sample-script.git -- https://blog.tux-sudo.com \u003e my_blog.html\n```\n\nOn first run, envyr fetches the repo, detects the language, builds a sandbox, installs dependencies, and runs the script. Subsequent runs reuse the cache and are near-instant.\n\n## Installation\n\n### From crates.io\n\n```bash\ncargo install envyr\n```\n\n### From source\n\n```bash\ngit clone https://github.com/tchaudhry91/envyr.git\ncd envyr\ncargo install --path .\n```\n\n### Requirements\n\n- **Docker executor** (default): Docker or Podman (auto-detected)\n- **Native executor**: Python 3 (for Python projects), Node.js/npm (for Node projects)\n\n## Quick Start\n\n```bash\n# Run a git repo with auto-detection (Docker, the default)\nenvyr run --autogen git@github.com:sivel/speedtest-cli.git\n\n# Run a local project\nenvyr run --autogen ./my-project\n\n# Run natively (no container) — great for piping\necho '{\"name\": \"world\"}' | envyr run --executor native --autogen ./my-script\n\n# Pass arguments to the script\nenvyr run --autogen ./my-project -- arg1 arg2\n\n# Set a timeout (seconds)\nenvyr run --timeout 30 --autogen ./my-project\n```\n\n## Executors\n\n### Docker (default)\n\nRuns the project inside a Docker (or Podman) container. This is the safest option — code runs fully sandboxed.\n\n```bash\nenvyr run --autogen ./my-project\n\n# With port mapping and volume mounts\nenvyr run --autogen ./my-project --port-map 8080:80 --fs-map /data:/app/data\n\n# With network access and interactive mode\nenvyr run --autogen --interactive --network host ./my-project\n```\n\n### Native\n\nRuns the project directly on the host. No containerization overhead — ideal for piping JSON through scripts or quick local runs.\n\n```bash\n# Pipe JSON through a Python script\necho '{\"input\": \"data\"}' | envyr run --executor native --autogen ./my-script\n\n# Pass environment variables\nenvyr run --executor native --autogen ./my-project --env-map API_KEY=secret MY_VAR\n```\n\nFor Python projects, envyr creates an isolated venv at `.envyr/venv` and installs dependencies from `requirements.txt`. For Node projects, it runs `npm install` if `node_modules` doesn't exist. Shell scripts run directly.\n\nWhen running git-fetched code natively, envyr prints a warning to stderr since the code is not sandboxed.\n\n## Language Support\n\n### Python\n\n- Detects `.py` files automatically\n- Installs dependencies from `requirements.txt` (or generates one via [pipreqs](https://pypi.org/project/pipreqs))\n- Finds the entrypoint via `if __name__ == \"__main__\"` or shebang; ties broken by priority\n- Override with `-x \u003centrypoint\u003e`\n\n### Node.js\n\n- Requires `package.json` (used for dependency installation and entrypoint detection via `main` field)\n- Dependencies installed via `npm install`\n\n### Shell\n\n- Detected via shebang (`#!/bin/bash`, etc.)\n- OS-level dependencies can be specified manually during generation\n\n## Aliases\n\nSave frequently used commands as aliases for quick re-use:\n\n```bash\n# Create an alias on successful run\nenvyr run --alias sample --autogen git@github.com:user/repo.git -- default-arg\n\n# Run it later\nenvyr run sample\n\n# Override args\nenvyr run sample -- different-arg\n\n# List and manage aliases\nenvyr alias list\nenvyr alias delete sample\n```\n\n## Generating Metadata\n\nThe `generate` command creates `.envyr/meta.json` (and a Dockerfile) for a project. This is useful for project authors who want to commit the `.envyr` folder so others can run the project without `--autogen`:\n\n```bash\nenvyr generate ./my-project\n\n# With overrides\nenvyr generate ./my-project --entrypoint app.py --type python\n```\n\nWhen using `--autogen` with `run`, this step happens automatically.\n\n## Override Options\n\nIf auto-detection doesn't work, override manually:\n\n| Flag | Description |\n|------|-------------|\n| `-n, --name` | Project name |\n| `-i, --interpreter` | Interpreter path (e.g. `/usr/bin/env python`) |\n| `-x, --entrypoint` | Script entrypoint (e.g. `main.py`) |\n| `-t, --type` | Language type: `python`, `node`, `shell`, `other` |\n\n## Environment Variables\n\nPass environment variables to the executed script:\n\n```bash\n# Explicit key=value\nenvyr run --autogen ./my-project --env-map API_KEY=secret\n\n# Passthrough from current shell\nenvyr run --autogen ./my-project --env-map HOME USER\n\n# Works with both executors\nenvyr run --executor native --autogen ./my-project --env-map DB_URL=postgres://localhost/mydb\n```\n\n## Custom Root Directory\n\nBy default, envyr stores cached repos and aliases in `~/.envyr`. Override with `--root`:\n\n```bash\nenvyr --root /tmp/my-envyr run --autogen ./my-project\n```\n\n## Planned Features\n\n- More language support\n- Bash script dependency detection\n\nSee the [issue tracker](https://github.com/tchaudhry91/envyr/issues) for more.\n\n## License\n\n[Apache-2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchaudhry91%2Fenvyr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftchaudhry91%2Fenvyr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchaudhry91%2Fenvyr/lists"}