CLI Reference

The slasha CLI is your primary tool for managing applications, services, and deployments from your local machine.

Getting Started

Before you can run any commands, you need to tell the CLI where your Slasha server is and log in:

# Set your server URL (saved globally)
slasha set-url https://slasha.example.com

# Log in to your account
slasha login

Global Flags

These flags work with almost every command:

  • –url <URL>: Temporarily override the server URL.
  • –app <slug>: Target a specific app (can be omitted if you’ve run slasha link).
  • –output <human|json>: Switch between readable terminal output or raw JSON for scripting.
  • –diagnostic: Print detailed debug information for bug reports.
  • NO_COLOR: Set this environment variable to disable colored terminal output.

Project Linking (slasha.toml)

To avoid typing –app my-app with every command, you can “link” your local directory to a specific Slasha app. This creates a slasha.toml file in your project root.

# Link the current directory to 'my-app'
slasha link my-app

# Now you can run commands without the --app flag
slasha info
slasha deployments logs

Authentication in CI

If you’re using the CLI in a CI/CD environment (like GitHub Actions), you can authenticate using a token instead of a login session:

# Set the token as an environment variable
export SLASHA_TOKEN="your-secure-token"
slasha list

Useful Utility Commands

# Check server health and version
slasha status

# Show currently logged-in user
slasha me

# Print CLI version details
slasha version --verbose