CLI Overview
Install and configure the Strayl CLI (st) for terminal-based workflows.
The Strayl CLI (st) lets you work with Strayl from your terminal. It is a Git-based tool — under the hood it works with a strayl git remote added to your local repository. You can push feature branches, create change proposals, manage deployments, and inspect project status without opening the browser.
Installation
pnpm add -g @strayl/cli
Or with other package managers:
pnpm add -g @strayl/cli
yarn global add @strayl/cli
bun add -g @strayl/cliVerify the installation:
st --versionQuick start
# Authenticate
st login
# Create a new Strayl project from an existing git repository
st init
# Or link an existing local repository to a Strayl project
st link username/my-project
# Push a feature branch and create a change proposal
st push
# Pull the latest dev or main branch from Strayl
st pullCommands reference
| Command | Description |
|---|---|
st login | Authenticate with your Strayl account (browser OAuth) |
st logout | Remove stored credentials |
st whoami | Show currently authenticated user |
st config | Show or update CLI configuration |
st init [name] | Create a new Strayl project from this git repository |
st link <username/project> | Link this repository to an existing Strayl project |
st clone <username/repo> | Clone a Strayl repository |
st status | Show project info and pending change proposals |
st push [branch] | Push a feature branch and create a change proposal |
st pull [dev|main] | Pull the latest dev or main branch from Strayl |
st promote | Promote dev branch to main (deploy to production) |
st changes | List change proposals for this project |
st change <id> [action] | View or act on a change (actions: approve, deny, restack) |
st setup-git | Re-configure git credentials (usually not needed) |
st mcp-init | Install the Strayl MCP server into AI coding agents |
How the git integration works
After running st init or st link, the CLI adds a git remote called strayl to your repository:
# This is what happens under the hood
git remote add strayl https://api.strayl.dev/username/project.gitFrom that point on, the standard Strayl workflow is:
# 1. Work on a feature branch (not main or dev)
git checkout -b my-feature
# 2. Make commits as usual
git commit -m "Add new feature"
# 3. Push the branch and create a change proposal
st push
# 4. Review and approve the change at app.strayl.dev
# 5. When ready to deploy, promote dev → main
st promoteConfiguration
The CLI stores configuration in ~/.strayl/config.json and credentials in ~/.strayl/credentials.
# Show current configuration
st config --show
# Override API or app URL (for self-hosted instances)
st config --api-url https://api.example.com
st config --app-url https://app.example.comShell completion
Enable tab completion for st commands:
# Bash
st completion bash >> ~/.bashrc
# Zsh
st completion zsh >> ~/.zshrc
# Fish
st completion fish >> ~/.config/fish/completions/st.fish