Core Shell supports custom URL scheme coreshell:
, other apps can trigger Core Shell to open a shell window with specific options.
URL Specification
Existing Profile
Parameter | Type | Note |
---|---|---|
name |
String |
The profile name. |
newtab |
true/false |
true to open in new tab, false (the default) to open in new window. |
To open a terminal window with an existing profile, you can craft a URL like this:
coreshell:profile?name=FancyProfile
Replace "FancyProfile" with a real profile name.
Freeform
Parameter | Type | Note |
---|---|---|
name |
String |
The default title name of the terminal window/ tab. |
newtab |
Bool |
true to open in new tab, false (the default) to open in new window. |
CoColorScheme |
String |
Specify the color scheme of the terminal window/ tab. |
CoPrivateKeyName |
String |
The name of an imported private key will be used when connecting. |
CoCertificateName |
String |
The name of an imported certificates will be used when connecting. |
CoRetryAttempts |
Number |
Number of attempts before stop connecting. |
You can specify the destination in the form of:
coreshell://[user@]host[:port]
Directives in ssh_config.5 are supported:
coreshell://user@host-address:22?newtab=true&ConnectTimeout=100&LogLevel=DEBUG3&PreferredAuthentications=password
Above URL tells Core Shell to open a terminal window in new tab, then connects to host-address
with ConnectTimeout
set to 100
, LogLevel
set to DEBUG3
and PreferredAuthentications
allows password
.
And color scheme can be designated by the URL query parameter CoColorScheme
:
coreshell://user@host-address:22?CoColorScheme=Dracula&ConnectTimeout=100&LogLevel=DEBUG3&PreferredAuthentications=password
Encode URL
If your profile name or query parameter contains reserved characters or non-ASCII characters, you must encode the URL before using it in other apps.
For example, if you name the profile "My Fancy Profile" which contains whitespaces, do not craft the URL like this:
❌ coreshell:profile?name=My Fancy Profile
Whitespace is reversed character, so above URL won't work. It should be encoded, the correct one is:
✅ coreshell:profile?name=My%20Fancy%20Profile
This command can help you generate a percent encoded parameter value:
echo "My Fancy Profile" | python3 -c "import urllib.parse;print(urllib.parse.quote(input()))"
Command Line
To trigger Core Shell open a shell window from command line, you simply run open
command and pass an encoded coreshell:
URL in:
open "coreshell:profile?name=My%20Fancy%20Profile"
or:
open "coreshell://user@host-address:22?CoColorScheme=Red%20Sands&ConnectTimeout=100&LogLevel=DEBUG3&PreferredAuthentications=password"