Skip to main content
The login command authenticates your local machine with a running Toolshed server. It opens a browser to the server’s authentication page, completes the auth flow, and saves the resulting session token to ~/.toolshed/config.json. The serve and run commands read this token automatically, so you only need to log in once per server.

Usage

toolshed login
There are no flags or arguments. The command opens your default browser and waits for the authentication to complete.

Authentication flow

1

Run the command

Execute toolshed login in your terminal. The CLI prints the auth URL and opens it in your browser.
2

Authenticate in the browser

Complete the sign-in on the Toolshed server. This may involve an OAuth provider or a credentials form, depending on your server’s configuration.
3

Credentials are saved

After a successful sign-in, the server redirects back with a session token. The CLI writes it to ~/.toolshed/config.json automatically.

Stored credentials

Your credentials are saved to ~/.toolshed/config.json. The serve and run commands read this file to authorize requests to the server without requiring you to log in each time.
Keep ~/.toolshed/config.json private. It contains your session token. Do not commit it to version control.

Connecting to a specific server

By default, login authenticates against http://localhost:3000. To authenticate against a different server, set TOOLSHED_SERVER before running the command:
TOOLSHED_SERVER=https://toolshed.example.com toolshed login
You need a running Toolshed server to authenticate against. If you’re just getting started, follow the server setup guide before running toolshed login.