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

Run a command with a Slash environment

init

Initialize the Slash environment

activate

Activate the Slash environment

deactivate

Deactivate the Slash environment

create

Create a new Slash environment

remove

Remove a Slash environment

shell

Slash shell internal command

env

Slash environment command

config

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

List all environments

activate

Activate the environment

deactivate

Deactivate the environment

remove

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

SLASH_ENV

The name of the activated environment.

SLASH_STASH

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

http_server

str

The proxy server address.

http_port

int

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

Show all configuration values

get

Get a configuration value

set

Set a configuration value

remove-key

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.