Command Line Interface for Scaleway

Overview

CircleCI GoReportCard

Scaleway CLI (v2)

Scaleway CLI is a tool to help you pilot your Scaleway infrastructure directly from your terminal.

Installation

With a Package Manager (Recommended)

A package manager allows to install and upgrade the Scaleway CLI with a single command. We recommend this installation mode for more simplicity and reliability:

Homebrew

Install the latest stable release on macOS using Homebrew:

brew install scw

Archlinux

Install the latest stable release on Archlinux via AUR. For instance with yay:

yay -S scaleway-cli

Chocolatey

Install the lastest stable release on Windows using Chocolatey (Package):

choco install scaleway-cli

Manually

Released Binaries

We provide static-compiled binaries for darwin (macOS), GNU/Linux, and Windows platforms. You just have to download the binary compatible with your platform to a directory available in your PATH:

Mac OS

# Check that /usr/local/bin is in your PATH
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Download the release from github
curl -o /usr/local/bin/scw -L "https://github.com/scaleway/scaleway-cli/releases/download/v2.2.4/scw-2.2.4-darwin-x86_64"

# Allow executing file as program
chmod +x /usr/local/bin/scw

# Init the CLI
scw init

Linux

# Download the release from github
sudo curl -o /usr/local/bin/scw -L "https://github.com/scaleway/scaleway-cli/releases/download/v2.2.4/scw-2.2.4-linux-x86_64"

# Allow executing file as program
sudo chmod +x /usr/local/bin/scw

# Init the CLI
scw init

Windows

You can download the last release here: https://github.com/scaleway/scaleway-cli/releases/download/v2.2.4/scw-2.2.4-windows-x86_64.exe
This official guide explains how to add tools to your PATH.

Docker Image

You can use the CLI as you would run any Docker image:

docker run -i --rm scaleway/cli:v2.2.4

See more in-depth information about running the CLI in Docker here

Getting Started

Setup your configuration

After you installed the latest release just run the initialization command and let yourself be guided! πŸ’ƒ

scw init

It will set up your profile, the authentication, and the auto-completion.

Basic commands

# Create an instance server
scw instance server create type=DEV1-S image=ubuntu_focal zone=fr-par-1 tags.0="scw-cli"

# List your servers
scw instance server list

# Create a Kubernetes cluster named foo with cilium as CNI, in version 1.17.4 and with a pool named default composed of 3 DEV1-M and with 2 tags
scw k8s cluster create name=foo version=1.17.4 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default tags.0=tag1 tags.1=tag2

Reference documentation

Namespace Description Documentation
account Account API CLI
autocomplete Autocomplete related commands CLI
config Config file management CLI
feedback Send feedback to the Scaleway CLI Team! CLI
info Get info about current settings CLI
baremetal Baremetal API CLI / API
init Initialize the config CLI
instance Instance API CLI / API
k8s Kapsule API CLI / API
marketplace Marketplace API CLI
object Object-storage utils CLI / API
rdb Database RDB API CLI / API
registry Container registry API CLI / API

Build it yourself

Build Locally

If you have a >= Go 1.13 environment, you can install the HEAD version to test the latest features or to contribute. Note that this development version could include bugs, use tagged releases if you need stability.

go get github.com/scaleway/scaleway-cli/cmd/scw

Dependencies: We only use go Go Modules with vendoring.

Build with Docker

You can build the scw CLI with Docker. If you have Docker installed, you can run:

docker build -t scaleway/cli .

Once build, you can then use the CLI as you would run any image:

docker run -i --rm scaleway/cli

See more in-depth information about running the CLI in Docker here

Development

This repository is at its early stage and is still in active development. If you are looking for a way to contribute please read CONTRIBUTING.md.

Legacy version

If you are looking for the legacy CLIv1 you can take a look at the v1 branch. We also wrote a migration guide to help transition to the CLIv2.

Reach Us

We love feedback. Don't hesitate to open a Github issue or feel free to reach us on Scaleway Slack community, we are waiting for you on #opensource.

Comments
  • scw login not work : token_id: [extra keys not allowed]

    scw login not work : token_id: [extra keys not allowed]

    Hi, i use the cli version 1.9.0 and when i try to login i obtain an error :

    scw -V -D login --token=<token_id> --organization=<organisation_id> DEBU[0000] curl -X GET -H "Content-Type: application/json" -H "User-Agent: scw/v1.8.1" -H "X-Auth-Token: 00000000-0000-1000-0000-000000000000" https://account.scaleway.com/tokens?token_id=00000000-0000-1000-0000-000000000000 DEBU[0000] Validation Error Message= StatusCode=400 Type=invalid_request_error DEBU[0000] token_id: [extra keys not allowed] FATA[0000] cannot execute 'login': Unable to contact ScalewayAPI: Validation Error

    opened by 1Fopresta 18
  • UDP CONNECTIONS DON'T WORK!!!

    UDP CONNECTIONS DON'T WORK!!!

    Hello, scaleway.com support team told us to open an issue here. IOTA IRI can't work in scaleway.com with UDP protocol, we tested IOTA IRI with other VPS companies and works like a charm. The problem could be you check the size of packets and for security doesn’t accept to fragment. You can easy test it the UDP problem from YOUR SIDE, just use https://hub.docker.com/r/bluedigits/iota-node/ I advice you to solve the problem ASAP because IOTA is growing, works very fast with UDP protocol and scaleway.com is loosing a lot of IOTA customers.....

    Please let me know ASAP Thanks in advance

    bug 
    opened by ALEX778899 16
  • SCW keeps using my CPU

    SCW keeps using my CPU

    Command attempted

    sudo curl -o /usr/local/bin/scw -L https://github.com/scaleway/scaleway-cli/releases/download/v2.7.0/scaleway-cli_2.7.0_linux_amd64
    
    sudo chmod +x /usr/local/bin/scw
    
    scw init
    #I fill my info
    
    scw instance server create type=STARDUST1-S zone=fr-par-1 image=debian_bullseye root-volume=l:10G name=FR ip=none ipv6=true project-id=f09e5860-eb42-4784-8c98-*********
    

    Actual Behavior

    I succeeded create the instance

    More info

    But it keeps using my CPU, I think it likes a mining virus when I run "ps -ef" to get the pid of scw and run "kill -9 pid",linux shows "bash: kill: (16490) - No such process".The reason is its pid changed very frequently,so what should I do?

    bug autocomplete core 
    opened by zlx021120 10
  • Update github.com/sirupsen/logrus dependency

    Update github.com/sirupsen/logrus dependency

    We use this library as a dependency to use scaleway api. Sometime ago github.com/sirupsen/logrus changed their package name from upper case Sirupsen to lower case sirupsen. This cases compilation failure for projects that vendor their dependencies. https://github.com/sirupsen/logrus/issues/543

    I have tried to update this repo to github.com/sirupsen/logrus v1.0.3. But I face a number of issues:

    • github.com/moul/gotty-client uses the upper case form. I have a pr for this https://github.com/moul/gotty-client/pull/53 .

    • github.com/docker/docker has changed from upper case to lower case at commit 4f3616fb1c112e206b88cb7a9922bf49067a7756. But before that docker repo also removed their mflag library and replaced that with spf13/pflag https://github.com/moby/moby/pull/25354 . This makes it really difficult to fix my original issue.

    I am hoping that this issue is fixed.

    opened by tamalsaha 10
  • Two issues with Arm release (Illegal instruction

    Two issues with Arm release (Illegal instruction"

    First, in the documentation on the main readme, the comments say to specify "arm" if you want to pull down the arm release. This needs to be "armhf".

    export ARCH=amd64 # can be 'i386', 'amd64' or 'arm' should be: export ARCH=amd64 # can be 'i386', 'amd64' or 'armhf'

    Second, once downloaded and installed (with no issues), no matter what arguments you call, "scw" returns one line "Illegal instruction" and that's it.

    opened by RobSeder 10
  • Pasting text from clipboard skips characters

    Pasting text from clipboard skips characters

    I have this in my clipboard

    ThisCouldBeATokenICopied
    

    When I paste it in scw this is what gets in the terminal

    TsCouldBeATokenICopied
    

    This doesn't happen via ssh

    opened by albertoxamin 9
  • Exec should work even on servers without public IP

    Exec should work even on servers without public IP

    PAIN POINT

    ATM we can't scw exec on some machine with no public IP attached.

    DIAGNOSTIC

    exec CMD looks to rely on a call to utils.SSHExec. So... we could use some ssh tunneling to keep it working under this kind of circumstances.

    PROPOSALS

    1. Scaleway brings a very secured SSH Gateway for all of its customers. scw uses this ssh gateway for all machines without public IP. Cons: it's not easy to provide & maintain a very secured service of that kind.
    2. Customers can use one of their machines with public IP to access to their backend machine. This is probably the best solution.

    Whatever the solution, exec can have an option -g, --gateway=SERVER. Also, a general exec_gateway config parameter could be set to avoid passing this parameter at each exec call.

    enhancement 
    opened by shouze 9
  • `instance server list` fails to list existing server in specific project and zone

    `instance server list` fails to list existing server in specific project and zone

    Community Note

    • Please vote on this issue by adding a πŸ‘ reaction to the original issue to help the community and maintainers prioritize this request
    • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
    • If you are interested in working on this issue or have submitted a pull request, please leave a comment

    Command attempted

    scw instance server list project=project-name zone=fr-par-2

    Expected Behaviour

    Returns my server in my project-name project and in the fr-par-2 zone.

    Actual Behaviour

    No servers are returned, even i have a server that is up, running and listed in the Scaleway web console in the project-name project and the fr-par-2 zone.

    More info

    Build Info: Version 2.2.3+dev BuildDate unknown GoVersion go1.14.10 GitBranch unknown GitCommit unknown GoArch amd64 GoOS linux

    Fedora 32

    The server was created in the web console, maybe that makes a difference.

    bug instance 
    opened by axelsimon 8
  • Unable to attach any server

    Unable to attach any server

    > scw attach xxxx                                                                                                                                                                                    [2]
    You are connected, type 'Ctrl+q' to quit.
    panic: runtime error: index out of range
    
    goroutine 26 [running]:
    github.com/scaleway/scaleway-cli/vendor/github.com/moby/moby/pkg/term.(*escapeProxy).Read(0xc4204cc6f0, 0xc4203c3b00, 0x80, 0x80, 0xc42000e010, 0x0, 0x0)
    	/tmp/makepkg/scaleway-cli/src/src/github.com/scaleway/scaleway-cli/vendor/github.com/moby/moby/pkg/term/proxy.go:54 +0x5f5
    github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client.(*Client).writeLoop(0xc42011c720, 0xc4202d1cf0, 0x0)
    	/tmp/makepkg/scaleway-cli/src/src/github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client/gotty-client.go:352 +0x398
    created by github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client.(*Client).Loop
    	/tmp/makepkg/scaleway-cli/src/src/github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client/gotty-client.go:238 +0x110
    
    bug 
    opened by askz 8
  • login with 2FA issue

    login with 2FA issue

    Hi As recommended by the scw assistance. here is my problem: Can't login via scw cli. I tried with 2FA disabled and got the same result

    scw login
    Login (cloud.scaleway.com): ####@xxx.org
    Password: 
    Two-Factor auth token (or backup code): 
    FATA[0042] cannot execute 'login': Unable to find your organizatiotion
    
    opened by teuffy 8
  • Bootscript parameter seems broken

    Bootscript parameter seems broken

    Not sure how to get better error messaging from the cli either.

    ❯ ~ scw create --bootscript=docker xenial
    FATA[0000] cannot execute 'create':   StatusCode:                    %!s(int=400)  Type:                          invalid_request_error  Message:                         APIMessage:                    Validation Error
    
    ❯ ~ scw create xenial
    f14c1201-b064-4878-80c3-30944d95e892
    
    opened by kudos 8
  • chore(deps): bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17

    chore(deps): bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17

    Bumps github.com/mattn/go-isatty from 0.0.16 to 0.0.17.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 1
  • feat(core/autocomplete): complete content of args using list verbs

    feat(core/autocomplete): complete content of args using list verbs

    Keep it as beta for now, could crash completion

    Will try to complete arguments using the list verb of the specific resource Example: In instance namespace, every server-id will execute instance server list and complete with id fields

    In marketplace image get label=, it will fetch for label using list of current resource marketplace image list

    enhancement autocomplete core 
    opened by Codelax 1
  • feat: support credentials stores

    feat: support credentials stores

    Community Note

    • Please vote on this pull request by adding a πŸ‘ reaction to the original pull request comment to help the community and maintainers prioritize this request.
    • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

    Relates OR Closes #0000

    Release note for CHANGELOG:

    
    
    core 
    opened by Codelax 1
  • update readme reference documentation

    update readme reference documentation

    https://github.com/scaleway/scaleway-cli#reference-documentation

    List of API namespaces is not complete, it should be completed. It also may be generated like doc, we should also check its content in CI.

    documentation core 
    opened by Codelax 0
  • autocomplete: install script instead of generating it in shell config

    autocomplete: install script instead of generating it in shell config

    Community Note

    • Please vote on this issue by adding a πŸ‘ reaction to the original issue to help the community and maintainers prioritize this request
    • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
    • If you are interested in working on this issue or have submitted a pull request, please leave a comment

    Description

    Currently, the autocomplete is installed by adding the script generation command to shell config (.bashrc), but the command scw autocomplete generate takes more than half a second to run, it should be quicker or we can generate this script once to the location of completion script for the used shell.

    This would speed up the shell startup time.

    How I imagine scw could expose this functionality

    scw autocomplete install would install shell completion correctly

    References

    enhancement autocomplete core 
    opened by Codelax 1
Releases(v2.7.0)
Owner
Scaleway
APIs, SDKs and open source projects from Scaleway
Scaleway
🏯 Monitor your (gitlab/github) CI/CD pipelines via command line interface with fortress

__ _ / _| | | | |_ ___ _ __| |_ _ __ ___ ___ ___ | _/ _ \| '__| __| '__/ _ \/ __/ _

MrJosh 6 Mar 31, 2022
The Coherence command line interface (CLI) is a lightweight tool, in the tradition of tools such as kubectl

Coherence Command Line Interface (CLI) Contents Overview Why use the Coherence C

Oracle 12 Dec 15, 2022
A kafka command line browser

kcli Kcli is a kafka read only command line browser. Install Binaries are provided here (windows is not tested). If you have go (1.11 or greater) inst

Craig Swank 188 Nov 17, 2022
Flexible HTTP command line stress tester for websites and web services

Pewpew Pewpew is a flexible command line HTTP stress tester. Unlike other stress testers, it can hit multiple targets with multiple configurations, si

Ben Gadbois 365 Dec 27, 2022
Command-line tool to remotely execute commands on Windows machines through WinRM

winrm-cli This is a Go command-line executable to execute remote commands on Windows machines through the use of WinRM/WinRS. Note: this tool doesn't

Brice Figureau 145 Dec 15, 2022
A command line tool for validating Kubernetes configs with rego

ccheck ccheck is a command line application for writing tests against configuration files and data using the rego query language. It's intended purpos

Brendan Ryan 63 Nov 16, 2022
Kubesecret is a command-line tool that prints secrets and configmaps data of a kubernetes cluster.

Kubesecret Kubesecret is a command-line tool that prints secrets and configmaps data of a kubernetes cluster. kubesecret -h for help pages. Install go

Charalampos Mitrodimas 18 May 3, 2022
Command kube-tmux prints Kubernetes context and namespace to tmux status line.

kube-tmux Command kube-tmux prints Kubernetes context and namespace to tmux status line.

null 7 Sep 10, 2021
An unofficial command line utility for Futbin

futbin An unofficial command line utility for futbin. Also, it can be used as a library. Install Pre-compiled executables Get them here. Source You ne

Matheus Moraes 18 Dec 29, 2022
Igo Agent is the agent of Igo, a command-line tool, through which you can quickly start Igo

igo agent θ‹±ζ–‡ | δΈ­ζ–‡ Igo Agent is the agent of Igo, a command-line tool, through which you can quickly start Igo, and other capabilities may be added lat

null 1 Dec 22, 2021
A command-line debugging tool to check the latency of SSL handshake

ssl-handshake A command-line tool for testing SSL handshake latency, written in

Puru 43 Nov 13, 2022
Command line tools for usedevbook.com

dbk dbk is a command-line tool (CLI) for usedevbook.com. It allows you to build and push custom environments for Devbook VMs. You can then launch Devb

Devbook 2 Feb 21, 2022
Web user interface and service agent for the monitoring and remote management of WinAFL.

WinAFL Pet WinAFL Pet is a web user interface dedicated to WinAFL remote management via an agent running as a system service on fuzzing machines. The

Gabor Seljan 50 Nov 9, 2022
Sample Driver that provides reference implementation for Container Object Storage Interface (COSI) API

cosi-driver-minio Sample Driver that provides reference implementation for Container Object Storage Interface (COSI) API Community, discussion, contri

Kubernetes SIGs 7 Oct 10, 2022
An advanced, yet simple, tunneling/pivoting tool that uses a TUN interface.

Ligolo-ng : Tunneling like a VPN An advanced, yet simple, tunneling tool that uses a TUN interface. by TNP IT Security Table of Contents Introduction

TNP IT Security 415 Dec 31, 2022
Container Storage Interface components for SPIFFE

SPIFFE CSI Driver WARNING: This project is in the "Development" phase of the SPIFFE Project Maturity Phases. A Container Storage Interface driver for

SPIFFE 29 Jan 3, 2023
This process installs onto kubernetes cluster(s) and provisions workloads designated by the uffizzi interface

Uffizzi Cloud Resource Controller This application connects to a Kubernetes (k8s) Cluster to provision Uffizzi users' workloads on their behalf. While

Uffizzi 13 Dec 14, 2022
A TUI interface to navigate and view OpenShift 4 must-gather logs

MGR "Must Gather Reader" MGR "not the final name" is a simple TUI interface to navigate and view OpenShift 4 must-gather files. How to run it: Downloa

Amr Elganzory 8 Dec 21, 2022
A cross platform CLI for Flyte. Written in Golang. Offers an intuitive interface to Flyte https://flytectl.readthedocs.io/en/latest/

FlyteCTL Flyte's official command-line interface Documentation Β· Contribution Guide FlyteCTL was designed as a portable and lightweight command-line i

Flyte 31 Nov 7, 2022