Skip to Content

PairSpaces

DocsBlog

PairSpaces

CLI

Used from the Terminal for rapid access to your Spaces

Installing

Download the PairSpaces CLI, pair, using the installer script for your Operating System.


> curl -fsSL https://raw.githubusercontent.com/pairspaces/install/main/install.sh | sudo bash

> pair version

2.0.0-release (Latest)

Verifying the PairSpaces CLI for Linux

For Linux users the PairSpaces CLI can be verified using cosign. Using the installer script, install.sh, downloaded previously:

> ./install.sh --verify

Verifying the PairSpaces CLI for macOS

For macOS users the PairSpaces CLI is signed and notarized by Apple, Inc. It should not produce any security notifications on your Mac.

Verifying the PairSpaces CLI for Windows

For Windows users the PairSpaces CLI is signed using Azure Trusted Signing, a service provided by Microsoft, Inc. It should not produce any security notifications on your Windows PC.

Uninstalling


> curl -fsSL https://raw.githubusercontent.com/pairspaces/install/main/install.sh | sudo bash -s -- --uninstall

Updating

The PairSpaces CLI will indicate when it needs to be updated when you use it.


> pair spaces list

This version of PairSpaces CLI is out of date. Please upgrade from https://docs.pairspaces.com.
...

To update the PairSpaces CLI repeat the installation steps to download the latest version.

Signing In

After creating a PairSpaces account at https://pairspaces.com/auth/signin, you will be able to sign in to the PairSpaces CLI using any command, for example:


> pair spaces list

You are signed out. Signing you in...

1. Go to the browser that just opened. If a browser window did not appear, navigate to https://pairspaces.com/device/verify
2. Enter the user code M6R6I9IZ
3. When your session is created, return to this prompt

PairSpaces CLI will open your default browser at a web page and ask you to sign in. After signing in, you will be asked to paste the code shared from the CLI into the form in the browser window. This will automatically sign you into the PairSpaces CLI.

Spaces

You can list the Spaces you created using pair spaces list. When you have no Spaces, this is the output from the PairSpaces CLI:


> pair spaces list

You have no spaces. Create one at https://pairspaces.com.

After you create Spaces, the output from pair spaces list will be similar to this:


> pair spaces list

Space ID			        Name				        Shared with you	
-------------------------	-------------------------	----------------
68704fdcf60bbb90e2b801f3	dynamic-stark			    No
-------------------------	-------------------------	----------------

Each Space is identifed by its own unique identifer, a Space ID, its name, and whether it's shared with you from someone else. The value for Shared With You is Noif you created the Space and Yes if someone else created it and added you as a user of their Space.

Space Keys

You access Spaces using the same Secure Shell (SSH) technology that you use for any other remote machine.

The PairSpaces CLI generates Keys when you run pair keys create. This command downloads a new public and private keypair. These keys are stored separately from keys at the default location for SSH keys on your system.


> pair keys create

Your Keys were created successfully.

PairSpaces does not keep a copy of your public and private keypair.

You can read about Keys and how we use SSH technology to enable you and your team to work together from Keys.

Each set of Keys will expire after 5 minutes. You can renew your Keys using pair keys renew.


> pair keys renew

Creating Spaces

You can create a Local Space using the PairSpaces CLI or the PairSpaces web application. You can only create Cloud Spaces using the PairSpaces web application.

To use the PairSpaces CLI to create a Local Space use pair spaces create. You will be prompted to select team members to share your Space with.


> pair spaces create

Select users to share your Space with.
↑/↓ to move, space to select, enter to confirm, q to cancel.
                                                
  2 items                                       
                                                
> [ ] alice@pairspaces.com                 
  [ ] bob@pairspaces.com                 

  ↑/k up • ↓/j down • / filter • q quit • ? more
Press q to cancel.

After selecting one or more team members your Space will be created.


> pair spaces create

...

Local Space "NAME" created with ID SPACE_ID.

Space Shell

You can access your Space by using pair spaces connect SPACE_ID, where SPACE_ID is the unique identifier listed when you run pair spaces list.

Because Local Spaces are directories local to your machine, you will see the following output.


> pair spaces connect 677029e3e72826e42fe49fcb

Your team can connect to your Space now. Use Ctrl-C to close the connection.

If this is your first time running the command, the PairSpaces CLI will download a Docker image that shares the current directory with anyone you shared your Local Space with.


> pair spaces connect 677029e3e72826e42fe49fcb
Unable to find image 'pairspaces/local-space-image:build' locally
build: Pulling from pairspaces/local-space-image
6e21e851fdce: Pull complete 
ddb0fbac1c67: Pull complete 
2956c16b0edc: Pull complete 
ded3d3b8cd56: Pull complete 
76a4c7a40933: Pull complete 
ef2acd22239e: Pull complete 
Digest: sha256:598d22383175833ce15e198c88c3be3244c7bbd7ce41c88092191df0adf186a0
Status: Downloaded newer image for pairspaces/local-space-image:build

Your team can connect to your Space now. Use Ctrl-C to close the connection.

For Cloud Spaces you will be logged in to your Space.


> pair spaces connect 677029e3e72826e42fe49f13

   ,     #_
   ~\_  ####_        Amazon Linux 2023
  ~~  \_#####\
  ~~     \###|
  ~~       \#/ ___   https://aws.amazon.com/linux/amazon-linux-2023
   ~~       V~' '->
    ~~~         /
      ~~._.   _/
         _/ _/
       _/m/'
Last login: Wed Jan 01 09:41:01 2025 from YOUR_IP_ADDRESS
[ec2-user@ip-SPACE_IP_ADDRESS ~]$ 

For Cloud and Local Spaces, PairSpaces defaults to sharing the /space directory with your team members.

Connecting to a Space Shared with You

For Spaces that are labeled as Shared with You when you run pair spaces list you will be able to connect to the Space using the command line or your favorite IDE.


> pair spaces list

Space ID			        Name				        Shared with you	
-------------------------	-------------------------	----------------
68704fdcf60bbb90e2b801f3	dynamic-stark			    Yes		
-------------------------	-------------------------	----------------
 

To access a shared Space use pair spaces connect SPACE_ID.

If the shared Space is a Local Space, you will have access to a shell environment.


> pair spaces connect 68704fdcf60bbb90e2b801f3
[root@123abd456] > ls -l
total 12
-rw------- 1 root root 2508 Nov 19  2023 anaconda-ks.cfg
-rw-r--r-- 1 root root  133 Nov 19  2023 anaconda-post.log
-rw------- 1 root root 2068 Nov 19  2023 original-ks.cfg

If the shared Space is a Cloud Space, you will also have access to a shell environment.


> pair spaces connect 677029e3e72826e42fe49f13

   ,     #_
   ~\_  ####_        Amazon Linux 2023
  ~~  \_#####\
  ~~     \###|
  ~~       \#/ ___   https://aws.amazon.com/linux/amazon-linux-2023
   ~~       V~' '->
    ~~~         /
      ~~._.   _/
         _/ _/
       _/m/'
Last login: Wed Jan 01 09:41:01 2025 from YOUR_IP_ADDRESS
[ec2-user@ip-SPACE_IP_ADDRESS ~]$ 

For Cloud and Local Spaces you can also access them using your IDE. Using VSCode, you can use its Remote-SSH: Connect to Host command, select the SPACE_ID that you want to access, and you will see the following.

Check the checkbox to trust all files in the parent folder and click Yes, I trust the authors.

For Cloud and Local Spaces, PairSpaces defaults to sharing the /space directory with your team members.

Previous

Quick Start

Next

Spaces