Appearance
CLI Tool
The Nebion CLI lets you access your environments from the terminal — SSH into containers, view logs, and open environment URLs.
$ nebioncli hub
⚡ Nebion CLI | Org: ACME Corp | Website
Projects
Website (8) x1
API Backend v5
Mobile App (3) x1
Docs (1)
Staging (1)
Environments — Website
| Title | Status | Branch | Deploy |
|---|---|---|---|
| pr-87 | ERROR | feature/auth | 1h |
| pr-86 | SUCCESS | nebion-routes | 1d |
| pr-85 | SUCCESS | fix/nav-links | 3d |
| pr-82 | SUCCESS | redesign | 5d |
| pr-79 | SUCCESS | feature/search | 7d |
| dev | SUCCESS | dev | 7d |
fix/nav-links pr-85
Branch: fix/nav-links Author: Jane Doe URL: pr-85.website.com
$ nebioncli ssh -p mysite -e 42 -c php Connected to pr-42.mysite.com (php) web@pr-42:~$ $ nebioncli doctor ✓ .nebion.yml valid ✓ Docker Compose valid ✓ Routing configured ✓ All checks passed $ nebioncli logs -f [nginx] GET /api/users → 200 (12ms) [php] Cache cleared successfully
Install
bash
curl -fsSL https://nebion.wsagency.io/sites/default/files/cli/install | bashbash
# Download the binary for your platform:
# nebioncli-linux-amd64 (Linux x86_64)
# nebioncli-linux-arm64 (Linux ARM64)
# nebioncli-darwin-amd64 (macOS Intel)
# nebioncli-darwin-arm64 (macOS Apple Silicon)
# nebioncli-windows-amd64 (Windows x86_64)
#
# From: https://your-nebion-instance/cli/download/{binary-name}
# Then rename to nebioncli and place in your PATHVerify installation:
bash
nebioncli versionGetting Started
After logging in, run nebioncli hub to open an interactive dashboard where you can browse all projects and environments, view logs, and SSH into containers.
Login
bash
nebioncli loginYour browser opens to the Nebion login page. After authenticating, return to the terminal. You stay logged in until you explicitly log out.
bash
# Login to a custom instance
nebioncli login --host https://custom.nebion.io
# Login without auto-opening browser
nebioncli login --no-browser
# Use a custom OAuth2 client ID
nebioncli login --client-id my-clientCommands
hub - Interactive Dashboard
bash
nebioncli hubOpens a full-screen terminal dashboard for browsing projects and environments. The hub provides a two-panel layout: a project list on the left and environment details on the right, with built-in access to logs, deployment history, and diagnostics.
Navigation:
| Key | Action |
|---|---|
| Tab | Switch between project list and environment list |
| Enter | Select item / open action menu |
| / | Filter current list |
| Esc | Go back / close panel |
| ? | Show all keybindings |
| q | Quit |
Environment actions (when an environment is selected):
| Key | Action |
|---|---|
| s | SSH into environment |
| l | Open log viewer |
| u | Open environment URL in browser |
| m | View deployment history |
| d | View diagnostics (failed environments) |
| o | Switch organization |
| r | Refresh data |
The log viewer supports follow mode (f), service filtering (s), text search (g), and line wrapping (w).
doctor - Validate Configuration
bash
nebioncli doctorRun from your project root to validate .nebion.yml and your Docker Compose file before deploying. The doctor checks for common configuration issues that would cause deployment failures.
Checks performed:
| Section | What it validates |
|---|---|
| Configuration | .nebion.yml exists, valid YAML syntax, no unknown fields |
| Docker Compose | Compose file exists, valid syntax, services defined |
| Routing | nginx_service matches a compose service, valid traefik_port |
| Deployment Tasks | Tasks have required fields (command, service), services exist in compose |
| Actions | Actions have required fields (name, command, service), result: file commands use $NEBION_ACTION_OUTPUT |
| Variables | Reserved nebion_ prefix not used, compose ${VAR} references resolve |
Outputs a color-coded report with pass, warning, and error indicators. Exits with code 1 if any errors are found, 0 otherwise.
The doctor also suggests corrections for typos in field names (e.g., nginx-service suggests nginx_service).
ssh - Connect to a Container
bash
# Interactive selection (project > environment > container)
nebioncli ssh
# Direct connection
nebioncli ssh -p myproject -e 42 -c php
# Connect to manual environment
nebioncli ssh -p myproject -e staging -c nginx| Flag | Short | Description |
|---|---|---|
--project | -p | Project name or ID |
--environment | -e | PR number or environment name |
--container | -c | Container name (e.g., php, nginx) |
Press Esc at any prompt to cancel.
action - Run Environment Actions
The
action CLI command is not yet available. Actions can currently be triggered from the UI.bash
# List available actions for an environment
nebioncli action list
# Run an action (interactive project/environment selection)
nebioncli action run cache-clear
# Run with explicit project and environment
nebioncli action run db-dump --project mysite --env pr-42
# Download artifact from the last file-producing action run
nebioncli action download db-dump
# Download from a specific run
nebioncli action download --run-id abc123| Subcommand | Description |
|---|---|
list | Show available actions for an environment |
run <action-id> | Trigger an action |
download <action-id> | Download the artifact from a file action |
| Flag | Short | Description |
|---|---|---|
--project | -p | Project name or ID |
--environment | -e | PR number or environment name |
--run-id | Specific action run ID (for download) |
Actions are defined in .nebion.yml. See Actions for configuration details.
logs - View Container Logs
bash
# Interactive selection
nebioncli logs
# Fetch last 500 lines
nebioncli logs -n 500
# Follow logs in real-time (Ctrl+C to stop)
nebioncli logs -f
# Direct access
nebioncli logs -p myproject -e 42 -c php -f| Flag | Short | Description |
|---|---|---|
--project | -p | Project name or ID |
--environment | -e | PR number or environment name |
--container | -c | Container name |
--lines | -n | Number of lines (default: 100) |
--follow | -f | Stream new logs in real-time |
url - Open Environment URL
bash
# Interactive selection, opens in browser
nebioncli url
# Open PR-42's URL
nebioncli url 42
# Output URL to stdout (for scripting)
nebioncli url --pipe
nebioncli url -p myproject -e 42 --pipeThe CLI auto-detects the project if you run it from inside a Git repository that matches a Nebion project.
org - Manage Organizations
bash
# List your organizations
nebioncli org list
# Show current organization
nebioncli org current
# Switch organization (interactive)
nebioncli org switch
# Switch by name or ID
nebioncli org switch "ACME Corp"
nebioncli org switch 5All other commands (ssh, logs, url) operate within the active organization.
logout / update / version
bash
# Remove stored credentials
nebioncli logout
# Download and install the latest CLI version
nebioncli update
# Show version
nebioncli versionMCP Server
bash
nebioncli mcpThe mcp command starts a Model Context Protocol (MCP) server over stdio. It exposes read-only Nebion operations as tools that an MCP client — such as Claude Code — can call directly, letting an AI assistant inspect your projects, environments, deployment status, logs, and failure diagnostics from your editor or chat.
You don't run nebioncli mcp yourself; your MCP client launches and talks to it. It reuses the credentials from nebioncli login and the active organization from nebioncli org switch, so it acts as the logged-in user with exactly their access to organizations and projects. No extra OAuth setup is needed in the client.
Read-only
The MCP server exposes inspection tools only. Deploying, stopping, or modifying environments is not supported.
Connect from Claude Code
Make sure nebioncli is logged in and on your PATH, then register the server:
bash
claude mcp add nebion -- nebioncli mcpThe -- separates Claude Code's own flags from the command it should run. After adding the server, Claude Code can call the Nebion tools in any session.
Choosing a scope: claude mcp add accepts a --scope flag that controls where the server is registered:
| Scope | Flag | Stored in | Use for |
|---|---|---|---|
| Local | --scope local (default) | Your user settings, this project only | Personal use on a single project |
| Project | --scope project | .mcp.json (committed to the repo) | Sharing the server with your whole team via Git |
| User | --scope user | Your user settings, all projects | Personal use across every project |
When you share the server at project scope, the .mcp.json file is committed to Git, so everyone on the team gets it. For it to work for all of them, nebioncli must resolve from each person's PATH — use the bare nebioncli command (as shown above), not an absolute path that only exists on your machine.
Available tools
All eight tools are read-only:
| Tool | Parameters | Description |
|---|---|---|
whoami | — | Current authenticated user and the organizations they belong to (id, name, role) |
list_projects | — | Projects in the active organization |
list_environments | project_id | Environments (PR and manual) for a project, with status, URL, branch, and PR metadata |
get_environment_status | environment_id | Deployment task history and current status for an environment |
get_logs | environment_id (plus optional service, limit, cursor, hours) | Container logs for an environment from the log aggregation system |
get_deploy_diagnostics | environment_id | Diagnostics for the most recent failed deployment — the failed task and error details, plus the raw output as a fallback |
get_task_detail | environment_id, task_id | Parsed steps for a specific deployment task |
get_task_log | environment_id, task_id | Raw, unparsed Semaphore/Ansible log for a specific deployment task |
Building from source
Prebuilt binaries are available from the Install section, so most users never need a Go toolchain. If you do build nebioncli yourself, the MCP server requires Go 1.25 or newer.
Configuration
Storage Location & Files
The CLI stores configuration and credentials in your user config directory:
| Platform | Directory |
|---|---|
| Linux | ~/.config/nebioncli/ |
| macOS | ~/.config/nebioncli/ |
| Windows | %APPDATA%\nebioncli\ |
If XDG_CONFIG_HOME is set, the CLI uses $XDG_CONFIG_HOME/nebioncli/ instead.
Files
| File | Purpose |
|---|---|
config.json | Instance URL, active organization |
credentials.json | OAuth2 tokens (access + refresh) |
id_ed25519 / id_ed25519.pub | SSH keypair for container access |
Files are created automatically on first login or ssh use. The private key never leaves your machine - the CLI sends your public key to Nebion and receives a short-lived certificate.
Warning: credentials.json contains sensitive tokens. It is created with 0600 permissions (owner read/write only). Do not share this file or commit it to version control.
Directory Permissions
bash
chmod 700 ~/.config/nebioncli
chmod 600 ~/.config/nebioncli/credentials.json
chmod 600 ~/.config/nebioncli/config.json
chmod 600 ~/.config/nebioncli/id_ed25519
chmod 644 ~/.config/nebioncli/id_ed25519.pubResetting Configuration
To completely reset the CLI:
bash
rm -rf ~/.config/nebioncli
nebioncli loginThis removes credentials, configuration, and SSH keys. New keys are generated on next use.
Multiple Instances
The CLI supports one Nebion instance at a time. To switch:
bash
nebioncli login --host https://other.nebion.ioThis replaces existing credentials.
Uninstall
Linux / macOS:
bash
rm $(which nebioncli)
rm -rf ~/.config/nebioncliWindows: Delete the nebioncli.exe binary and the %APPDATA%\nebioncli directory.