You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on May 1, 2025. It is now read-only.
Would it be possible to start/stop sites using site name instead of site id ?
The site id - is not as useful as we have to list all site ids - get the one we're looking for and then start it.
Until they add support for this, perhaps these bash alias you can put in your bashrc or zshrc file might help
You can run these commands if you are in your terminal in the folder of said project.
Usually i just "Z" (https://github.com/agkozak/zsh-z) to quickly travel via terminal to the client folder,
and then type "localstart" to start their local instance.
functionget_local_site_id() {
# MAKE SURE YOU HAVE @getflywheel/local-cli installed globally via npm.# Get the current folder's name using Perllocal clientfolder=$(pwd | perl -pe 's|.*/Local Sites/([^/]*)/.*|$1|')# List the sites and store the output in a variablelocal sites_list=$(local-cli list-sites)# Search for the value of $clientfolder in the sites list using Perl and extract the corresponding IDlocal site_id=$(echo "$sites_list"| perl -ne '/.*\s([a-zA-Z0-9_-]+).*\s'"$clientfolder"'\s.*/ && print $1')# Echo the matching IDecho$site_id
}
functionlocalssh() {
# MAKE SURE YOU HAVE @getflywheel/local-cli installed globally via npm.local site_id=$(get_local_site_id)echo"siteid : $site_id"
sh ~/Library/Application\ Support/Local/ssh-entry/$site_id.sh
}
functionlocalstart() {
local site_id=$(get_local_site_id)echo"siteid : $site_id"
local-cli start-site $site_id
}
functionlocalstop() {
local site_id=$(get_local_site_id)echo"siteid : $site_id"
local-cli stop-site $site_id
}
functionlocalrestart() {
local site_id=$(get_local_site_id)echo"siteid : $site_id"
local-cli stop-site $site_id
local-cli start-site $site_id
}
localssh only works if you have clicked the "Siteshell" code atleast for that specific site.
(Then a ssh script is created by local, and we just execute that script using our bash alias and naming scheme)
Activity
Odinnh commentedon Jan 19, 2024
i second this, i've forked this project to add this support, we need a new mutation setting for start-server that allows name as the mutation var
WybeBosch commentedon Dec 6, 2024
Until they add support for this, perhaps these bash alias you can put in your bashrc or zshrc file might help
You can run these commands if you are in your terminal in the folder of said project.
Usually i just "Z" (https://github.com/agkozak/zsh-z) to quickly travel via terminal to the client folder,
and then type "localstart" to start their local instance.
localssh only works if you have clicked the "Siteshell" code atleast for that specific site.
(Then a ssh script is created by local, and we just execute that script using our bash alias and naming scheme)