Skip to content

renuo/deploio-cli

 
 

Repository files navigation

deploio-cli (deploio / depl)

A CLI for Deploio that wraps nctl commands with a simpler interface.

Requirements

  • Ruby 3.3+
  • nctl version 1.10.0 or higher

Installation

From source (development)

git clone https://github.com/renuo/deploio-cli.git
cd deploio-cli
bundle install
bundle exec bin/deploio --help

As a gem (coming soon)

gem install deploio-cli

Shell Completion

Enable autocompletion by adding this to your ~/.zshrc or ~/.bashrc, or whatever you use:

eval "$(deploio completion)"

After setup, completions work for:

  • Commands: deploio <TAB> → shows all commands and subcommands
  • Options: deploio logs --<TAB> → shows --tail, --lines, --app, etc.
  • Apps (dynamic): deploio logs --app <TAB> → fetches available apps from server

Configuration

App naming convention

Apps are referenced using <project>-<app> format, where:

  • project is your Deploio project name (e.g., deploio-landing-page)
  • app is the environment/app name (e.g., develop, production)

Example: deploio-landing-page-develop

Automatic app detection

When you run a command without --app, the CLI will automatically detect the app by matching your git remote URL against nctl apps:

cd ~/projects/deploio-landing-page
deploio logs --tail  # Automatically detects app from git remote

If multiple apps match (e.g., develop and production), you'll be prompted to select one.

Usage

deploio - CLI for Deploio (wraps nctl)

AUTHENTICATION
  deploio auth:login              Authenticate with nctl
  deploio auth:logout             Log out
  deploio auth:whoami             Show current user and organization
  deploio login                   Shortcut for auth:login

APPS
  deploio apps                    List all apps
  deploio apps:info -a APP        Show app details

LOGS
  deploio logs -a APP             Show recent logs
  deploio logs -a APP --tail      Stream logs continuously
  deploio logs -a APP -n 200      Show last N lines

EXECUTION
  deploio exec -a APP -- CMD      Run command in app container
  deploio run -a APP -- CMD       Alias for exec

OTHER
  deploio completion              Generate shell completion script
  deploio version                 Show version

FLAGS
  -a, --app APP                   App in <project>-<app> format
  -o, --org ORG                   Organization
  --dry-run                       Print commands without executing
  --no-color                      Disable colored output

Examples

Authentication

# Login to nctl
deploio login

# Check current user
deploio auth:whoami

Working with apps

# List all apps
deploio apps

# Show app info
deploio apps:info -a myproject-staging

Logs and execution

# View logs
deploio logs -a deploio-landing-page-develop

# Stream logs
deploio logs -a deploio-landing-page-develop --tail

# Run a command
deploio exec -a deploio-landing-page-develop -- rails console

# With git remote matching (auto-detected)
cd ~/projects/deploio-landing-page
deploio logs --tail
deploio exec -- rails console

Development

Running tests

bundle exec rake test

Building the gem

gem build deploio-cli.gemspec

Testing commands

The best way to test the commands in the shell is to temporarly set:

export PATH="$PWD/bin:$PATH"

to have the deploio command binded to the current one, and

eval "$(deploio completion)"

to refresh the autocompletion options.

License

MIT

Copyright

Renuo AG

About

Minimal wrapper for nctl to make managing deploio apps easy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 85.8%
  • Shell 7.5%
  • HTML 6.7%