Command Line Interface¶
slash¶
Use slash as a command line tool to create, manage, and run environments.
usage: slash [-h] command ...
- -h, --help¶
Show the help message and exit.
- command¶
The command to run.
Command
Description
Run a command with a Slash environment
Initialize the Slash environment
Activate the Slash environment
Deactivate the Slash environment
Create a new Slash environment
Remove a Slash environment
Slash shell internal command
Slash environment command
Modify configuration values in .slashrc.
slash run¶
Run a command with a Slash environment.
usage: slash run [-h] [-n ENV_NAME] command [args ...]
- -h, --help¶
Show the help message and exit.
- -n ENV_NAME, --name ENV_NAME¶
The name of the environment to run the command in.
- command¶
The command to run.
- args¶
The arguments to pass to the command.
slash init¶
Initialize the Slash environment.
usage: slash init [-h] [--reverse]
- --reverse¶
Reverse the initialization process, removing Slash from the shell configuration file.
- -h, --help¶
Show the help message and exit.
slash activate¶
Activate the Slash environment.
usage: slash activate [-h] ENV_NAME
- -h, --help¶
Show the help message and exit.
- ENV_NAME¶
The name of the environment to activate.
slash deactivate¶
Deactivate the Slash environment.
usage: slash deactivate [-h]
- -h, --help¶
Show the help message and exit.
slash create¶
Create a new Slash environment.
usage: slash create [-h] -n ENV_NAME -f SUBSCRIPTION
- -h, --help¶
Show the help message and exit.
- -n ENV_NAME, --name ENV_NAME¶
The name of the environment to create.
- -f SUBSCRIPTION, --file SUBSCRIPTION¶
The subscription to use for the environment.
slash remove¶
Remove a Slash environment.
usage: slash remove [-h] ENV_NAME
- -h, --help¶
Show the help message and exit.
- ENV_NAME¶
The name of the environment to remove.
slash shell¶
Slash shell internal command. Users should not use this command directly.
usage: slash shell [-h]
- -h, --help¶
Show the help message and exit.
slash env¶
Slash environment command.
usage: slash env [-h] command ...
- -h, --help¶
Show the help message and exit.
- command¶
The command to run.
Command
Description
List all environments
Activate the environment
Deactivate the environment
Remove the environment
slash env list¶
List all environments.
usage: slash env list [-h]
- -h, --help¶
Show the help message and exit.
slash env activate¶
Activate the environment.
It will also produce some environment variables that can be used in the current shell.
Environment Variable |
Description |
---|---|
|
The name of the activated environment. |
|
The overrided environment variables. It will be restored when the environment is deactivated. |
usage: slash env activate [-h] ENV_NAME
- -h, --help¶
Show the help message and exit.
- ENV_NAME¶
The name of the environment to activate.
slash env deactivate¶
Deactivate the environment.
usage: slash env deactivate [-h]
- -h, --help¶
Show the help message and exit.
slash env remove¶
Remove the environment.
usage: slash env remove [-h] ENV_NAME
- -h, --help¶
Show the help message and exit.
- ENV_NAME¶
The name of the environment to remove.
slash config¶
Modify configuration values in .slashrc.
Option |
Type |
Description |
---|---|---|
|
|
The proxy server address. |
|
|
The proxy server port. |
usage: slash config [-h] command
- -h, --help¶
Show the help message and exit.
- command¶
Config subcommand. Modify configuration values in .slashrc.
Command
Description
Show all configuration values
Get a configuration value
Set a configuration value
Remove a configuration key
slash config show¶
Show all configuration values.
usage: slash config show [-h]
- -h, --help¶
Show the help message and exit.
slash config get¶
Get a configuration value.
usage: slash config get [-h] key
- -h, --help¶
Show the help message and exit.
- key¶
The key to get the value of.
slash config set¶
Set a configuration value.
usage: slash config set [-h] key value
- -h, --help¶
Show the help message and exit.
- key¶
The key to set the value of.
- value¶
The value to set the key to.
slash config remove-key¶
Remove a configuration key.
usage: slash config remove-key [-h] key
- -h, --help¶
Show the help message and exit.
- key¶
The key to remove.