Project Scope
Graft is designed to be location-agnostic. While you usually run commands from within a specific project directory, the Project Scope flag allows you to manage your deployments from anywhere on your machine.
Project Scoping (-p, --project)
Section titled “Project Scoping (-p, --project)”The project flag tells Graft which project context to use. Instead of looking for a .graft folder in your current directory, Graft retrieves the project metadata and remote connection details from its global registry.
Examples:
Section titled “Examples:”Deploy from anywhere:
graft -p my-awesome-project syncCheck service status:
graft -p my-awesome-project psView remote logs:
graft -p my-awesome-project logs --tail=50Restart a specific service:
graft -p my-awesome-project restart webWhy use Project Scope?
Section titled “Why use Project Scope?”- Quick Management: No need to
cdinto multiple project folders to check status or restart services. - Automation: Easily script Graft commands in your local automation tools without worrying about the working directory.
- Global Access: Manage your entire fleet of projects from a single terminal session.