Core Shell supports the custom coreshell: URL scheme, allowing other apps, scripts, and command-line tools to open terminal windows with specific options.
You can use URL schemes to:
- Open an existing Profile.
- Connect to an SSH server.
- Open a local terminal and optionally execute a command.
URL Specification
1. Open an Existing Profile
| Parameter | Type | Description |
|---|---|---|
name |
String |
The name of the existing Profile. |
newtab |
Bool |
Whether to open the terminal in a new window tab. Defaults to false. Supported values are true and false. |
To open a terminal using an existing Profile:
coreshell://profile?name=FancyProfile
Replace FancyProfile with the name of an existing Profile.
2. Connect to an SSH Server
You can specify the SSH destination using the following format:
coreshell://[user@]host[:port]
The following URL parameters are supported:
| Parameter | Type | Description |
|---|---|---|
name |
String |
The default title of the terminal window or tab. |
newtab |
Bool |
Whether to open the terminal in a new window tab. Defaults to false. Supported values are true and false. |
retryAttempts |
Number |
The number of connection retry attempts. Defaults to 999. |
privateKeyName |
String |
The name of a private key imported into Core Shell. Alternatively, use the IdentityFile directive to specify a private key file path. |
certificateName |
String |
The name of a certificate imported into Core Shell. Alternatively, use the CertificateFile directive to specify a certificate file path. |
colorScheme |
String |
The terminal color scheme. Supported values: Basic, Dracula, Grass, Homebrew, Man Page, Novel, Ocean, Red Sands, and Solarized. |
Note: URL parameter names are case-sensitive.
Additional SSH connection options can be specified using directives from ssh_config(5).
The Host and Match directives are not supported.
Due to sandbox restrictions, the following directives are unavailable in the Mac App Store version. The Codinn Store and Setapp versions are not affected:
AddKeysToAgentProxyCommandProxyUseFdpassUserKnownHostsFileCertificateFileIdentityAgentIdentityFileControlMasterControlPathControlPersistLocalCommandPermitLocalCommandSecurityKeyProviderForwardX11ForwardX11TimeoutForwardX11TrustedXAuthLocationEnableSSHKeysignKnownHostsCommand
For example:
coreshell://user@host-address:22?name=My%20SSH%20Server&newtab=true&privateKeyName=id_ed25519&certificateName=id_ed25519.cert&ConnectTimeout=100&LogLevel=DEBUG3&PreferredAuthentications=password
This opens a new terminal tab and connects to host-address using the specified SSH options.
3. Open a Local Terminal
Requires Core Shell 5.2 or later
To open a local terminal instead of an SSH connection, use local as the URL host:
coreshell://local
The host local is case-sensitive and must be specified exactly as shown. Other forms, such as localhost, 127.0.0.1, or Local, are not supported for opening a local terminal.
The following URL parameters are supported:
| Parameter | Type | Description |
|---|---|---|
name |
String |
The default title of the terminal window or tab. |
newtab |
Bool |
Whether to open the terminal in a new window tab. Defaults to false. Supported values are true and false. |
colorScheme |
String |
The terminal color scheme. Supported values: Basic, Dracula, Grass, Homebrew, Man Page, Novel, Ocean, Red Sands, and Solarized. |
runCommand |
String |
The command to execute in the local terminal. |
runCommandInsideShell |
Bool |
Whether to execute runCommand inside a login shell. Defaults to false. This parameter only applies when runCommand is specified. |
For example, to open a local terminal and execute ls -la:
coreshell://local?name=My%20Local%20Terminal&newtab=true&runCommand=ls%20-la
To execute the command inside a login shell:
coreshell://local?name=My%20Local%20Terminal&newtab=true&runCommand=ls%20-la&runCommandInsideShell=true
You can also specify a terminal color scheme:
coreshell://local?name=My%20Local%20Terminal&colorScheme=Dracula&runCommand=ls%20-la
Encode URL
If your Profile name or query parameter contains reserved characters or non-ASCII characters, you must percent-encode the parameter values before using the URL in other apps.
For example, if your Profile is named My Fancy Profile, the following URL will not work correctly:
❌ coreshell://profile?name=My Fancy Profile
The correct URL is:
✅ coreshell://profile?name=My%20Fancy%20Profile
The same applies to commands passed through runCommand. Make sure to encode the parameter value properly.
You can use the following command to generate a percent-encoded parameter value:
echo "My Fancy Profile" | python3 -c "import urllib.parse; print(urllib.parse.quote(input())"
For more information, see Percent-encoding.
Command Line
To open a terminal from the command line, use the open command and pass a coreshell: URL.
Open an existing Profile:
open 'coreshell://profile?name=My%20Fancy%20Profile'
Connect to an SSH server:
open 'coreshell://user@host-address:22?colorScheme=Red%20Sands&ConnectTimeout=100&LogLevel=DEBUG3&PreferredAuthentications=password'
Open a local terminal and execute a command:
open 'coreshell://local?name=My%20Local%20Terminal&newtab=true&runCommand=ls%20-la'
You can use the same approach in shell scripts, automation tools, and other applications that support URL schemes.