{"id":51242464,"url":"https://github.com/gavindsouza/weg","last_synced_at":"2026-06-29T01:30:35.083Z","repository":{"id":363045621,"uuid":"977559688","full_name":"gavindsouza/weg","owner":"gavindsouza","description":"The fast, modern CLI for Frappe development — replaces bench [alpha/experimental]","archived":false,"fork":false,"pushed_at":"2026-05-26T08:39:50.000Z","size":1134,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-07T07:26:35.978Z","etag":null,"topics":["bench","cli","developer-tools","erpnext","frappe","frappe-framework"],"latest_commit_sha":null,"homepage":"","language":"Go","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/gavindsouza.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-04T13:40:40.000Z","updated_at":"2026-05-26T09:40:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gavindsouza/weg","commit_stats":null,"previous_names":["gavindsouza/weg"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gavindsouza/weg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavindsouza%2Fweg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavindsouza%2Fweg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavindsouza%2Fweg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavindsouza%2Fweg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavindsouza","download_url":"https://codeload.github.com/gavindsouza/weg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavindsouza%2Fweg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34910177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"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":["bench","cli","developer-tools","erpnext","frappe","frappe-framework"],"created_at":"2026-06-29T01:30:30.975Z","updated_at":"2026-06-29T01:30:35.076Z","avatar_url":"https://github.com/gavindsouza.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weg\n\n[![Go](https://img.shields.io/badge/Go-1.24+-00ADD8?logo=go\u0026logoColor=white)](https://go.dev)\n[![License: Apache 2.0](https://img.shields.io/github/license/gavindsouza/weg)](LICENSE)\n\nThe fast way to develop Frappe apps.\n\nWeg means \"way\" in German and \"speed\" in Marathi/Sanskrit — a modern replacement for Frappe's `bench` CLI with declarative configuration and faster tooling.\n\n## Three Development Modes\n\nWeg supports three distinct workflows for Frappe development:\n\n### 1. App-Centric Development\n\nYour app is the project root. The bench infrastructure is hidden in `.weg/`. Ideal for developing a single Frappe app with modern tooling.\n\n```bash\nweg new myapp\ncd myapp\nweg start\n```\n\nConfiguration lives in `pyproject.toml [tool.weg]`.\n\n### 2. Bench-Centric Development\n\nTraditional bench directory structure. Use this when working with multiple apps or migrating from existing bench setups.\n\n```bash\ncd /path/to/frappe-bench\nweg init\nweg start\n```\n\nConfiguration lives in `weg.toml`.\n\n### 3. Remote-Site Development\n\nWork with remote Frappe sites (like Frappe Cloud) without direct bench access. Clone customizations locally, edit with any tools, and sync changes back.\n\n```bash\nweg remote clone https://mysite.frappe.cloud mysite\ncd mysite\n# Edit Client Scripts, Server Scripts, Custom Fields locally\nweg remote push -m \"Add priority field to Todo\"\n```\n\nThis creates a git-backed directory mirroring the site's customizations, enabling version control, team collaboration, and AI-assisted editing.\n\n## Key Features\n\n- **Declarative configuration** via `weg.toml` or `pyproject.toml`\n- **Modern tooling** - devbox (Nix), uv (fast Python), process-compose\n- **Direct API access** - `weg api` without HTTP overhead\n- **Container support** - Docker Compose generation and production image builds\n- **MCP server** - AI assistant integration via Model Context Protocol\n- **70+ commands** covering all common Frappe development workflows\n- **Works from anywhere** - run commands from any subdirectory within your project\n\n## Installation\n\n```bash\n# Download the latest binary\ncurl -fsSL https://github.com/gavindsouza/weg/releases/latest/download/weg-$(uname -s)-$(uname -m) -o weg\nchmod +x weg\nmkdir -p ~/.local/bin\nmv weg ~/.local/bin/\n\n# Add to PATH if not already (add to ~/.bashrc or ~/.zshrc)\nexport PATH=\"$HOME/.local/bin:$PATH\"\n\n# Or build from source\ngit clone https://github.com/gavindsouza/weg\ncd weg\ngo build -o weg .\nmv weg ~/.local/bin/\n```\n\n## Quick Start\n\n### App-Centric (new app)\n\n```bash\nweg new myapp\ncd myapp\nweg start\nweg site browse    # Open in browser (auto-login as Administrator)\n```\n\n### Bench-Centric (existing bench)\n\n```bash\ncd /path/to/frappe-bench\nweg init\nweg start\n```\n\n### Remote-Site (Frappe Cloud or any remote site)\n\n```bash\nweg remote clone https://mysite.frappe.cloud mysite\ncd mysite\n# Edit customizations locally...\nweg remote status  # See what changed\nweg remote push    # Push changes to remote\n```\n\n## Common Commands\n\n### Site Management\n\n```bash\nweg site list                    # List all sites\nweg site new mysite.localhost    # Create new site\nweg site drop mysite.localhost   # Delete site\nweg site use mysite.localhost    # Set default site\nweg site backup                  # Backup current site\nweg site restore backup.sql.gz   # Restore from backup\nweg site password                # Reset admin password\nweg site browse                  # Open site in browser\n```\n\n### App Management\n\n```bash\nweg app list                     # List installed apps\nweg app get erpnext              # Install ERPNext\nweg app get https://github.com/user/custom-app\nweg app remove custom-app        # Remove an app\nweg site install custom-app      # Install app on site\n```\n\n### Development\n\n```bash\nweg start                        # Start all services\nweg stop                         # Stop all services\nweg build                        # Build frontend assets\nweg build --app myapp            # Build specific app\nweg test                         # Run tests\nweg test --module myapp.tests    # Run specific tests\nweg console                      # Open Python console\nweg db console                   # Open database console\n```\n\n### Cache \u0026 Maintenance\n\n```bash\nweg cache clear                  # Clear Redis + pycache\nweg scheduler status             # Check scheduler status\nweg scheduler enable             # Enable background jobs\nweg scheduler disable            # Disable background jobs\nweg scheduler jobs               # List pending jobs\n```\n\n### API Access\n\n```bash\n# Direct API calls without HTTP overhead\nweg api call frappe.client.get_count doctype=User\nweg doc get User Administrator   # Get a document\nweg doc list User --limit 10     # List documents\nweg doctype list                 # List all doctypes\n```\n\n### Remote Site Development\n\n```bash\nweg remote clone \u003curl\u003e \u003cdir\u003e     # Clone site customizations\nweg remote pull                  # Pull changes from remote\nweg remote push                  # Push local changes to remote\nweg remote push -m \"message\"     # Push with commit message\nweg remote status                # Show local vs remote diff\nweg remote sync                  # Bidirectional sync\nweg remote login \u003curl\u003e           # Save credentials for a site\n```\n\n### Frappe Cloud\n\n```bash\nweg cloud login                  # Authenticate with Frappe Cloud\nweg cloud sites                  # List your sites\nweg cloud deploy mysite          # Deploy to cloud\nweg cloud logs mysite            # View site logs\n```\n\n### Docker \u0026 Containers\n\n```bash\n# Docker Compose for local development\nweg docker init                  # Generate docker-compose.yml\nweg docker init --mode prod      # Generate for production\nweg docker up                    # Start containers\nweg docker down                  # Stop containers\nweg docker logs                  # View container logs\nweg docker ps                    # List running containers\n\n# Build production images\nweg image build                  # Build container image\nweg image build --tag myapp:v1   # Custom tag\nweg image build --push           # Build and push to registry\nweg image list                   # List local images\n```\n\n## Configuration\n\nWeg uses `weg.toml` for bench-centric projects or `pyproject.toml [tool.weg]` for app-centric projects.\n\n### weg.toml (bench-centric)\n\n```toml\n[frappe]\nversion = \"15\"\ndatabase = \"mariadb\"\n\n[apps.erpnext]\nurl = \"https://github.com/frappe/erpnext\"\nbranch = \"version-15\"\n\n[[sites]]\nname = \"mysite.localhost\"\ndefault = true\napps = [\"frappe\", \"erpnext\"]\n\n[services.workers]\nshort = 1\ndefault = 2\nlong = 1\n```\n\n### pyproject.toml (app-centric)\n\n```toml\n[tool.weg]\nfrappe_version = \"15\"\n\n[tool.weg.dependencies]\nerpnext = { url = \"https://github.com/frappe/erpnext\", branch = \"version-15\" }\n\n[tool.weg.sites]\ndefault = \"dev.localhost\"\n```\n\n## Customizing Services\n\n### Process Compose (Development)\n\nWeg generates `process-compose.yaml` for running development services. You can customize it by creating `process-compose.override.yaml`:\n\n```yaml\n# process-compose.override.yaml\nprocesses:\n  web:\n    environment:\n      - GUNICORN_WORKERS=4\n\n  # Disable a process\n  watch:\n    disabled: true\n\n  # Add a custom process\n  mailhog:\n    command: mailhog\n    readiness_probe:\n      http_get:\n        port: 8025\n```\n\nThe override file is automatically included when present (uses process-compose's native include feature).\n\n### Docker Compose (Containerized)\n\nFor containerized development or production, use `weg docker init` to generate a `docker-compose.yml` with all required services (web, workers, scheduler, socketio, database, Redis).\n\nOptions include `--mode prod` for production settings, `--no-db` for external databases, and `--web-port` to customize ports. Edit the generated file directly or use Docker Compose overrides for further customization.\n\n### Container Images\n\nUse `weg image build` to create OCI-compliant production images. The multi-stage Dockerfile generates specialized targets (web, worker, scheduler, socketio) optimized for deployment to Docker, Podman, or Kubernetes.\n\n## Shell Completions\n\nThe easiest way to enable completions:\n\n```bash\n# Bash - add to ~/.bashrc\neval \"$(weg completion bash)\"\n\n# Zsh - add to ~/.zshrc\neval \"$(weg completion zsh)\"\n\n# Fish - run once\nweg completion fish | source\n# Or persist: weg completion fish \u003e ~/.config/fish/completions/weg.fish\n```\n\nFor faster shell startup (optional), you can cache the completions:\n\n```bash\n# Bash\nweg completion bash \u003e ~/.local/share/bash-completion/completions/weg\n\n# Zsh (if using Oh My Zsh)\nweg completion zsh \u003e ~/.oh-my-zsh/completions/_weg\n```\n\n## vs bench\n\n| Feature | weg | bench |\n|---------|-----|-------|\n| Configuration | Declarative (TOML) | Imperative (commands) |\n| Development modes | App-centric, bench-centric, remote-site | Bench-centric only |\n| Python management | uv (fast) | pip |\n| System dependencies | devbox/Nix (reproducible) | Manual |\n| Process management | process-compose | honcho/supervisord |\n| Container support | Built-in (Docker Compose + image builds) | frappe_docker (separate) |\n| API access | Direct (no HTTP) | Via HTTP |\n| Remote site editing | Built-in (git-backed) | Not available |\n| Cloud integration | Built-in | Separate tool |\n\n## AI Integration\n\nWeg includes an MCP (Model Context Protocol) server that lets AI assistants manage your Frappe environment:\n\n```bash\nweg mcp install   # Configure for Claude Code / other MCP clients\n```\n\nThe MCP server exposes 12 tools for running Python, calling APIs, managing sites, and more — replacing common anti-patterns like manual `bench` activation or direct `frappe` imports.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for setup, testing, and code style guidelines.\n\n## Requirements\n\n- Go 1.24+ (for building from source)\n- [devbox](https://www.jetify.com/devbox) (installed automatically on first use)\n- Git\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavindsouza%2Fweg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavindsouza%2Fweg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavindsouza%2Fweg/lists"}