## 1. Project Overview & Quickstart (blinksh/BUILD)

# BUILD

The official build framework for the Armbian Linux distribution. This repository contains the complete toolchain and scripts required to compile custom OS images from source, including kernel configuration, U-Boot handling, and board-specific tweaks for various ARM and ARM64 single-board computers.

### Repository Details
- **Repository:** [blinksh/BUILD](https://github.com/blinksh/BUILD)
- **GitHub Stars:** ⭐ 5,342
- **Primary Language:** Shell

*Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.*

## 2. Official Technical Reference & Guides (blinksh/docs)

## File: README.md

# Blink Shell Documentation

Build using [Nextra 2.0](https://github.com/shuding/nextra).

- [Blink Shell](https://github.com/blinksh/blink)
- [AppStore](http://itunes.apple.com/app/id1156707581)
- [Community Edition](https://community.blink.sh)

## Social 

- [Discord](https://discord.gg/ZTtMfvK)
- [Twitter](https://twitter.com/blinkshell)
- [Reddit](https://reddit.com/r/BlinkShell)
- [GH Discussions](http://github.com/blinksh/blink/discussions)

---

## File: package.json

{
  "name": "docs",
  "private": true,
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "dev": "next dev -p 3030",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "next": "12.2.5",
    "nextra": "2.0.0-beta.18",
    "nextra-theme-blinkshell": "^2.0.0-beta.22",
    "prism-react-renderer": "latest",
    "prismjs": "latest",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "dependenciesMeta": {
    "nextra": {
      "injected": true
    },
    "nextra-theme-blinkshell": {
      "injected": true
    }
  }
}

---

## File: src/pages/faq.md

import { Callout } from 'nextra-theme-blinkshell'

# Frequently Asked Questions

## General Questions

### How to apply for a student license?
[Back To School 2024 is here!!](#back-to-school-2024-is-here). This year, we are extending our Back To School period until December 31st 2024. Apply for yours right now and don't forget to spread the word!

### Does Blink Shell work on all Apple devices?
We support iPhone and iPad. We are working on a new M-powered macOS version.

### Does Blink have a TestFlight version?
Yes, it has! We call it Community Edition, and you can sign up here: [https://community.blink.sh](https://community.blink.sh)

### How to file a bug report?
Fill an issue on our [GitHub](https://github.com/blinksh/blink/issues)

## Back to school 2024 is here!!
This year, our Back to School campaign will run until December 31st 2024, and it offers a 75% discount over Blink+ for an entire year (only $4.99!). This offer is available to Students, Faculty Members and other staff at educational institutions worldwide. You can [apply here](https://forms.gle/HvYyjobVLA42GobQ9).

### Why not free?
Here's a short story. In college, I once helped a friend with a C++ assignment. He insisted on paying me, even though I didn't want him to. He said, "This way, you will know  I value your work, and if I need you changes, I won't feel bad asking". And he was right. So, here is the deal: we're giving you an awesome friend discount on Blink so you value our work, and that way, you'll feel comfortable seeking for help if anything comes up.

### How does it work?
First, [apply here](https://forms.gle/HvYyjobVLA42GobQ9). Within a few days (since we send codes manually), you will receive a link to redeem Blink with your special discount. Please make sure to redeem it as soon as you get it.

### My code expired, can I get another one?
Sorry, you needed to redeem your code before Dec 31st 2024. We cannot issue new ones.

### I don't have a school email. How do I apply?
Sorry, we can only offer this promo to those who have a school email address as that is our only way to verify your eligibility. Thanks for understanding.

## Pricing

### What plans are available to buy Blink Shell?
Please see our [current plans.](https://blink.sh/#choose-package)

### Is Blink available for a one-time purchase?
No, Blink is no longer offered as a one-time purchase. Instead, we now provide Blink+ under an annual plan. This decision allows us to continuously support new operating system versions and add new functionalities. The annual plan helps avoid monthly charges and ensures a fair arrangement for both parties. It assists us in funding our costly development efforts, while you get access to the Pro app, which has been evolving for 7 years and continues to improve.

### I prefer owning my software and I'm not a fan of subscriptions.
We understand. One common concern we've heard is the fear of losing access to the app if something were to happen. But we want to remark that Blink is Open Source since its inception. This means you have the option to take control by building the app yourself. Owning the source code ensures that you'll always have access to the software, even if circumstances change. 

### I'm a user of the previous Blink, do I need to purchase the new one to continue using it?
No, you do not need to purchase the new version of Blink. You can continue using your purchased app after dismissing the initial prompt. The app you purchased should continue working seamlessly with the operating system and version you acquired it for.

To cater to our loyal customers, [we offered a special path called "Blink Classic"](/migration) that allowed users to transition into the new app. This grandfathering option was available for one and a half years, *ending on April 2023*.
Blink Classic users have access to the familiar functionality they were used to, but we cannot guarantee access to new features introduced in the updated version. If you prefer to explore the new features, you may consider upgrading to one of our packages.

### Should I wait for Black Friday deals or discounts?
We do not offer discounts. The best time to purchase is always right now. We think Blink is competitively priced, and this way you can enjoy its benefits immediately without having to wait for seasonal promotions.

### Is there a Freemium version of Blink?
We now offer a Free Trial of our complete solution with Blink+Build, providing you with a chance to explore all of Blink's features and benefits before making a decision. Our previous Freemium was phased out in 2023 as the metered paywall was perceived as a bad experience.
Blink is a professional-grade application. With the trial, we can focus on providing the best experience and support for those who are committed to making the most out of it.

### Is there a no-cost version of Blink available?
We provide a [Community version](https://community.blink.sh) for those who wish to contribute to the project in a different manner. However, it's important to know that this version has limited seats and comes with certain expectations. To participate, we kindly ask individuals to dedicate time to testing, provide feedback, and to actively engage in our Community.

## Known Issues

### Cmd key stuck while switching between apps with Cmd Tab

After switching apps with the `Cmd-Tab` shortcut, when you return to the same app, the `Cmd` key is still pressed and the shortcuts help window shown. You can then press `w`, `t`, etc without having the `Cmd` key pressed.

<Callout>
This is a known issue within iOS 13, and to get Apple to solve it we need your help. Please create a bug report within [Feedback Assistant](https://feedbackassistant.apple.com). We suggest that you use a similar title to ours: "Cmd key stuck while switching between apps with Cmd-Tab".
</Callout>

Here are two recordings that show the issue: `Cmd-tab` in [Pages.app](https://youtu.be/x0foV_ONDmk) & `Cmd-tab` in [Safari](https://youtu.be/-7LayQvtmPQ).

### Spacebar suddenly didn’t work?

Go to iOS Settings -> Accessibility -> Full Keyboard Access -> Commands -> Activate and change `Space` to `shift + space` or other shortcut.

That way you will have full keyboard access and spacebar working in Blink

---

## File: src/pages/index.md

# Quick Start Guide

## Installing Blink Shell

1. Download Blink Shell on the App Store:
[](https://apps.apple.com/us/app/blink-shell-build-code/id1594898306)

2. Start a Free Trial of Blink+Build or buy Blink+, the Shell of choice for developers, depending on your needs.

## Navigating Blink Shell

Welcome! You can now start using Blink. Here is a quick tour:

1. Using Blink Shell is similar to most other terminals - you simply type commands and hit the `RETURN` key.
2. Navigate command history with the `up` and `down` arrow keys.
3. Type `help` to get a quick list of available [commands](basics/commands) and features.

## Gestures

**Touchscreen gestures:**

1. To create a new shell, tap the screen with two fingers ✌️.
2. To switch between active shells, swipe side to side ⬅️👆➡️.
3. To adjust size of current terminal, pinch the screen 👌.
4. To start selection mode, Tap and drag 👆🔘🔼.

   You can drag selections to other apps, or from other apps into Blink. It will be pasted where the cursor is located.

5. To show the Context bar, tap the iOS Home Bar twice or press `CMD ⌘` twice.

      In the bar you can: Create or Close a tab, access Snips, and toggle Lock and Geo.

      Change the Context Bar appearance in the `…` menu.


## Keyboard shortcuts

   If you have a keyboard connected, press and hold `CMD ⌘` key to see available shortcuts.




## SMART KEYS

Smart Keys provide special keys to use in your terminal session. Smart Keys are **only** visible when using the on screen keyboard, and hidden when using an external keyboard.

- Modifiers (i.e. `CTRL` ^, `ALT` ⌥, and `ESC` ⎋) for key combinations like `CTRL`+`C`.
- Arrow keys.
- Function and Alternate Cursor keys like Home, End, Page Down and Page Up when pressing `CMD` ⌘.
- Scrollable area in the center with more keys
- Hold a modifier to chain multiple combinations, useful in applications like Emacs where you use chains like `C-x`, `C-c`.


## Configuration

To access the Settings menu type `config` in the shell or press `CMD ⌘` and `,` together:

- Hosts: create hosts that can be accessed with only the hostname. [Read more.](basics/hosts)
- Keys: Create SSH key pairs for a more secure, password-less access to your servers. [Read more.](basics/ssh-keys)
- Appearance: Style your terminal with [themes](basics/customize#themes) and [fonts](basics/customize#fonts).
- Keyboard: add shortcuts, modifier keys and custom key presses. [Read more.](basics/customize#keyboard)
- Get in contact with us through the Support or Feedback options.



## Connecting to a Server or Computer using Blink

### Mosh

1. Make sure you have mosh installed in your desired destination.
2. In Blink type `mosh [user@]hostname`. For example : `mosh irwin@irwinvb`.


   Or use the IP Address. For example: `mosh irwin@100.10.222.33`.

   [Read more about Mosh.](advanced/advanced-mosh)

### SSH
1. Make sure you have ssh set up on your desired destination.
2. In Blink type `ssh [user@]hostname`. For example : `ssh irwin@irwinvb`.


   Or use the IP Address. For example: `ssh irwin@100.10.222.33`.

3. Follow Blink instructions for password, accepting the remote host key, etc.

   [Read more about SSH.](advanced/advanced-ssh)

## Support and Community

We sincerely appreciate your support and use of Blink. You can contact us via [email](mailto:hello@blink.sh) but ideally it is best to file issues on our [GitHub Discussions](https://github.com/blinksh/blink/discussions) so that all of the community is aware of the issue. Not only does it help make Blink better but another user may help you solve your issue.

**VERY IMPORTANT: Reporting a problem in your review in the App Store will not help us solve issues that you might be experiencing. Please make sure to contact us too!**

When a crash occurs in the application we receive a crash report. When this happens, please [email](mailto:hello@blink.sh) us or open a [GitHub Issue](https://github.com/blinksh/blink/issues).

Do you have an idea for a feature? Join our community on [GitHub Discussions](https://github.com/blinksh/blink/discussions) to send us your suggestions!

---

## File: src/pages/meta.json

{
  "index": "Quick Start",
  "what-is": "What is Blink Shell",
  "basics": "Basics",
  "advanced": "Advanced",
  "integrations": { "title": "Integrations" },
  "cloud-providers": "Cloud Providers",
  "build": "Build",
  "build-up": "Build Up",
  "whats-new": "What's New?",
  "faq": "FAQ",
  "migration": "(Closed) Blink Shell 14"
}

---

## File: src/pages/migration.md

# Migrate from Blink Shell 14

First of all, you can continue using Blink Shell 14 or Legacy app after dismissing the initial prompt. The app you purchased should continue working seamlessly with the operating system and version you acquired it for. Apple’s iOS updates may affect its performance.

On February 9, 2022, we launched Blink Shell, Build & Code app, version 15, replacing the old version, Blink Shell 14. This is a new app and we renamed the old version as Legacy to indicate its end of cycle, as announced in-app and on social media. As a way to thank our loyal users, we created a migration process so they could keep using Blink Classic features and receive new updates. 

Blink Shell, Build & Code now also offers [two subscriptions](https://blink.sh/#choose-package) for accessing the latest features. These aren't mandatory for using Blink Classic, but if you choose to subscribe, we appreciate your support.

PS May 22nd 2023: Although we have been doing manual migrations past the April 15th deadline to help those users who reached out to us, we are unfortuantely not able to leverage this method anymore.

**PS PS: Why we cannot continue migrating users.** When we launched the new app, we were forced by Apple to do so under a new Company account (same company, different countries). After reaching out multiple times to them, they were not able to just transfer our new company information, forcing us to release a new app and starting over. 

We still wanted to help our previous users so to redeem the new app, we had to develop an automated flow the user would start in the new app, in order to redeem the receipt from the previous app. This required a platform in the backend that increased in complexity and we feared at one point would also stop working. Additionally, the old company would close and it would be illegal to continue operating and updating the old app so migrations would work. We set a deadline (April 15th 2023) giving everyone more than a year and a half, but at the same time creating urgency somusers did it on time. 

Tens of thousands of users migrated before the deadline. We are still very
 sorry if you found yourself left behind. We honestly tried to do everything that was in our hands.

---

## File: src/pages/what-is.mdx

# Blink Shell

We had no choice. We had to build Blink or we were going to jump out the window in frustration over the tools we were using. We started by analyzing what the must-haves were and we ended up grounding Blink on these four concepts:

- **Fast rendering**: `dmesg` in your Unix server should be instantaneous. We can't wait even a second to render. We didn't need to reinvent the wheel to make this happen. We simply used Chromium's `HTerm` to ensure that rendering is perfect and fast, even with those special, tricky encodings.
- **Always on**: Mosh transcends `SSH's` variability. Mosh overcomes the unstable and intermittent connectivity that we all associate with mobile connections. You can check your Safari without fear of having to restart the SSH connection. You can flawlessly jump from home, to the train, and then the office thanks to Mosh. Blink is rock-solid connected all the way. Mosh is readily available and can be easily installed on your server. Go to [Mosh](https://mosh.mit.edu).
- **Best Keyboard Support**: Blink embraces Bluetooth-coupled keyboards with gusto. But there's more, because we want more. Some like Caps as `ESC` on Vim, others Caps as `CTRL` on Emacs. Blink champions them all. During your always-on sessions, you're in your zone.
- **Custom Fonts and Themes**: We know how important it is to have your terminal, your way. That's why we include a selection of fonts and themes, including `Powerline` variants. And if that isn't enough, you can create and add your own.

But, Blink is much more. Please read on.

- You should command your terminal, not navigate it. Blink will jump you right into a friendly shell and it'll be clear to you how to roll.
- The interface is straightforward. We dumped all menus and went full screen for your terminal. Use swipe to move between your open connections, slide down to close them, and even pinch to zoom!
- Configure your Blink connections by adding your own Hosts and RSA Encryption keys. Synchronise with `iCloud`. Everything will look familiar and you get to work, fast!
- We've incorporated `SplitView`, for those necessary Google searches and chats with coworkers.

Blink is open source software. Participate in our community, and don’t forget to leave us your feedback and your feature(s) requests. Enjoy!

---

## File: src/pages/whats-new.md

# What's New

We want to make Blink updates more discoverable, giving new features a proper place to shine or a way to let you know that we fixed that annoying bug. And at the same time, we want everyone to participate in the release flow. From the moment a version is out on TestFlight until it becomes stable at the AppStore.

Since Blink 16, after an update, Blink will remind you to run the `whatsnew` command in a new shell. This command will open the What's New window, where you can explore the changes for that version. Tapping on each card will link you to the specific Documentation for a feature or GitHub discussion for a fix.

We want you to participate in the whole release process. Please visit the [Announcements](https://github.com/blinksh/blink/discussions/categories/announcements) section in our Discussions and access all the conversations for each release.



## Previous versions

You can read the previous Changelog of Blink v14 and below, from the following [link](https://github.com/blinksh/blink/blob/raw/CHANGELOG.old.md).

---

## File: src/pages/advanced/advanced-mosh.md

---
id: advanced-mosh
sidebar_position: 2
sidebar_label: Mosh
slug: /advanced/advanced-mosh
---

# All About Mosh

## Introduction

Mosh, a portmanteau word for mobile shell, is a terminal connection program that facilitates persistent shell sessions in less-than-ideal network situations. If you have a low-bandwidth or intermittent connection, switch between multiple devices or ISPs or even use devices with sporadic Internet access you will be able to maintain consistent shell sessions with Mosh.

Mosh accomplishes this feat by using the UDP-based state-synchronisation protocol ([SSP](https://en.wikipedia.org/wiki/Mosh_(software)#Roaming)), which isn't bound to a particular network connection. SSP keeps the client and server in sync, while predictive local echo can "guess" what will be displayed after the user presses a key. This approach reduces input latency and transfers fewer bytes of data over the wire.

Mosh isn't just for mobile devices. Ever have to connect to a SSH server in another continent? Sometimes the input latency is so high on international SSH connections that editing files and typing on the command line can be a frustrating experience. Mosh can significantly decrease your latency and improve your worldwide server connections.

Mosh runs as the user and doesn't need root access so if the process were somehow compromised the damage would be contained to the user and the system's administrative account would be spared. SSH still governs the authentication process, so your standard authentication methods such as SSH keys and passwords are still useable. Once connected, Mosh takes over the connection.

## Installing Mosh

To use Mosh you must install it on the server. Blink Shell comes with mosh support right out of the box. Any other client that you use will also need to have Mosh installed.

### Debian, Ubuntu and apt-based Distribution

```bash
apt install mosh
```

### Arch-based Distribution

```bash
pacman -S mosh
```

### CentOS, Fedora and Amazon Linux

You mush enable the EPEL, instructions to do so may vary on distribution, and run:

```bash
yum install mosh
```

Or you can also compile it from [source](https://github.com/mobile-shell/mosh).

### Other and Compiling from Source

For a list of instructions on other systems please see [this](https://mosh.org) link.

## Using Mosh

To connect with Mosh, run:

```bash 
mosh remote
```

Where `remote` for the host or IP address of the remote server. Authentication occurs over SSH. You can use the `-P` switch to specify a port.

```bash
mosh -P 1234 remote
```

Replacing `1234` with the port number of your remote SSH server. The Mosh session ends when you use the `logout` or `exit` commands.

## Mosh and Command History

Due to Mosh's predictive local echo and unique transmission methods it cannot maintain a history of previously used commands. To work around this shortcoming, you can use `tmux` or `screen`.

## A Word About Firewalls and Ports

Most system administrators open port `22` via TCP to SSH. Since Mosh uses UDP, you'll need to open UDP ports `60000` through `61000` for the SSP packets. This range opens one thousand ports which is more than enough but, if you only plan to make a few Mosh connections you can enable a smaller range, for example ports `60000` through `60005`,  that leaves room for five simultaneous sessions. You can also specify the UDP port with the `-p` option on the `mosh` command if you wish to use an entirely different range.

If SSH runs on a different port than the default you'll need to invoke Mosh with a custom SSH argument like this:

```bash
mosh --ssh="ssh -p 1234" remote
```

Replacing `1234` with the custom port and `remote` with the hostname or IP address of the server.

## SSH Tunnels and Bastion Hosts

Mosh has no concepts of SSH tunnels or bastion hosts but you can run a SSH tunnel in a different window. Once the SSH tunnel is established and the remote port brought to your machine, you can use `mosh localhost:1234` where `1234` is the port you tunneled, to connect via the SSH tunnel to Mosh. Doing this will counteract some of the advantages of Mosh, so using a VPN into the protected network is your best option.

## The Bleeding Edge of Mosh

Blink has additional support for new Mosh features like TrueColor rendering and remote clipboard. Some of these features are not supported in older versions of Mosh versions that may be installed on your servers. If that's the case, you can uninstall Mosh via your package manager or compile it and install it from source. Please see this [link](https://mosh.org) for more information.

---

## File: src/pages/advanced/advanced-ssh.md

---
id: advanced-ssh
sidebar_position: 1
sidebar_label: SSH
slug: /advanced/advanced-ssh
---

# Advanced SSH: Tunnels, Jump Hosts and Agents

## Introduction

All system administrators know that SSH is arguably the most useful and powerful remote administration tool available for UNIX/Linux systems. SSH brings a remote system's command-line interface to our local machine unlocking the real source of the magic behind NIX systems - the shell.

Bash, ZSH, fish and other shells allow us to run powerful command-line utilities that alone provide more capability than our average commercial GUI desktop program. Combining all of this with pipes and filters, these gems knit together an unrivalled system that empowers us all.

And yet, you can spend years in the shell and not know about some of its most unique and useful features. Let us dig into some of the more obscure, but useful, features of SSH.

## Persistent SSH Connections with Blink

Phones and tablets are tuned for extended battery life, but the power saving technology in iOS works against long-running SSH connections. Fortunately, Blink ships with a security feature that has the secondary effect of keeping your connections running longer. The `geo track` command available on Blink Shell will enable the location tracking feature in iOS to ensure Blink can maintain active SSH connections. If run as `geo lock`, additionally the location of your device will be "locked" and in case your device is moved, all your connections will be dropped. Rest assured, we don't use or store any of the location data from your device. 

## SSH Agent and Agent Forwarding

Installing private keys on untrusted hosts is a security risk, but some users still need to perform operations, like cloning GitHub repositories, without giving them their credentials. An Agent is a program that tracks the user's private keys, offering them for authentication across different sessions or authorizing remote hosts on its behalf. The typical `ssh-agent` helps use the keys to log into other servers without repeatedly typing passphrases. The Secure Enclave handles Blink's key encryption so we will be focusing on its use on remote hosts through Agent Forwarding. This way, instead of installing a GitHub key on the remote, the agent can authenticate on your behalf without exposing keys.

Blink's agent is integrated into the system, so it does not require running a separate application. You can configure the default agent in Settings > Default Agent.

At the CLI, you can load specific keys at any time by specifying the filename with `ssh-add KEY_NAME`. To see which keys the agent holds, run `ssh-add -l`. To remove a key, use the `-d` flag. Note you can add keys at any time before or after you have forwarded the agent. Since Blink 17.3.0, the agent will always hold your keys even between app sessions.

To enable SSH agent forwarding, connect with `ssh -A` option, or set `ForwardAgent` to `YES` on your [SSH Config](/basics/hosts#ssh-config). This securely makes the keys available to the remote machine. Don't worry - the SSH keys are not copied or exported to the remote server in any way, the agent only accepts signature petitions, and it will only remain open for the duration of that specific SSH connection.

Even though SSH agent forwarding has numerous safeguards in place, an application running on the remote server can still use your key for unintended or possibly malicious purposes. To help mitigate this risk, Blink by default will prompt the user specifying which server is trying to use what key. This feature can be configured at Settings > Default Agent > Prompt.

Additionally, we recommend using separate, single-purpose keys for SSH agent forwarding with limited exposure. For example, it is typical - but dangerous - to generate a single default key and use it to log in to servers or services like GitHub. Instead, create single-purpose keys that will limit the exposure: in our GitHub case, create a GitHub key.

To learn more about the security implications of SSH agent forwarding, please see [this](https://heipei.io/2015/02/26/SSH-Agent-Forwarding-considered-harmful/).

## Tunnels

SSH tunnels provide secure network routes to or from your local machine to a remote network. The simplest example is bringing a port from a remote system to your local machine. If you had a development server running a service on port `8080` that wasn't exposed to the Internet and wanted to access it, you could run this command:

```bash
ssh -L 8080:localhost:8080 host
```

Replacing `host` with the remote hostname or IP. Once authenticated, a service listening on port `8080` on the remote machine will now be accesible as though it were on your local device. A connection to `localhost:8080` will be forwarded via the SSH tunnel to the remote computer.

Blink Shell supports both LocalForward (-L) and RemoteForward (-R). You can also set up your tunnels inside the SSH Config for the Host. This way, all your tunnels will get started with the connection, without the need to explicitely pass them at the command line.

**PRO TIP:** Blink can also start the tunnels in the background, without starting an interactive shell. Check out the `-N` parameter for this purpose.

## SOCKS

VPNs are incredibly useful in a wide variety of ways, and with increasing privacy and censorship concerns, they're becoming a practical necessity. While not an exact replacement for VPN technology, Blink Shell provides a SOCKS5 proxy, so you can tunnel your web traffic through the remote machine. Like a VPN, this will allow you to browse the internet privately, or access restricted content, but also, access services that may be localized at the remote network.

We have created a separate article about DynamicForward, so please [follow the link](/advanced/socks) for more information.

## Jump/Bastion Hosts

A jump host (sometimes referred to as a bastion host or server) is an intermediate SSH server that acts as a gateway to other networks. This setup is a common way to provide SSH access to a protected server (or group of servers) while allowing only one IP address (the jump host) access. This setup prevents other machines from accessing the protected server and ensures that connections first authenticate through the jump host.

To facilitate this, SSH has a `ProxyJump` option that allows you to specify the intermediate server:

```bash
ssh -J jumphost host
```

Where `jumphost` with the jump/bastion server and `host` with the remote host.

SSH jump hosts eliminate the need for SSH agent forwarding, offering a more secure approach to connect to protected networks.

Special cases may require a more exotic command through the JumpHost. Blink Shell also supports `ProxyCommand` for this purpose, either in configuration or in the Command Line:

```bash
ssh -o ProxyCommand="ssh -W %h:%p jumphost" host
```

## Venture Forth with Your Advanced SSH Knowledge

We hope this guide to advanced SSH has been helpful. Blink Shell, with its native shell and SSH support combined with your knowledge of SSH agent forwarding, jump hosts, SSH tunnels and persistent connections transforms your iOS device into a networking and development powerhouse.

---

## File: src/pages/advanced/bookmarks.md

import { Callout } from 'nextra-theme-blinkshell'

# Bookmarked Locations

Blink Shell’s Bookmarked Locations bridge the gap between powerful CLI tools and seamless integration with the rest of your iOS environment. With Bookmarked Locations, you can create symlinks that act as shortcuts to key directories. Bookmarks allow you to connect Blink to remote systems or even file locations from other apps:

- **Remote Location Bookmarks**: Use Blink Shell local tools with remote files systems. Whether you're editing files with `vim` or finding files in remote locations, these bookmarks ensure that remote files are just as accessible as local ones.  
- **Bookmarks to Other Apps**: Link to file locations exposed by other applications and integrate them into your Blink workflows. Automate tasks or use shell tools to manage these files without needing to leave Blink. 

In this article, we’ll guide you through how to set up and use Bookmarked Locations.  

<Callout>
This feature replaces the previous `link-files` command, which did not persist locations between app reboots.
</Callout>

## How to Create Bookmarks

Creating bookmarks allows you to access specific locations from remote systems or other apps directly within Blink Shell:

1. **Open the Bookmarks Settings**: Navigate to **Settings > Bookmarks** in Blink Shell.

2. **Add a New Bookmark**: Tap on "Create New Bookmark" to start the process.

3. **Select the Location**: Choose a directory from the Files.app browser. This can be a folder on a remote system or a file location exposed by another app. Tap **Open** once the location is selected.

4. **Name the Bookmark**: Assign a clear and descriptive name to the symlink that will represent the bookmark. This name will appear in your shell.



5. **Access the Bookmark in the Shell**:  
   Once created, the bookmark will be available as a symlink in your Home folder. Use Blink’s CLI tools like `cd`, `ls`, `cat`, or `vim` to navigate, view, and edit files within the bookmarked location directly from the shell.



Please note, the symlink name or location the bookmark points to cannot be changed after creation. To modify a bookmark, delete the existing one swiping left and then create a new one with the desired new name or new location.

For remote bookmarks, be cautious when performing operations that may traverse large directories or access many files at once. Commands like `grep` or tools that recursively scan directories can trigger extensive downloads, consuming significant network bandwidth and time. Use such commands thoughtfully to avoid unnecessary overhead.

---

## File: src/pages/advanced/code.md

# Blink Code

VSCode is a very powerful code editor which has become the tool of choice for a lot of developers in record time. Lately, it has been catering to the needs of teams who want to focus on remote and mobile development, accessing their environments from a plethora of devices. The goal of a shell is to expose services to programs and users, and hence inside Blink Shell our approach has been to integrate Code with iOS so we could offer you the best of both worlds:
- A VSCode experience fitted to your device, that connects to VSCode web, Codespaces, GitPod, or your Code server.
- Work on local projects, or edit remote files as if they were in your device, thanks to Blink Files.
- First-class iOS experience, with software and hardware keyboard, and the full edge-to-edge experience without interruptions that everyone loves from Blink.

## Starting Blink Code

```
code <path_or_url>
```

Blink Code takes a single parameter. If it is a path, it can be local or remote following the same format as SFTP/SCP commands.

To launch Code and begin initial setup, first, run `code .`. Once it has launched, you will need to install the [blink-fs](https://marketplace.visualstudio.com/items?itemName=BlinkShellInc.blink-fs) extension. Right after installation, this will connect the Code instance to the Blink File System. The navigation sidebar will show the file hierarchy, opening individual files for editing and manipulation.



## Opening remote projects
Remote development on Code could not be any easier thanks to Blink Shell's abilities. If you have already [configured your host](/basics/hosts) and installed the [blink-fs](https://marketplace.visualstudio.com/items?itemName=BlinkShellInc.blink-fs) extension on the target, just type:

```
code <host>:<path/to/project>
```

Please make sure the host has all the authentication information in settings (like passwords), as to work, the connection must be non-interactive. You can check out the logs by doing `cat .blink/blinkCode.log` to identify issues.

If you have enabled [Files.app integration](/advanced/files-app) for the host, there is an even easier way to launch code. Just long-press the project directory or file, and tap `Code`!



## Code in the Cloud

Blink Code can also connect to your instance of Code Server, offering the same premium experience so you can be more productive. To do so, just copy the URL of the running code instance and use it as the parameter, like such:

```
code https://gitpod.dev/asdfqwerzxcv
```

Note there are iOS limitations on the domains we can access (we are working on that). We currently support domains for GitHub Codespaces, GitPod, and Code-Server. If your Code instance is accessed through a private IP, we suggest you [open a tunnel](/advanced/advanced-ssh#tunnels) so access happens through localhost instead.

**PRO TIP:** Blink will also capture `vscode://` routes, so it can fulfill the *Open in Desktop* functionality, for example, in GitHub Codespaces.



## Code from GitHub repositories

You can use Blink Code to quickly browse and edit your code in GitHub repositories. This is perfect when you need to do a quick fix or edit a blog or webpage, committing back changes once you are done.

On the bottom-left corner, tap the `><` button, and select "Open Remote Repository". Note you may have to log in to GitHub to access your repositories.

# Tips & Tricks

## Exploring VSCode
If you wish to explore VSCode in more depth, documentation abounds on how it works and what you can do with it. You can get started with the [VSCode official documentation](https://code.visualstudio.com/docs).

## On-Screen keyboard
Blink Code offers the same on-screen keyboard as the terminal. When you play with it, please notice that special key modifiers like `Ctrl`, `Cmd` and `Meta` are integrated inside Blink Code too. Try it opening the Command Palette using `Cmd-m`. We promise this will take your experience to the next level! 

## Keyboard Shortcuts
Blink Shell makes heavy use of keyboard shortcuts for navigation. Some of these may suppress VSCode keyboard shortcuts that you may deem necessary for your workflow. If so, you can easily reconfigure any by following [Blink Shortcuts](/basics/customize#blink-shortcuts).

# Troubleshooting
- If VS Code is not loading at all or it is showing a blank screen, try closing the tab and starting `code` again. Also, try closing Blink and reopening it.
  - Try using the --vscode-url parameter, like this: `code —vscode-url vscode.dev`. Then try to reload without it.
  - Try using the same URL with Safari (and if using just `code .`, use `vscode.dev`) under the same device. This may show if the device has some problems loading the URL. If Safari loaded, try to run the command again under Blink.
- Make sure the Blink-FS extension is installed and enabled. In order to use SFTP this extension is very important as seen in this [Discussion](https://github.com/blinksh/blink/issues/1304).
- If you have issues enabling Blink-FS, or getting the extensions to come through, https://vscode.dev may be having problems. In those cases, we have seen that changing to the Nightly version may work, as suggested in this [Discussion](https://github.com/blinksh/blink/discussions/1795#discussioncomment-6262467).
- Make sure SFTP is enabled in the remote, and that authentication requires no user input (like passwords or 2FA). One good test for this is to [enable the Files.app integration](https://docs.blink.sh/advanced/files-app) and browsing files there, as pointed out in this [Discussion](https://github.com/blinksh/blink/issues/1880).
- Make sure your remote path is valid. Try accessing your home folder with `code <host>:~/`. Then try using the Files.app integration, navigate to the folder you want to work on, long tap on it and `Open in Code`. This will automatically complete the paths for you and will allow you to see how it is accessed in the remote.
- Check logs `~/.blink/blinkCode.log`. This may give you a clue of where things stopped.
- Send a support request with the logs to [Github Discussions](https://github.com/blinksh/blink/discussions), create your `New discussion` under the `Support` category.

---

## File: src/pages/advanced/creating-fonts-and-themes.md

# Create your own Fonts & Themes

With [Blink Shell](http://blink.sh) you can have your terminal, your way. That's why we have built in a simple way to create and add themes and fonts to your terminal. Themes are JS code that can modify colors and cursor behavior, and fonts are just CSS that Blink will download for you. And don't forget to share them with others too!

Being web based gives us an easy way to make Blink more extensible. We will continue to improve it and to expand it to other things like plugins. Send us your suggestions [@BlinkShell](https://twitter.com/blinkshell)!

* Create your Shell theme (JS) or font (CSS)
* Download it from Blink
* Share it with others!

## Create a Shell Theme

```javascript
black       = '#000000';
red         = '#F25A00'; // red
green       = '#6AAF19'; // green
yellow      = '#9F9F8F'; // yellow
blue        = '#66D9EF'; // blue
magenta     = '#AE81FF'; // pink
cyan        = '#28C6E4'; // cyan
white       = '#ffffff'; // light gray
lightBlack  = '#C2E8FF'; // medium gray
lightRed    = '#FD971F'; // red
lightGreen  = '#529B2F'; // green
lightYellow = '#9F9F8F'; // yellow
lightBlue   = '#66D9EF'; // blue
lightMagenta= '#F92672'; // pink
lightCyan   = '#28C6E4'; // cyan
lightWhite  = '#E0E0E0'; // white

t.prefs_.set('color-palette-overrides',
                 [ black , red     , green  , yellow,
                  blue     , magenta , cyan   , white,
                  lightBlack   , lightRed  , lightGreen , lightYellow,
                  lightBlue    , lightMagenta  , lightCyan  , lightWhite ]);

t.prefs_.set('cursor-color', 'rgba(0, 0, 0, 0.5)');
t.prefs_.set('foreground-color', '#000000');
t.prefs_.set('background-color', white);
```

### Colors
Back in the old days terminals were only able to display 16 colors. Then more complex ones came with new sequences for 256 colors and nowadays there are even sequences to represent TrueColor.
Terminal Emulators and applications still rely on the basic 16 color sequences for their applications. This is done by defining a set of basic colors, and then a "highlighted" / "accented" version of those.
```javascript
t.prefs_.set('color-palette-overrides',
                 [ black , red     , green  , yellow,
                  blue     , magenta , cyan   , white,
                  lightBlack   , lightRed  , lightGreen , lightYellow,
                  lightBlue    , lightMagenta  , lightCyan  , lightWhite ]);
```
### Foreground / Background
In addition to the previous 16 colors, foreground and background colors can also be defined. This is usually done to improve contrast.
```javascript
t.prefs_.set('foreground-color', '#000000');
t.prefs_.set('background-color', white);
```

### Cursor
You can configure the cursor for the theme too, applying color and other effects.
```javascript
t.prefs_.set('cursor-color', 'rgba(0, 0, 0, 0.5)');
t.prefs_.set('cursor-blink', true);
```

## Create a Font
```css
@font-face {
    font-family: "Fira Code";
    font-style: normal;
    font-weight: 200;
    src: url(data:font/woff;charset=utf-8;base64,<base64 dump>);
}
@font-face {
    font-family: "Fira Code";
    font-style: normal;
    font-weight: 400;
    src: url(data:font/woff;charset=utf-8;base64,<base64 dump>);
}
@font-face {
    font-family: "Fira Code";
    font-weight: 600;
    src: url('fira code medium.ttf' format('truetype'));
}
@font-face {
    font-family: "Fira Code";
    font-weight: 800;
    src: url('fira code bold.woff' format('woff'));
}
```

Fonts are defined as a stylesheet using @font-face's structure. Make sure the font-family corresponds to the name you are giving when saving it. You can link your font to a valid URL, or you can embed it as a full Base64 representation. We suggest you add also the different variants available for weight.
* 200 Light or Thin.
* 400 Normal or Regular.
* 500 Medium.
* 700 Bold.

Read more about [font-face](https://css-tricks.com/snippets/css/using-font-face/)

## Installing on Blink.

As Blink Shell is a web terminal, themes and fonts are applied over the web and downloaded to your device for faster loading. We recommend GitHub as the fastest way to do that, but any file server will do.

- Create a Gist and get the "raw" URL for it.
- Go to `Settings` -> `Appeareance` -> `(New Font || New Theme)` -> Paste the URL and download it -> `Save` and select it from the list.

## Share it with others!

Have a great theme/font that would like to share with other Blink users? Go to the corresponding [theme gallery](https://github.com/blinksh/themes)/[font gallery](https://github.com/blinksh/fonts) and send us a PR :)

---

## File: src/pages/advanced/files-app.md

import { Callout } from 'nextra-theme-blinkshell'

# Files.app integration

Blink’s File Provider integration delivers unmatched file management on iOS. By combining the power of a File Provider Extension with advanced SFTP and CLI tools, it’s the only solution that offers desktop-class synchronization, alongside granular control for bulk operations.

The Replicated File Provider extension allows you to connect your remote file systems directly to the iOS Files.app. Browse, quickview, and manipulate remote files as if they were stored locally. Thanks to automatic syncing, uploads and downloads happen seamlessly in the background, ensuring your files are always up to date. The Files.app integration also enables you to access these files from other iOS applications, such as attaching them to emails, sharing them through messaging apps, or editing them in  productivity tools. Offline support further enhances this functionality, allowing you to work uninterrupted, even when disconnected.

For power users, Blink provides full CLI access to your remote files. Kernel-level integration ensures tools like ls, cd, find, and vim work with remote systems, enabling you to edit and manage files directly from the shell.

In this article, we’ll guide you through how to set up and use the File Provider to integrate remote file systems into your iOS workflows. From syncing with Files.app to working with remote files in the shell, we’ll cover everything you need to get started.

## Access from the Files.app

1. Go to **Config > Host**.
2. Scroll to the bottom to find the **Files.app extension**.
3. Tap "Add Location" to add the Home folder.

4. Open the Files.app and flip the switch to view the new provider.


You can now browse, upload, and download from your remote file system as if it was any other location in your device.

Blink supports multiple hosts and multiple locations per host in the Files.app sidebar. You can customize each location by configuring its name and the path it points to. Access these settings by tapping on the location. If you encounter connection issues, use the "Validate Connection" option in the same screen.



<Callout>
PRO tip: Use [Tailscale](www.tailscale.com) to access those machines not accessible through a Public IP.
</Callout>

### How to Delete a Location

To delete a location, swipe it left. This will immediately remove the current replica, including any downloaded files, and any synchronization state. Use this option if you want to clear downloaded files or start fresh. Note that local files pending synchronization will also be immediately removed, and changes will be lost, so be aware of the synchronization status or move them elsewhere before deleting the location.

## Access from the Shell

To access remote files from the shell, start by bookmarking a location. (See the [Bookmarks article](#) for details.) Once bookmarked, a symlink to the location will appear in your Home folder. You can then navigate to this symlink to access your remote file system.

From the shell, you can use familiar CLI tools such as `cd`, `ls`, and even native `vim` to interact with files. To open a share sheet directly from the shell, use the `open` command.

Note that while using the Shell to access files, changes from your device to the remote will synchronize automatically, but changes from the remote will require you to open that location within the Files.app. This is due to the lifetime of the extensions inside the iOS system.



## Access from Other Apps

The updated Replicated File Provider extension allows you to access remote file systems from within other apps, making integration seamless across your iOS workflows.

- Open the Blink Extension in the app you’re working with to browse your remote file system.
- Remote and local changes are automatically synchronized whenever files are accessed, ensuring you always work with the latest versions.
- This feature is particularly useful for tasks like attaching files to emails or editing remote files directly in other apps.

The remote file system can also be accessed from the *Shortcuts app* to automate various operations like:
- Create backups by downloading directory structures from a remote system.
- Upload files generated as output from Shortcut workflows.
- List directory contents and perform specific actions on selected files.

## How it works

The Replicated File Provider extension is designed to efficiently manage your remote file system while giving you flexibility and control. Thanks to unique file system features, the extension can separate lightweight operations, like listing directories, from heavier ones, such as accessing file contents. This ensures that your device doesn’t unnecessarily consume space or bandwidth when exploring remote file hierarchies. Be cautious when using commands like `grep` or other tools that may traverse large directories, as they could trigger extensive downloads.

The extension tracks currently visited locations and automatically triggers a pull every 5 seconds to check for changes on the remote system. This ensures that when re-visiting a folder, previously downloaded files remain up-to-date. If you make changes locally while offline, the system applies them to the remote replica automatically as soon as your device reconnects to the network. The system follows a last-change-wins policy, which ensures that the most recent modifications—whether local or remote—are preserved.

Offline access is supported through the replica, making it an excellent tool for workflows that require temporary disconnection. Files you’ve already downloaded are accessible even when your device is offline, and any changes made locally will automatically sync back to the remote system once you reconnect.  For example, you can edit a document locally while traveling, and Blink will synchronize those changes back to the remote server once you're back online.

Downloaded files are stored locally on your device and managed by the iOS system. The system dynamically allocates and reclaims storage as needed, ensuring efficient use of available space. This means that files you’ve accessed may be removed automatically by the system when storage is required elsewhere. If for security you need to immediately clear all downloaded files, you can remove the Location.

When uploading files, the extension first places the file in a temporary location ($HOME/.blink.tmp.xxx) before moving it to its final destination. This approach ensures that partial uploads or interruptions do not affect the integrity of the target directory. In the event of errors during the upload process, any leftover temporary files are automatically cleaned up by the extension. This cleanup occurs regularly, including each time the extension starts, maintaining a tidy and reliable file system.

The replica is designed to be eventually consistent with the remote. This involves numerous background operations to assess the remote's current state and determine the necessary actions to maintain synchronization. Even though the system parallelizes most operations (up to 8 at the same time), due to the multiple context changes, targeted workflows like SFTP for bulk downloads or uploads will always be more performant.


## Troubleshooting and Monitoring

If you encounter issues while using the File Provider extension, here are some steps to help you resolve them:

- **Verify the connection**: Use the "Validate Connection" option in **Config > Host > Files.app configuration** to ensure the connection to your remote system is active and properly configured. The UI will display the proper error in case it couldn't connect.

- **Check logs**: If running into syncing issues, please check the provided logs. Logs for the syncing state can be found in the `.blink` folder, prefixed with `fp-<location_name>-<location_id>.log`. These logs provide detailed information about the syncing process and can help identify any problems.

- **Errors**: The Files.app uses different icons to indicate the synchronization status of the replica. Failed operations are automatically retried by the system at varying intervals before being marked as failed with an exclamation icon. Any changes made to the remote or local files will automatically trigger a retry. Errors are expected to be rare, and most operations should eventually succeed. For troubleshooting specific issues, refer to the logs for more detailed information.

---

## File: src/pages/advanced/meta.json

{
  "advanced-ssh": "SSH",
  "webauthn": "WebAuthn: Passkeys & Secure Keys",
  "advanced-mosh": "Mosh",
  "files-app": "Files.app",
  "bookmarks": "Bookmarked Locations",
  "vim": "Vim",
  "code": "Code",
  "unix-roundup": "UNIX Roundup",
  "socks": "SOCKS",
  "creating-fonts-and-themes": "Creating Fonts & Themes"
}

---

## File: src/pages/advanced/socks.md

# SOCKS5

Blink comes with dynamic port forwarding support, aka SOCKS5 server or proxy. This is perfect as a simple VPN that allows you to browse the internet using a remote machine as a proxy, or - a more critical dev scenario - to access backend services behind a Firewall. As a SOCKS proxy sits at layer 5 of the OSI stack, its performance is also astounding, try for yourself!

For a thorough explanation on how a SOCKS proxy works, please read the [SOCKS5 Proxy Primer](https://securityintelligence.com/posts/socks-proxy-primer-what-is-socks5-and-why-should-you-use-it/). We wanna remark three features here:

1. DNS resolution happens at the host, so your requests are more secure and also will allow you to access services at the host side, like behind a firewall.
2. As mentioned, SOCKS sits at the layer 5 of the OSI stack. This means TLS is negotiated between the browser and the host, so your requests are fully secure.
3. Our current implementation only supports TCP traffic and not UDP.

## Configuration on iOS

Within iOS, you can configure all your traffic to be routed through Blink Proxy. This is really cool, as other apps can also make use of it.

1. Open: Settings > Wi-Fi > Connection Information > Http Proxy | Configure Proxy
2. Select Automatic, and introduce https://blink.sh/proxy.pac
3. To start dynamic port forwarding inside Blink, just type the usual `ssh -D 10800 <host>`.
4. As this is an ssh tunnel, we would recommend that you also do `geo track` to ensure that the connection is locked while you are browsing.

The usual SOCKS5 port is 1080, but it is currently taken by iOS. Our own blink.sh/proxy.pac file configures the listener on port 10800. If you would like to use a different port, you will need to use your own proxy.pac file. We suggest creating a Gist with that configuration and link to it instead.

---

## File: src/pages/advanced/unix-roundup.md

# UNIX Command Line Tools Roundup

## Introduction

Most users use Blink Shell to access remote machines, but many don't know that beneath our easy to use interface lies a robust set of command-line tools that would impress even the most proficient UNIX greybeard.

Ever wanted to diagnose a network issue? Sure, there are applications with fancy GUIs for running network analysis, but any UNIX veteran knows that tools like `ping` and `dig` are quick and powerful. Want to search through and manipulate your files? `grep`, `awk` and `sed` have you covered. Transfer your command line wizardry to your phone or tablet with Blink Shell.

You can see all the applications at your disposal by pressing `TAB` on the shell prompt.

## File Utilities

iOS limits you to a sandbox, but you can make the most of this by linking files from other locations on your device like iCloud. Simply run `link-files` to bring up a dialog allowing you to select the folder to connect to Blink Shell.



Once you've linked the desired folder you're ready to go. Want to make folders in iCloud? No problem,

```bash
mkdir docs
```

You can even move files in the cloud with ease,

```bash
mv *.pdf docs
```

Need to find a particular file? Use the power of `grep`:

```bash
grep -nHr TERM LOCATION
```

We have even included `sed` and `awk`! `sed` is short for stream editor and it allows you to edit text inline, while `awk` is a superb data reporting and extraction utility.

For example, with `sed` we can remove any string of characters, in this example we will locate and remove `aoe` from our file to then form a new file:

```bash
sed -i 's/[aoe]//g' file
```

Need to replace all your potatoes with bananas? Don't worry, we all do that at some point. `awk` to the rescue!

```bash
echo "one potato two potato" | awk '{gsub(/potato/,"banana")}1'
```

If you want to learn more about `sed` and `awk`check [this](https://github.com/codenameyau/sed-awk-cheatsheet) fantastic cheatsheet.

Another typical scenario when using a shell is the extraction of a compressed file downloaded from a web browser like Safari. Blink Shell provides `tar`, `gzip` and `md5` to make this task a breeze.

```bash
md5 filename.tar
tar xfz filename.tar -C destination
```

Blink Shell provides far more utilities and here's a list: `awk`, `bc`, `cat`, `chflags`, `chksum`, `compress`, `cp`, `diff`, `du`, `egrep`, `fgrep`, `find`, `gunzip`, `gzip`, `head`, `less`, `link-files`, `ln`, `ls`, `md5`, `mv`, `pwd`, `rm`, `rmdir`, `sed`, `sort`, `tail`, `tar`, `touch`, `uncompress`, `uniq`, `wc` & `xargs`.

## Remote Transfer Tools

Blink Shell offers a lot of useful local functionality but Blink specializes in enabling remote connections and that strength is leveraged in our command line tools. Want to upload a LaTeX file or a generated PDF to your server or even download a file from a Linux machine into iCloud? We have you covered with `sftp` and `scp`.

```bash
scp file user@remotehost:remotepath
sftp user@remotehost:remotepath
```

In this example, we will transfer a file named `file` to the server `remotehost` with the username of `user` to place it in the `remotepath` folder. `scp` accepts wildcards, allowing the transfer of multiple files at once, but you can also `tar` the files for a better transfer experience. Blink will 

Although the `sftp` command in UNIX environments is interactive, Blink Shell uses scp and sftp interchangeably. If you wish to start an interactive session, we have a better solution with our [Files.app integration](/advanced/files-app). This is a fantastic way to browse and open files in a remote Host.

We heavily recommend using these commands for large uploads and downloads of full directory structures, where the performance is way better than the Files.app, and the commands will offer more visibility and control of the progress 

**PRO TIP:** Blink Shell has an additional flag `--update`, that will synchronize the contents of source and destination based on timestamps. This is specially useful if you need to keep a folder in sync with the remote. The result is similar to `rsync`, although `rsync` has a lot more options and complexity.

## Network Diagnostics

The network commands built into Blink Shell can save your day. Have you ever needed to check if a server is up from your phone? Running `ping` will get the ball rolling, followed with `nc` for advanced diagnostics.

You'll also find helpful tools like `dig` and `nslookup` to troubleshoot DNS issues as well as the `ssh` command for complex SSH connections and testing.

Have a little downtime? Have some retro fun with `telnet`:

```bash
telnet towel.blinkenlights.nl
```

We provide a full set of network utilities, including: `dig`, `host`, `nslookup`, `ssh`, `mosh`, `nc`, `ping`, `ping6`, `rlogin` and `udptunnel`.

## Miscellaneous

Blink Shell includes a few extra tools designed to make your mobile life easier.

Perhaps the most essential command is `geo`. This takes advantage of the device tracking functionality in iOS to enhance security, with the secondary effect of keeping your SSH connections running in the background. Don't worry, your location data won't be sent to Blink. In fact, it isn't sent anywhere.

To enable `geo`, run:

```bash
geo start
```

To enhance the security of your SSH sessions you can run:

```bash
geo lock
# Once you want to stop tracking
geo stop
```

`geo lock` will disconnect all active SSH connections if the device is moved significantly, like someone stealing your device. If you only want to enable background tracking for background connections, do:

```bash
geo track
```

Put the clipboard to use on your mobile device with `pbpaste` and `pbcopy`. Use the `pbcopy` command to put the contents of a file into the clipboard and `pbpaste` to paste the data. You can even use the `touch` command to create an empty file and paste it with `pbpaste` clearing your clipboard.

To open a file just run:

```bash
open filename
```

and a dialog will show asking which application to use to open the file.

Finally, use the `openurl` to launch a website. This is extremely powerful when paired with tools like `xargs` to open multiple URLs at once.

```bash
open url
```

This whirlwind tour of the Blink Shell just scratches the surface of what you can do with Blink. Go ahead and put your command line chops to use with our innovative command line interface to unlock a whole new world of mobile functionality.

---

## File: src/pages/advanced/vim.md

import { Callout } from 'nextra-theme-blinkshell'

# Vim for iOS and iPadOS

From v17.3.0, Blink now includes Vim to provide a convenient tool for local file editing. Vim is the ubiquitous text editor included in most UNIX systems, making it a familiar choice for many users. Thanks to Vim’s architecture and extensibility, numerous features can be enabled with a bit of configuration. Here is how to set things up.

<Callout>
Our goal with local tools remains to enhance the local experience before transitioning to a remote machine. While this is real Vim, we have disabled certain features at build time to ensure better stability, so please do not expect full compatibility with all extensions or branches like Neovim. Our aim is to offer basic local editing capabilities, with everything else being considered an extra.
</Callout>

## Basic setup

Make a minimal vimrc by doing `vim ~/.vimrc`, with a few essential settings:
```
set termguicolors    " enables colors
set encoding=utf-8   " ensures that vim's locale is set properly at launch
set backspace=2      " more powerful backspace
syntax on
```
`:wq` to save it, and exit vim.

## Enable plugins

Since most plugin managers rely on the *git* cli, which is not available on Blink, @rrgeorge from our community developed a plugin manager that uses *curl* to download and install plugins from GitHub.

Add the following to your `~/.vimrc`:
```
let data_dir = expand('~/.vim')
if empty(glob(data_dir . '/autoload/blink.vim'))
    call mkdir(expand(data_dir."/autoload"),"p")
    silent execute '!curl -fLo ' . data_dir . '/autoload/blink.vim --create-dirs  https://raw.githubusercontent.com/rrgeorge/vim-blink/master/blink.vim'
endif

let g:blink_path=~/.vim/pack/blink

call blink#init()
```

## Install some nice QOL plugins

You can add `Blink` to activate plugins (and install as needed):

```
Blink 'ryanoasis/vim-devicons'
Blink 'vim-airline/vim-airline'
Blink 'vim-airline/vim-airline-themes'
Blink 'fcpg/vim-osc52'
Blink 'preservim/nerdtree'
Blink 'preservim/tagbar'
```

To check all plugins for updates, run `:BlinkUpdate`.

For more information, please read: [rrgeorge/vim-blink](https://github.com/rrgeorge/vim-blink/)

---

## File: src/pages/advanced/webauthn.md

# WebAuthn for SSH: Using Passkeys and Secure Keys

WebAuthn keys rely on Public Key cryptography, so these keys are as secure as your usual ECDSA keys. Their advantage is that they leverage the [Web Authentication API](https://webauthn.guide) standard, making them portable between your devices and accessible through hardware Secure Keys. Blink makes it very easy to leverage them. You can see it in action on this Twitter thread.

Waiting for [#iPadOS16](https://twitter.com/hashtag/iPadOS16?src=hash&amp;ref_src=twsrc%5Etfw)? Try some [#iOS16](https://twitter.com/hashtag/iOS16?src=hash&amp;ref_src=twsrc%5Etfw) goodies on Blink this weekend…SSH auth using [@yubico](https://twitter.com/Yubico?ref_src=twsrc%5Etfw) [#yubikey](https://twitter.com/hashtag/yubikey?src=hash&amp;ref_src=twsrc%5Etfw)? ✅Working on iPhone over NFC? ✅Working on iPad over USB-C??!?!? ✅ [pic.twitter.com/usNW8HCNEF](https://t.co/usNW8HCNEF)&mdash; Blink Shell (@BlinkShell) [September 15, 2022](https://twitter.com/BlinkShell/status/1570427813819486212?ref_src=twsrc%5Etfw) <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>


## Why WebAuthn keys

For years, the first step to protect SSH access was to move from passwords to asymmetric public keys. Then, specialized hardware keys, [Yubikey by Yubico](https://yubico.com) being the most recent proponent, offered additional protection to the Public Key Infrastructure, moving keys from your local drive to specialized hardware and offering two-factor authentication. iOS has offered varying support for Secure Keys, but up until now, it has been very limited as it required external SDKs.

While you were busy building amazing things, Apple introduced [Passkeys at WWDC22](https://developer.apple.com/videos/play/wwdc2022/10092/), and we were very excited. Apple designed Passkeys on top of the Web Authentication API standard, building on top of many years of innovations in protocols and secure keys. The standard provides a flow to use authentication with public key cryptography, moving away from passwords and secure second-factor authentication. With Apple's legendary design and access to millions of devices, it could become what the WebAuthn standard needs to take off as the future of authentication.

OpenSSH server has had built-in support for WebAuthn keys since 8.2. At Blink, we have worked on the first client implementation in the wild. But living on the edge sure comes with a few limitations, so do not miss the Known Issues section to find out if this new type of key is for you.

## Creating WebAuthn keys

You can create WebAuthn keys to use with Blink for SSH authentication in two ways:

### Passkeys

Open `config` > `Keys` and press the Plus (+) button to create a new Key. At the dropdown menu, select `Passkeys`.



Type a name to identify your key and press `Create`. iOS will validate your identity and subsequently create a key for you. 



If you tap into the newly created key, you will see that the public key identifies itself as `sk-ecdsa-sha2-nistp256@openssh.com`. Passkeys only support one type of algorithm (ECDSA) and curve (P-256). Reading the Private Key is impossible, as with Secure Enclave keys.

To use the key, make sure you copy the public key into the server, and call SSH as you usually do. iOS will present the screen below to validate your identity and authenticate you in the server.



### Passkeys in a secondary device.
In this scenario, you store the Passkey in a different device, and when connecting, that device will automatically receive an authentication request. As a secondary device needs to be present, it effectively becomes an authentication token, almost in a two factor authentication fashion.

To start, follow the previous steps, and when iOS tries to validate your identity to create the key, at the bottom select `Save on Another Device`.



The next screen will present a QR code you should scan from the alternate iPhone or iPad you want to become your authentication token.



To use the key, make sure you copy the public key into the server, and call SSH as you usually do. This time, your secondary device will automatically ask for authentication. After validating your identity, it will log you in.

### Secure Keys
In this scenario, an external Secure Key, like [Yubikey](yubico.com) or [Titan](https://cloud.google.com/titan-security-key) is used to enable hardware-backed SSH authentication. 

Open `config` > `Keys` and press the Plus (+) button to create a new Key. At the dropdown menu, select `Secure Key`. 



Type a name and press `Create`. When asked where to create the key, select `Security Key`.



iOS will prompt you to introduce the Secure Key and validate your presence by tapping or typing a PIN code. 



If you tap into the newly created key, you will see that the public key identifies itself as ``. Secure Keys only support one type of algorithm (ECDSA) and curve (P-256). Reading the Private Key is impossible, as with Secure Enclave keys.

To use the key, make sure you copy the public key into the server, and call SSH as you usually do. iOS will present the screen below to introduce the key and validate your pressence by tapping or typing a PIN code. After the validation, you will be logged in.



## Known Issues

- In order to use WebAuthn keys for authentication, the server needs to run OpenSSH server > 8.2. macOS ships a version of OpenSSH that does not have support for secure keys compiled. In this case, we recommend installing openssh-server using Homebrew.
- Your Secure Key must support the WebAuthn protocol and be verified to work on iOS / iPadOS. Models with NFC will only be supported on iPhone. Models with USB-C will only be supported on iPad.
- This is a new feature in iOS16 / iPadOS16. Although all Secure Keys should work, there may still be bugs during creation or signing. Ie, the Titan Key may not blink when signing in some cases. Please try your model and let us know so we can report back. (Issue)
- This is a new feature in OpenSSH, and we seem to be the first client implementation as well. We are aware that Agent Forwarding currently does not work for this type of key. Please report to us if you see any other misbehaviors, we will try to fix them within our possibilities.
- Because the keys require user interaction, they will not yet work with Blink's Files.app integration or Blink Code. (We expect to fix this in the future, please upvote the Issue right her

---

## File: src/pages/basics/commands.md

# Commanding Your Blink Terminal

## Overview

This guide will explain the various commands available to you inside Blink.

Each command has parameters, called arguments, that adjust the operation and behavior of that command. Any argument passed to a command will override its operation, even if those arguments conflict with any pre-existing configuration. For a more in-depth look at other commands, please read our [UNIX Roundup](/advanced/unix-roundup).

## In-App Help

If you type `help` in the Blink Shell terminal you’ll see an overview of the basics like the following:



### Config

If you type `config` or `⌘+,`, you’ll be presented with the configuration screen. From here you can adjust the application’s settings.

### SSH

The `ssh` command will allow you to start a secure remote shell to another device. The parameters to this command are as follows:

```bash
ssh user@host
```

Where `user` is the username you wish to use, and `host` is the hostname (or IP address) of the remote machine to connect to. If you type `ssh --help` you’ll see a simple usage guide that explains the other optional parameters:

The most common parameters you may need to specify are the port, identify file, and adjust the verbosity to debug connection issues.

```bash
ssh -i my_identity -p 1234 -vvv myuser@11.22.33.44
```

In the above example, a connection will be attempted to `11.22.33.44` using the username `myuser`, the identity file `my_identity` is used, port `1234` is specified, and extra debugging information will be displayed.

### Mosh

Mosh is a mobile remote shell that is better suited for mobile use. It allows for roaming and supports the intermittent connectivity that is commonly found on mobile devices.

Mosh has its own detailed set of arguments, however, for most common uses you’ll use a syntax similar to the ssh command:

```bash
mosh user@host
```

If you type `mosh --help` without any arguments you will see a full list of available options.

You can configure most Mosh options, including the startup command, in your host configuration. For more information, please see [“Create and Access Hosts Using Blink Shell”](/basics/hosts).

An example of using Mosh in Blink Shell would be:

```bash
mosh carlos@11.22.33.44
mosh plankton — tmux attach
mosh plankton — screen -r
```

In the above examples, the `--` parameter is used, which allows for running commands once connected without prompting first.

You’ll also notice that in the second and third example, the host `plankton` is used. You can define your own custom hosts with user, port, and identity key specifications defined per hostname. This reduces the amount of typing and commands you’ll need to execute to connect to a host.

### SSH Copy ID

With the `ssh-copy-id` command, you can copy your secure key to a remote server. It has the following format:

```bash
ssh-copy-id identity_file user@host
```

Where `identity_file` is the name of the SSH key you wish to copy, `user` is the username on the remote server, and `host` is the hostname or IP address of the server in question.



It should be noted that this command will require you to either have another key on the server or the password. If you aren’t being presented with a password prompt, please check on the remote server that SSH password authentication is turned on. Though SSH keys are more secure, it may be helpful to temporarily turn on password authentication so that you can copy your key to the machine.

While the exact procedure varies, on RHEL/CentOS, you would edit the `/etc/ssh/sshd_config` file and change `PasswordAuthentication` to `yes` and restart SSH via `service ssh restart` (or reboot).

This command is a simple wrapper around the ssh command to facilitate easy transfer of SSH keys. If you need to specify a different port, you must create a host in your configuration.

## Other commands and tips

**Reverse Search.** Typing the same commands is repetitive and sometimes on a cramped phone keyboard the experience may not be the best. With `Ctrl ^-r` you can access your command history menu. Start typing parts of the command and Blink Shell will match and suggest as you go.

**SCP and SFTP.** Blink gives you the usual basic commands to copy and move files between your system and the remote. For example, you can type `scp file.txt user@remotehost:` to copy the `file.txt` on your local machine to the remote host. You can find a more in-depth explanation [here](/advanced/unix-roundup#remote-transfer-tools).

**Basic UNIX toolbox.** Within Blink, we have embedded a basic UNIX toolbox. You will find some network operations like `ping` or `nc`, file operations like `mkdir`, `grep`, and even the small “popular” editor `ed`.  You can find a more in-depth look at all the commands [here](/advanced/unix-roundup).

---

## File: src/pages/basics/customize.md

# Customizing Blink Shell

Customization is one of Blink touchstones. When starting development, we made sure we were able to customize everything even before we wrote a line of code. That’s how important it was for us.

We know it is important for you too. Having a keyboard the way you want, is second nature. Themes that don’t hurt your eyes so you can use them to code all day. Or the Font that you feel most comfortable with, whether it is more condensed or extended.

Let's walkthrough all the ways you can have Blink work for you. To get started, run ‘config’ into one of the terminals.


## Keyboard

Within Blink, you can customize from Blink Shortcuts like “Open terminals” or “Copy - Paste” to sequences and modifiers that are sent to a terminal. You can find all the keyboard configuration under the “Keyboard” settings.



## Blink Shortcuts

You can fully control Blink with your keyboard. Great when you don’t want to distract from what you are doing. Sometimes terminal apps like Vim or Emacs use a big amount of keyboard sequences that may “collide” with Blink Shortcuts. That’s why we allow you to customize them.

Start by opening the Blink Shortcuts section. There you can see the list of all shortcuts. To change one, just tap on it. Press the new keyboard sequence you would like to use, and Blink will automatically capture it.



**Pro tip:** On the On-Screen keyboard, Blink also offers a Cmd key - it is the `⌘` symbol. So all the shortcuts that are available on the external keyboard, are also available in your device.

## Custom Keyboards

iOS and iPadOS can install custom software keyboards. Sometimes those are convenient to write on, but not very good for a terminal. You can disable those by just turning off the switch.

## Modifiers

Here is where Blink shows all its power. Modifiers are keys that when pressed in combination with others, they Modify the sequence being sent, for example, Ctrl-x or Ctrl-v. Usual hardware keyboard layouts aren’t very UNIX friendly. Keys like control are too far away and small, other keys like Opt-Alt-Meta may be too small.  iPad keyboards do not even have an Esc key!

Within Blink you can configure other Modifier keys, like Caps, Cmd, etc… to replace Ctrl or Alt sequences. This is very common on Emacs where Ctrl or Esc are usually mapped to Caps and Alt.

In the Modifiers section there is a list of Modifiers that can be adjusted. To configure one, just tap on it. Some keys are on both sides of the keyboard, like Ctrl, and Blink allows you to assign different modifiers or actions to each. With Blink you can also send a “keypress” instead of a modifier sequence, so for example, you can make Caps send Esc when pressed, but Ctrl when used together with other key.

Here are some common configurations for specific users:

**Pro tip:** On the On-Screen keyboard, Blink offers `Ctrl`, `Esc` and `Alt` modifiers too. You can read more about it at [Navigation](/basics/navigation).



## Custom presses

As we mentioned, there is no Esc on iPad keyboards. There are also no function keys. Some external keyboards also don’t have a very convenient placement of important keys like | or \ >. Blink to the rescue again. Within the Custom presses section you will be able to remap single key presses into other sequences.



# Appearance

**Warning: All changes in this section will take effect in a new Blink Shell tabs/windows!**

Let's move on to `config` and go to `Appearance`. Blink ships with a good set of themes, so you can select one that is to your liking and easier on your eyes.

## Themes

Blink only ships a few themes, but opens the door to create and install yours. Make sure to visit our [themes gallery](https://github.com/blinksh/themes).

To install a theme go to `New Theme` -> Paste the raw URL to theme, and download it -> `Save` and select it from the themes list.

More advanced users can create own themes, you can read more about it [here](/advanced/creating-fonts-and-themes#create-a-shell-theme).

If you would like to remove a theme, just swipe left.



## Fonts

Blink shows all the Monospaced fonts that are already installed on your device and it comes bundled with most popular open source monospace fonts used in terminals.

By default, Blink uses our beloved Pragmata, an optimized font for shell and development with a lot of special characters. It also includes ligatures, so special characters have a special more pleasant appearance.



As with themes, if you don’t find one to your liking, you can also install and use other fonts. There are two ways to do that. You can use an app like Fonts to install your font inside the system so it is available on every application.

More advanced users can create own CSS files with fonts, you can read more about it [here](/advanced/creating-fonts-and-themes#create-a-font).

If you would like to remove an installed font, just swipe left.

### More Options

- **Font Size**: Default font size inside Blink Shell windows
- **External Display Fonts Size**: Default font size on external displays
- **Enable Bold**: Enabling bold fonts
- **Bold as Bright**: Use bright colors on bold fonts
- **Cursor Blink**: Constantly blink cursor

---

## File: src/pages/basics/hosts.md

# How to Create and Access Hosts in Blink Shell

## Overview

The purpose of this guide is to show you how to pre-configure hosts for a simpler and more secure access. It is time consuming to type the same IP address, username and possibly password repeatedly, so we added the Hosts feature in Blink to allow this data to be saved for easier use.

## Adding a Host

When accessing the Hosts section in the configuration pane of Blink, you will be presented with a list of existing hosts. If this is your first time using this section it will be empty.



To add a host, click the `+` sign. When you do, you’ll be prompted for the details of that host.



### Alias

This is your alias for the host. Use this for easy identification in the lists of hosts. It does not necessarily have to match the hostname or IP address of the host.

### Hostname

In this field, please enter the hostname or IP address of the remote host.

### Port

In most cases this will be `22`, the default SSH port. If the host requires a different port number (`1`-`65535`) please enter it here.

### User

This is the username to connect with on the remote host.

### Password

If using password-based authentication, enter the password here. If you leave this blank and you don’t have a key for this host you will be prompted for the password each time you connect. If you choose to save a password, it is stored securely in the iOS Secure Enclave.

### Keys

To use public key encryption, select your key in this box. By default, the key named `id_rsa` will be used.

### SSH Config

This is very useful for parameters that are not found in the UI, like opening tunnels with LocalForward or forwarding the agent with ForwardAgent. Note that this configuration supersedes your .ssh/config file. For a full list of parameters, check out the [ssh config manual](https://linux.die.net/man/5/ssh_config).

### Mosh Parameters

If you wish to use Mosh, you will have to supply additional parameters.

#### Server

The route for the `mosh-server` command on the destination server. In most cases this will be `/usr/bin/mosh-server` but on some remote systems, like macOS, the binary may be located in `/opt/bin/mosh-server`. You can check where is it located on the server using the `which` command as shown below,

```bash
which mosh-server
```

#### Port

If you need to specify a UDP port for Mosh, please enter it here.

#### Prediction

Define Mosh's predictive model of the server's behavior. `Adaptive` will show predictions (as underscored characters) on slower links, and can also be `Always` or `Never` 

### Files.app

Adding a Location will make it available inside the Files.app. Check our [Files.app documentation](/advanced/files-app).

## Changing or Deleting Host

If you wish to change a host, tap on it in the hosts lists. Alternatively, to delete a host slide to remove it.



## Using Hosts

Once you have saved a host, you use connect to it through the given alias:

```bash
mosh mbp
```

Command line parameters always have preference over configuration. You can redefine a parameter by specifying it on the command line. For example, to use a different user (in this case, `root`), specify:

```bash
mosh root@mbp
```

---

## File: src/pages/basics/meta.json

{
  "hosts": "Hosts",
  "ssh-keys": "SSH Keys",
  "notifications": "Notifications",
  "commands": "Commands",
  "snips": "Snips",
  "customize": "Customize",
  "tips-and-tricks": "Tips & Tricks"
}

---

## File: src/pages/basics/notifications.md

# Notifications

Have you ever glanced at your terminal multiple times to know whether your script has finished? Blink has your back here. Use terminal notifications to monitor the status of long running processes or to just know when something has finished. Level up your mobile shell experience with this feature.

All of the available options can be configured from the settings pane, open it by using the `config` command or pressing `CMD + ,`. These can be configured as granularly as you want with the following options:

* **Play Sound on active shell**: Plays an audible beep every time a `BEL` character is received.
* **Notification on background shell**: Display an alert when a `BEL` is received if the terminal is in the background or out of focus.
* **Use haptic feedback**: Only available on iPhones, vibrates the device when a `BEL` character is received.
* **'Notify' notifications**: Blink supports standard OSC sequences & iTerm2 notifications. Be notified whenever one of these sequences is received.

There are some examples in the settings you can copy and paste on a session to get you started.

## Bell notifications

How can you use this feature to improve your shell experience? Let's say you have a long test suite or program you have to execute. Wouldn't you want to be notified when either of those finishes? By simply printing out the `BEL` character at the line you want to be notified it's good to go. One simple example you can try is the following.

```bash
echo "Waiting to finish"; sleep 2; echo -n "Done!\a"
```

Once this `BEL` character is received you will receive a notification on your device.



You can also trigger this beeping sound by also sending a `BEL` character using control-G (`^G`) just to try it out.

## OSC Sequences

If you want to get this to the next level and craft more complex notifications let's dive into OSC sequences.

Blink shell includes support for Operating System Command (OSC) escape sequences. These are typically initiated with `ESC + ]` (`\033]`), delimited by `;` and terminated with a [`BEL`](https://en.wikipedia.org/wiki/Bell_character) (`\07`) character. Whenever a text containing these parameters is printed out it will trigger a notification and can be displayed on your device. 


These OSC sequences can be customized using different [arguments](https://chromium.googlesource.com/apps/libapps/+/a5fb83c190aa9d74f4a9bca233dac6be2664e9e9/hterm/doc/ControlSequences.md#OSC). We're gonna look into two to display rich notifications.

The first argument for these OSC sequences, `9`, is an iTerm2 Growl notification. This displays a given message and the formatting is as follows,

```bash
echo -e "\033]9;Text to show\a"
```



The last argument is a good option to display the text you like. It can even be some result after the execution of a script of your choosing. 

Another OSC sequence `777`, supports the `notify` argument and can display both a title and body. This resembles a system notification you would have received on another app. Try and create one of your own using the next example.

```bash
echo -e "\033]777;notify;Title;Body of the notification\a"
```



## Considerations

Bear in mind that **some sequences are not supported in Mosh**.

When Blink is sent to the background the system can kill the remote connection after some time. This is done by the system depending on different conditions. To avoid this and persist the SSH connection and receive these notifications after a while, use the [`geo` command](https://blink.sh/docs/advanced/advanced-ssh#persistent-ssh-connections-with-blink). It bypasses the system's background resources and leaves you with a better notification integration experience. Not doing this doesn't guarantee your session will stay up as long as necessary.

---

## File: src/pages/basics/snips.md

# Snips

[](https://xkcd.com/1168)

Finding the perfect command incantation in endless internet searches? Tricky. Finding it again weeks after in your history? Frustrating. That we all suffer this for the same commands? Insane! That your whole team has to go through this endless loop? A big time waste.

Snips can act as sophisticated aliases to expedite workflows, tackle complex commands, and efficiently retrieve them later. Snips can also store important text snippets such as environment variables and secrets, so you don't have to context switch looking for them. 

Snips are simple and text-based, with no complex XML or YAML structures. This simplicity ensures they are easy and efficient to maintain and distribute on multiple platforms, enabling very cool scenarios. 

We organized snips into Indexes. Your Index is unique to you and your devices. Blink includes a default Index [maintained by the Community](https://github.com/blinksh/snippets.git) for more general dunctionality. We plan to add other Indexes focused on optimizing your usage of familiar CLI tools. And in the future, within your team, Indexes may become a way to share workflows or playbooks to get to work at speed.

As snips evolve, they will become a fundamental component of future Blink functionality. Let's dive in!

## How to use snips

To open the snips prompt, use  `CMD`+`<` or select Snips through the contextual menu (double tap `⌘` in the software keyboard or Home Bar).

Start typing `ping`, and you will see a list of snips as you type. The default Index provides common actions for Blink usage and remote servers. Select the first snip for the ping command.


Snips may contain template tags to fill out before executing. Fill this one out with *www.google.com*. Once Completed (`tab`), press Send (`CMD`+`ENTER`).


The content of a snip may span into multiple lines. When sending Command Line snips, at the moment the only supported type, Blink will concatenate the lines with a semicolon. However, you can control this behavior by pressing the ➤ symbol. Other options include: sending the content in a Raw format;  enclosing it within a Bash execution block; enclose in a Begin / End block for the Fish shell. These options provide versatility and allow you to tailor the snip behavior to suit your specific needs.


A snip name has **folder** and **action** components. Folders help organize snips in the Index; the action usually describes what will happen. You can browse all the folders inside the default Index (repo).

We designed the snips prompt to be fast and accurate when you need it. The first word will do a fuzzy search on names and quickly surface matches. For example, search for `bk` to find all the Blink-specific commands. 


Every word after that will perform a search inside the content of the displayed snips, which is useful if you are searching for a specific flag or text. For example, type `curl Content-Type`.


### Special Shortcuts

We built-in some shortcuts to speed things up and empower special scenarios:

- With an empty prompt, pressing enter will take you to Scratch Mode. Perfect for when you copy a command in a tutorial that may need some tweaking before sending.
- You can directly send to the terminal as-is from the prompt by using `CMD`+`ENTER`. Or you can copy to the clipboard by using `CMD`+`SHIFT`+`C`. These are useful if you don't need to fill out any template, like an alias.
- Similarly, from the editor, you can use `CMD`+`ENTER` to directly send the snip.
- Snips can work on Blink Code too! Useful for coding snippets you want to keep around or terminal actions.

## How to create a snip

When your search does not match any snip at the prompt, a button will automatically appear to create one.


Naming your snip is important so you can surface them quickly. We have a few [(WIP) Guidelines](https://github.com/blinksh/snippets.git) from what we learnt creating the default Index. Do not hesitate to send us your feedback.

A snip can also contain template tags to fill out using the `${tag_name}` notation. You can use the same tag name multiple times and it will be substituted in all occurrences at the same time. We have a few ([(WIP) Guidelines](https://github.com/blinksh/snippets.git) for template tags as well.

A snip may span multiple lines. Beware that at the moment, Blink only supports snips for the command line. Multiple line rules on shell scripts apply to snips. Make sure to use a `\` if you wish to create a new line that you do not wish to send separately.

After you finish, click on the `Save` button. Blink saves your snip in your Index under the specified folder and name. From then on, you can use it from the prompt.

Your local Index resides in the `Documents/snips` folder. Local snips always shadow other locations, so your local snips using the same name can customize an existing action to your liking. Ie, you can add extra flags to a command like ping.

### Editing, Renaming and Deleting snips
A snip's content can be modified and its name changed after creation. To do so, load the snip and modify the content. Press the down arrow next to the name for editing options like Save, Rename or Delete. When you save a Snip from the default Index, it will be saved in your default location, shadowing the original. If you want to have both accessible, use Rename.

---

## File: src/pages/basics/ssh-keys.md

import { Callout } from 'nextra-theme-blinkshell'

# Using SSH Keys with Blink Shell for iOS

## SSH Keys

SSH Keys are small text files meant to be exchanged in lieu of passwords for verifying access to a remote server. A SSH key consists of two parts: a public and a private key. The public key is what resides on the remote server and the private key is stored on your local device. The public key is not a secret but the private key should never be shared with anyone nor uploaded to any untrusted location.

Using SSH keys is more secure than passwords as they are more difficult to crack compared to typical passwords. For example, using standard computing power it may take over a million years to crack an SSH key, but a standard password will take far less time to compromise. Additionally, SSH keys are more convenient as you don’t have to type your password in each time you want to connect to a remote server.

## Using SSH Keys in Blink

Before you can use SSH keys you must generate or import a key pair. In this article we will discuss generating a key pair. To get started, run the `config` command in Blink Shell to access the configuration pane.

Click on the `Keys` button to enter the SSH keys menu.



The default keys are always named `id_xxxx` like `id_ecdsa` or `id_ed25519`, and these will be the keys used first to authenticate. You can have multiple SSH keys to connect to multiple SSH servers. To create a key, click the `+` icon at the top and you will be presented with an Add Key Drop-Down. Go ahead with `Generate New` and the New Key dialog as shown below:



Give your key a descriptive name of your choosing. As a suggestion, if you are going to generate a specific key pair for access to a specific server, we would recommend naming the key the hostname of that server so that's easy to remember in the future.

By default, Blink Shell suggests RSA keys which have been the standard for years. Nowadays other types of keys based on other mathematical problems like elliptic curves are becoming a trend. If your server supports it, you can create an ECDSA or Ed25519 key. For RSA keys, a 2048 bit key is probably large enough, but you can even choose a 4096 bit key for extra security if you desire.

You may have noticed we do not provide the option for a passphrase anymore. Blink stores your private key on the iOS Keychain, and its contents are encrypted by the Secure Enclave itself. We think passphrases made sense when the contents of your computer could be easily read by any other apps, but that's not the case anymore. If you want extra security, you can also protect the whole Blink app through FaceID. Hence, we have deemed the extra passphrase redundant.

<Callout>
PRO TIP: What is the difference between *Generate New* and *Generate SE Key*? Secure Enclave keys or SE Keys are a special type of key with extra security properties, similar to Hardware based keys. While Blink is able to generate and store keys securely, SE Keys are generated by the Secure Enclave itself, and they cannot be extracted or read by any app or person, what prevents stealing. Keys can only be used to perform signatures by the Blink app.
</Callout>

### SSH Certificates

As an additional measure of security and control, specially in teams, Blink Shell supports adding SSH Certificates to your public key. The way SSH Certificates work is not much different than the way familiar certificates and chains of trust on the web work. Blink can import a certificate but it cannot deal with creating a Certificate Authority and signing itself. Please refer to this great article on [SSH Certificates](https://goteleport.com/blog/how-to-ssh-properly/).

## Adding a Public Key to a Remote Host

The Blink command `ssh-copy-id` command can be used to copy the public key to a remote host. This will effectively install the key for use in your connection to that server. The syntax of the command is:

```bash
ssh-copy-id identity_file user@host
```

The `identity_file` argument is the name of your SSH key pair. The `user` is the remote username, and the `host` is the remote hostname. You may also specify an IP address instead of a hostname.

## Establishing a Connection Using SSH Keys

There are two different ways to establish a connection to a remote server - via SSH or via Mosh. SSH will work in all cases, but if Mosh is available it is preferred for mobile devices or internet/network connections that may encounter high latency or frequent disconnects.

To connect via SSH:

```bash
ssh user@1.2.3.4
```

In this example, an SSH connection is established with the username user to the remote IP `1.2.3.4`. You may also specify a hostname instead of an IP address. Since no key was specified, the default key `id_rsa` will be used.

You can add pre-defined host keys in the [Hosts section](/basics/hosts#Keys) of the application. 

Sometimes it is convenient to manually enforce a key to be used. In the below example, the key `your_key` is used to connect to the pre-defined host `myhost`. 

```bash
ssh -i your_key myhost
```

To connect with Mosh, the syntax is mostly the same:

```bash
mosh -I your_key host
```

In this example, `your_key` is the SSH key to use, and `host` is the host entry to use in the connection.

---

## File: src/pages/basics/tips-and-tricks.md

# Tips and Tricks

## Basics 

### Serving development website over HTTPS

Fastest way of using HTTPS on remote machines for development is with the Caddy web server. First install it as an executable, but not service, then create Caddyfile with reverse_proxy line like this:

```json
example.com {
  reverse_proxy 127.0.0.1:1313
}
```

Or start Caddy directly in reverse-proxy mode from CLI:

```bash
sudo caddy reverse-proxy --from example.com --to 0.0.0.0:1313
```

### Starting TMUX/Screen on session start

Adding startup commands is as easy as going to Host settings, scrolling to bottom and inserting command we want to use:

```shell
tmux a -t session_name
screen -rd session_name
```
Or anything other that we want to run when starting a new session. It also can be run from Blink command line:
```shell
mosh host -- tmux a -t session_name
mosh host -- screen -rd session_name
```

### SSH port forwarding from remote machine to iPad

Forwards connections from a port on a local system to a port on a remote host:

```bash
ssh -L 3000:localhost:3000 ssh-host
```
### Blink: Using screen corners

Taping three fingers on the screen will bring a Blink menu in which you can set the Cover, Fill, and Fit setting, adapting Blink to different screens and devices.

- Cover: Edge to Edge
- Fill: Space at the Top and Bottom
- Fit: 5 points on all sides



### External Display: Apple TV

You can use Apple TV as a second monitor, just start screen share on Apple TV and Blink will use it as second monitor, not just mirroring. This is really cool if you are doing a presentation, or if you are on the couch with your phone and want to have a bigger display!

### External Display: Split View

For the external display to work, Blink needs to be an active window on the iPad. A very cool way to do this is to use Split View on the iPad, giving Blink ½ or ¼ of the screen, while the rest can be taken by Safari or anything else you need!

### Display: What is Blink Window? 

From iPad OS 13, we have multiple windows support inside Blink, and each window can have infinite tabs. 


You can also move tabs between the iPad window and External Display window with `⇧ Shift + ⌘ Cmd + O` or change focus to the other window using `⌘ Cmd + O`.

### Keyboard: Separate Keys

By switching off the "Same for both sides" option in Config > Keyboard > ⌥ Option you can use one key as a `Meta` and the second as a normal `⌥ Option/Alt`. It's particularly helpful for users that use languages containing diacritic letters.

## Advanced

### Inline Images

Blink supports displaying images over SSH when using [iTerm2 imgcat](https://iterm2.com/utilities/imgcat). Put it in local .bin folder ($HOME/.bin or any other in your %PATH) and use it as this:

```bash
imgcat image.png
```

**NOTE: This does not work in terminal multiplexers (TMUX, GNU Screen) or inside Mosh.**

Alternative that works inside every environment, but needs Rust installed is VIU. Install it using Cargo:

```bash
cargo install viu
```
And use:

```bash
viu image.png/animation.gif
```
More information: [VIU GitHub Repository](https://github.com/atanunq/viu)

### Emacs: Custom Presses

Using the Config > Keyboard > Custom Presses settings you can add new shortcuts. For instance, sending `ctrl-space` when hitting `ctrl-space`, as opposed to bringing up iPadOS's emoji menu. Now Emacs cut & paste doesn't need to rely on `ALT - x set-mark-command`.

### Emacs: Change ALT to Meta

Change "Press send" to **None** and "As modifier" to **ESC** option in Config > Keyboard > ⌥ Option so you can use it as `Meta`. From now on `⌥ Option/Alt - x` will work as `Meta - x`.

---

## File: src/pages/build-up/code_server.md

# Spin-up your own VS Code Server instance in Build



## References
[The Visual Studio Code Server](https://code.visualstudio.com/blogs/2022/07/07/vscode-server)

## Comments
With Blink Build, you can have your private VS Code Server instance in just seconds, accessible on demand from your iPad or iPhone. Participate in our [discussion](https://github.com/blinksh/blink/discussions/1727) to make the most out of it!

---

## File: src/pages/build-up/go.md

# Build up Go environments

The default Hacker Tools in Blink Build already have everything pre-installed to **start coding in Go** from your iPad or iPhone in no time. In a Blink shell, connect to your Build machine by running:

```bash
blink> build mosh
```

Create and go to the `hello` project folder:

```bash
root ➜ ~ $ mkdir hello
root ➜ ~ $ cd hello
```

Create in VIM*(or your favorite)* editor `main.go`, and add:

```go
package main 

import "fmt" 

func main() { 
    fmt.Println("Hello, World")
}
```

After saving it, run your newly created program:

```bash
root ➜ hello/ $ go run main.go
```

It will show:

```bash
Hello, World!
```

That was easy, now let’s create a simple web server to serve our “Hello, World!”.

## Creating Go Web Server

Again, open in VIM*(or your favorite)* editor `main.go`, and update with:

```go
package main

import (
    "fmt"
    "net/http"
)
```

Next, we’ll create a Handler which receives all incomming HTTP connections from browsers. And, a listener as the request handler alone can not accept any HTTP connections from the outside. An HTTP server has to listen on a port to pass connections on to the request handler.

```go
func main() {
    http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
        fmt.Fprintf(w, "Hello, World!", r.URL.Path)
    })

    http.ListenAndServe(":8080", nil)
}
```

Run again with:

```bash
root ➜ hello/ $ go run main.go
```

### Opening Ports

Blink Build can transparently expose the ports on the remote Hacker Tools container inside your local device. While the go server is running, open a new Blink shell. In this case, we want to access the go server running on port 8080, in our localhost on port 8081:

```bash
blink> build ports add htools 8080 8081
```

Now you can access your project from http://localhost:8081!

> 👍 Blink Build exposes ports securely over a Wireguard interface.

## Comments

Doing Go in Build is no different than any other machine, so you can use online tutorials and feel comfortable doing so, even if you're just starting out.

This was a quick start but If you have additional tips or to learn more about how to code in Go from your iOS device, participate in our [discussion](https://github.com/blinksh/blink/discussions/1724).

---

## File: src/pages/build-up/meta.json

{
    "code_server": "VS Code Server",
    "go": "Go",
    "nextjs": "Next.js",
    "python_flask": "Python + Flask",
    "rails": "Ruby on Rails",
    "rust": "Rust"
}

---

## File: src/pages/build-up/nextjs.md

# Starting your Next.js project

The pre-installed Hacker Tools in Build come with a Node runtime, so it is a great option to get started:

```bash
blink> build mosh 
```

Now let’s create an example Next.js project:

```bash
root ➜ ~ $ yarn create-next-app@latest
```

Go to your project's folder, by default `my-app`, and run a development server:

```bash
root ➜ ~ $ cd my-app
root ➜ ~ $ yarn dev
```

### Opening Ports

Blink Build can transparently expose the ports on the remote container inside your local device. In this case, we want to access the node server running on port 3000, in our localhost on port 3001:

```bash
blink> build ports add htools 3000 3001
```

Visit http://localhost:3001 and view your project alive!

> 👍 Blink Build exposes ports securely over a Wireguard interface. To open the ports on your machine to the Internet, check out []()

## Comments
To learn more about using Next.js in Blink Build, participate in our [discussion]().

---

## File: src/pages/build-up/python_flask.md

#  Build up Python + Flask projets

You can use **Blink Build** to run your Flask project in an **isolated development environment**, that you can easily launch from your iPhone or iPad. Python 3 is supported in the default Hacker Tools container, so we can get started in no time:

```bash
blink> build mosh
```

Create and go to the `hello` project folder:

```bash
root ➜ ~ $ mkdir hello
root ➜ ~ $ cd hello
```

Create and activate a virtual environment:

```bash
root ➜ ~/hello $ python -m venv venv
root ➜ ~/hello $ source venv/bin/activate
```

Last step is installing Flask itself:

```bash
root ➜ ~/hello $ pip install flask
```

## Developing

Create in VIM*(or your favorite)* editor `app.py`, and add:

```python
from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "<p>Hello, World!</p>"
```

Now run your development server:

```bash
flask run --host=0.0.0.0
```

We use host 0.0.0.0 so the server is exposed to the Build container, but not to the outside world.

### Opening Ports

Blink Build can transparently expose the ports on the remote container inside your local device. In this case, we want to access the Flask server running on port 5000, in our localhost on port 5001:

```bash
build ports add htools 5000 5001
```

Now you can access your project from http://localhost:5001!

> 👍 Blink Build exposes ports securely over a Wireguard interface.

## Comments

This was a quick start but if you want to learn more tips or to participate with other iOS pythonistas, join our [discussion](https://github.com/blinksh/blink/discussions/1725).

---

## File: src/pages/build-up/rails.md

# Build up Ruby on Rails

This quick-start guide demonstrates how to use **Blink Build** to set up and **start a Ruby on Rails project** to work on from your iPad or iPhone. Lets start by connecting to our Build machie:

```bash
blink> build mosh
```

The Hacker Tools container started by Blink Build has Ruby and tools like Bundler out of the box. To install Rails, we are going to configure the default location for Gems in our Cloud Disk, so it is saved when our machine is automatically shutdown. To do so, edit `.bashrc:`

```bash
# Set installation directory in $HOME
export GEM_HOME=$HOME/.local/gems
# Add Gem binaries to path
PATH="$HOME/.local/gems/bin:$PATH"
```

We are now ready to install Rails:

```bash
gem install rails
```

Now let’s create a new Rails project:

```bash
rails new hello
```

Go to `hello` folder:

```bash
cd hello
```

And run:

```bash
rails server -b 0.0.0.0
```

We use host 0.0.0.0 so the server is exposed to the Build container, but not to the outside world.

### Opening Ports

Blink Build can transparently expose the ports on the remote container inside your local device. In this case, we want to access the Rails server running on port 3000, in our localhost on port 3001:

```bash
build ports add htools 3000 3001
```

Now you can access your project from http://localhost:3001!

> 👍 Blink Build exposes ports securely over a Wireguard interface.

### Dependencies

Hacker Tools comes with bundler out of the box, so to add dependencies to your project, edit your Gemfile as you need them:

```bash
gem 'nokogiri'
gem 'geokit'
```

After adding a dependency, if it is not yet installed, install it:

```bash
bundle install
```

## Comments

That’s it! You just created a very basic *”Hello, World!”* application using Ruby on Rails and **Blink Build**. Using Build for Ruby is no different than any machine, so you can use online tutorials and feel comfortable doing so, even if you're just starting out.

To learn more or to join others and improve Ruby development on iOS, join us in our [Discussion](https://github.com/blinksh/blink/discussions/1733).

---

## File: src/pages/build-up/rust.md

# Build up Rust environments

Rust is supported in the pre-installed Hacker Tools, including additional tools like lints and analyzers for full integration in code editors. To get started writing Rust in your iPad or iPhone, run in a Blink shell:

```bash
build mosh htools
```

Create a new template project using `Cargo`:

```bash
cargo new hello-rust
```

Go to `hello` folder:

```bash
cd hello
```

And run:

```bash
cargo run
```

Now you should see:

```bash
Compiling hello v0.1.0 (/root/hello)
    Finished dev [unoptimized + debuginfo] target(s) in 2.88s
     Running `target/debug/hello`
Hello, world!
```

## Developing

Open in Helix*(or your favorite)* editor `Cargo.toml`, and add under `[dependencies]`:

```bash
[dependencies]
ferris-says = "0.2"
```

Then edit `src/main.rs` by replacing its content with:

```rust
use ferris_says::say;
use std::io::{ stdout, BufWriter };

fn main() {
    let out = b"Hello fellow Rustaceans!";
    let width = 24;

    let mut writer = BufWriter::new(stdout());
    say(out, width, &mut writer).unwrap();
}
```

Save, and run your modified application:

```bash
cargo run
```

It should show:

```bash
----------------------------
| Hello fellow Rustaceans! |
----------------------------
              \
               \
                 _~^~^~_
             \) /  o o  \ (/
               '_   -   _'
               / '-----' \
```

### Configuration

Cargo can be configured locally by modifying the `$HOME/cargo.toml` file. By default, Rust installs dependencies in the `.target` directory of your project. However, for larger projects with many dependencies, this may fill up your Cloud Disk. To avoid this issue, it's recommended to set the `target-dir` to `/tmp` instead. This will allow the directory to grow unbounded and reset with the machine.

```rust
[build]
target-dir = /tmp
```

## Comments

Using Rust in Build is no different than your local machine, so you can take it from here with online tutorials and feel comfortable doing so, even if you're just starting out.

If you have additional tips or to learn more about how to code Rust from your iOS device, participate in our [discussion](https://github.com/blinksh/blink/discussions/1726).

---

## File: src/pages/cloud-providers/aws.md

# Connecting to your AWS EC2 Instance with Blink

## Introduction

We could make a convincing argument that Amazon popularised, if not invented, the cloud computing movement. By offering servers, storage and other computing services, priced by the hour and accessible via an API, Amazon started a new phase in Internet computing. In just fifteen years, Amazon has gone from ma pie-in-the-sky idea by visionaries at the company to a large public utility that powers a substantial portion of the Internet.

[EC2](https://aws.amazon.com/ec2/), or **E**lastic **C**ompute **C**loud, is the virtual server offering of AWS. Customers can launch a wide variety of Linux and Windows instances with EC2, each running a full copy of the operating system backed by Amazon's highly reliable infrastructure. EC2 instances operate much like regular servers, except resources like CPU and memory can be changed with a simple reboot. Disks for the instances are powered by [EBS](https://aws.amazon.com/ebs/?ebs-whats-new.sort-by=item.additionalFields.postDateTime&ebs-whats-new.sort-order=desc) (**E**lastic **B**lock **S**torage), a technology that allows easy disk management. Volumes can be resized and scaled with a click of the mouse.

Let's guide you through the process of launching a Linux EC2 instance in the AWS cloud and connecting to it with Blink.

## Creating an Instance

Sign in to your AWS account, then check in the top right corner on the menu bar between your account's name and support to ensure you're in the right datacenter region. You're free to use any datacenter in the world, but it's best to select the location that's closest to your customers or you for reduced latency.



Once you've selected the most appropriate region, click on the Services menu at the top, then pick EC2 under Compute to bring up the EC2 dashboard. You might have to type EC2 in the search box for the link to be visible.



Click on instances under the Instances group on the left-hand menu to see a full list of your instances. On a new account, you won't find any. Click Launch Instance to start with the process.



Then select your [AMI](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) (Amazon Machine Image) which is simply a disk image that contains an operating system. In the Quick Start section, you'll find a list of common available systems, like RedHat Enterprise Linux, SUSE Linux, Amazon Linux, Microsoft Windows Server and Ubuntu. Since we're connecting to a Linux Server, let's choose Ubuntu.



On the left pane select Instance Types under the Instances menu. You will be shown a complete list of all of the available machines you can pick from. For testing and development purposes, the [t2](https://aws.amazon.com/ec2/instance-types/t2/) and [t3](https://aws.amazon.com/ec2/instance-types/t3/) are generally adequate. Once you've made your selection click next to Configure Instance Details on the bottom right part of the screen. The defaults on this page are likely fine, but you now have the opportunity to make changes to your default configuration. When finished click next to bring Add Storage menu.



Now it's time to pick the size, in gigabytes, of the root drive for your instance. For testing purposes the default size, usually 8 GiB, is fine. You can resize later if needed. Then click next, Tags. If you wish to label this instante for a particular project or customer, you can add a name/value pair calle da tag. It's recommended to create a tag called `Name` and give it the value of the intended hostname. Once you've finished click next: Configure Security Group.

If this is a new account or you don't have an existing infrastructure at AWS, you will be prompted to create a new security group. Assign it a meaningful name, then add any open ports you will need. At a minimum you'll need SSH (port `22`) open to your IP. Alternatively, if you want to use Mosh you'll need to allow UDP traffic on ports `60000` to `61000`.



To open a port, select the type of port (i.e. SSH, HTTP, HTTPS...) or if none matches pick a custom TCP or UDP port and add the number of range of ports in the Port Range box. The destination can be set to anywhere if you wish the port to be open to all IP addresses, or set to a custom IP or My IP, a shortcut provided to automatically fill in your current IP address. Note that IP addresses must be entered in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) format (i.e. `1.2.3.4/32`) for a specific IP, and `1.2.3.0/24` for a Class C range). Once you've whitelisted any ports and IP addresses, click Review and Launch.

You'll now see a detailed list confirming all of your selected options for the new instance. If everything's okay click Launch. After that, you can generate a new public/private key pair or choose an existing pair previously imported into AWS. If you create a new one you'll be prompted to save the private key file. You must have this file to connect to your instance, so you'll want to keep it safe. We will explore how to import an Amazon generated private key inside Blink.

The instance will launch once you confirm the SSH key. Within minutes you'll be able to use your new EC2 instance.

## Managing log in with keys

We recommend using a public/private key pair to log into any server as it's more secure than a traditional password. To import a key inside AWS to use later on in the process log into your account and click on Key Pairs under Network & Security in the left pane of your management console.



In the menu that's shown enter a name for the key pair and then paste the contents of the key you want to import. You can use any key created inside Blink Shell. To copy the contents of the public key open Settings by tapping `Cmd - ,` or writing `config` in the console. Then select Keys and choose or create the key you'll be importing. Then copy the public key's content and pasting it into the AWS's field. After this you will be able to log into your instance using a key pair from Blink Shell.

Alternatively, you can import an Amazon Private Key created from the dashboard. Importing keys into Blink Shell is as easy at it gets. Open the settings panel by either typing `config` in the shell or by pressing `Cmd + ,` if you have a keyboard attached. Select the Keys menu and press add (`+`) to import it using the assistant using the option that best suits you. For example you can copy it to your clipboard and then pase it into the assistant.

Remember that if you name your key a non-default name, `id_rsa`, you'll have to add the `-i <keyname>` flag to the SSH command.



## Accessing Your Instance

Click on Instances under the Instances group on the left-hand side menu, then select the instance you wish yo connect to with Blink. Right-click on the instance, then click Connect. The resulting page will show the SSH commands to use. If your key has already been added to Blink,  you can use the same SSH connection command to connect, like this:



```bash
ssh ubuntu@IP_ADDRESS
```

In the above example replace IP with the address of your EC2 instance. If you choose an Amazon Linux AMI, you'll want to change the user `ubuntu` with `ec2-user`.

## Conclusion

AWS powers a large portion of the Internet, so launching an EC2 instance inside Amazon's powerful cloud puts your server in good company with leading web brands. Blink's flexible command-line tools, including SSH and mosh, make managing your Amazon cloud server a breeze.

---

## File: src/pages/cloud-providers/do.md

# Connecting to your Digital Ocean Droplet with Blink Shell

## Introduction

[Digital Ocean](https://www.digitalocean.com) is a prominent cloud service provider that offers an inexpensive yet performant cloud server solutions. While Amazon Web Services focuses on a wide array of smaller IT components that can work together to form a virtual infrastructure, Digital Ocean takes a more traditional approach.

Droplets are Digital Ocean's name for servers. They have fixed disk space, bandwidth and networking resources. This allows for a more straightforward onboarding experience. Unlike traditional providers, services are billed by the minute, creating a hybrid cloud solution that works well for many production configurations, including testing and development environments.

Let's take a deep dive under and see how to launch a Droplet and connect to it using Blink.

## Creating a Droplet

Sign in to your Digital Ocean account and then click *Create* at the top right corner of the page and finally pick Droplet. You can also create a Droplet from the Droplets page found on the left-hand side menu. Pick your desired Linux distribution, version and server plan. Don't worry too much about the Droplet's size as you can resize it afterwards if your needs change.




The next option to pick is the datacenter location. By selecting the closest location to you or where your final client will be you will get overall lower latencies. This helps improve the resulting user experience you're gonna deliver. Next, you're given the opportunity to select additional networking options, then you'll be prompted for credentials. You can click *New SSH key* and then add your public key so you can easily connect to your Droplet via SSH or choose password authentication. Please be aware that password authentication method is less secure.

In just a few minutes, your Droplet will become part of Digital Ocean's vas sea of servers - ready to go to work for you!

## Accessing your Droplet

Click on the *Droplets* item in the left-hand side menu to see a list of your running servers. Copy the IP address from the server and either enter it into a pre-defined host entry in Blink or use SSH on the Blink Shell to connect.

```bash
ssh root@IP_ADDRESS
```

Replacing in the previous example `IP_ADDRESS` with the IP address of your droplet.

## How to Configure your Droplet

Digital Ocean provides a wide variety of elements to customize your droplet from. Not only you can choose from several already provided distributions but you can use your custom images and explore the marketplace for Applications that suit your needs.

If you want to use Mosh, and get the most out of Blink, you can follow this [tutorial](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-mosh-on-a-vps) by Digital Ocean that guides you through the process.

Under your Droplet's configuration you can start by activating IPv6 support if that's what you need, resize your CPU, disk or RAM for whatever your needs are.

As you can see there are multiple options available and prices that suit your needs that Digital Ocean's servers can help you achieve what you need.

## Conclusion

From production servers behind load balancers to test and development servers, Digital Ocean's Droplets have you covered. Pair your Droplet with Mosh and have an always-on Linux server at your command - reachable from any device from anywhere with Internet access.

In future articles, we'll explain how to set up a development environment, install VS Code remote extensions or even Jupyter Notebooks.

---

## File: src/pages/cloud-providers/hetzner.md

# Renting a VM/server from Hetzner for use with Blink

## Introduction

[Hetzner](https://hetzner.cloud) is a cloud provider from Germany offering hosting services from Germany and Finland. It is cheaper than DigitalOcean and less confusing than AWS. It also has direct connections to FICIX (Finland's Internet Exchange Point).

## Creating a VPS on Hetzner

First, you have to sign up. Go to [hetzner.com](https://hetzner.com), click Login in the top right corner and select `Cloud`.

After signing up, open the default project created for you by Hetzner and click on `Add server`.



You will be presented with a few options for regions and Linux distributions. Select the closest region to you to make sure you have the least latency and pick your preferred distro.



Now you can select a server tier. Don't worry about underestimating or overestimating your needs because you will be able to resize your server at any time.



After that, you will need to generate an SSH key to authenticate with your server. Open Blink and run `config`, select `Keys`, click the plus button and click `Create SSH key`.



And give it a name...



After that, copy the public part of the key and go back to the server creation page...



Then, check the `Backups` box if you want your server to have backups if you mess up sometime in the future, add the SSH key and select it. Give it a cool name and click `Create and Buy Now`.



Hetzner will begin provisioning your server - that shouldn't take more than a few minutes. When your server is created, you will see a notification.



## Connecting to your VPS with Blink

Now that your VPS is created, you can connect to it with Blink. Run `config`, tap `Hosts` and tap the plus button. Fill in your server IP and select the SSH key created above. By default, Hetzner will create a user called `root` on your server.



And finally, you can click save and connect to your server with the `ssh` command.

```bash
ssh [host]
```

---

## File: src/pages/cloud-providers/meta.json

{
  "aws": "Amazon Web Services",
  "do": "Digital Ocean",
  "hetzner": "Hetzner"
}

---

## File: src/pages/integrations/meta.json

{
    "tailscale+mosh": { "title": "Tailscale + Mosh" }
}

---

## File: src/pages/integrations/tailscale+mosh.md

# Tailscale + Mosh

We love Tailscale for its effortless VPN setup and secure remote access via SSH. But SSH has its problems: slow connections cause lag, unstable connections and roaming cause repeated disconnections. These kinds of problems can cause terminal coding on mobile devices to become a nightmare.

That’s where Blink comes in. You can pair Blink with Tailscale and upgrade your connection from SSH to the more stable, more responsive Mosh protocol, letting you code without the delays and hiccups. You can access any machine in your Tailscale network for development, server management, and more, from your mobile devices with optimal performance.

But what if you don't have root access to the Tailscale node to install mosh, or are having trouble navigating the installation process? Don’t worry! Now, Blink can automatically install Mosh for you for a lot of different platforms, no root access necessary.

## Install Tailscale and find your Host information
### Step 1: Install Tailscale on your local network
Follow the instructions for your platform:
- [Install Tailscale for Linux](https://tailscale.com/kb/1031/install-linux/)
- [Install Tailscale for macOS](https://tailscale.com/kb/1016/install-mac/)

### Step 2: Initialize Tailscale SSH on your local network
On the host of your local network, advertise SSH by running `tailscale up --ssh`. For more information, see [Use Tailscale SSH](https://tailscale.com/kb/1193/tailscale-ssh/#advertise-ssh-on-the-host).

### Step 3: Take note of your Hostname or IP address
On your host machine, retrieve the IP or Hostname from the Tailscale app. 
- For Linux users, enter the command `tailscale ip` to return the device's Tailscale IP address.
```
$ tailscale ip
100.126.153.111
fd7a:115c:a1e0:ab12:4843:cd96:627e:9975
```
- For macOS users, open the status bar icon for the Tailscale app and look for the Hostname or the IP listed in the dropdown.
- For more information, checkout the [Tailscale guide](https://tailscale.com/kb/1033/ip-and-dns-addresses/?q=display%20ip%20address#finding-your-tailscale-ip-address).

### Step 4: Install Tailscale on your mobile devices
Install and sign in to Tailscale on your iPad or iPhone. You can find the Tailscale app in the App Store. Make sure you log in with the same account as on your server, so the two devices can see each other. For more information, see [the Tailscale website](https://tailscale.com/download/ios).

## Configure Blink
### Step 1: SSH to your Tailscale Node
Remember that Hostname or IP address you got in [Step 3](#step-3-take-note-of-your-hostname-or-ip-address)? Well, now’s the time to use it.
To check that everything is working, let's start with establishing a ssh connection to the Tailscale node.

Open the Blink app on your device, and in the Blink Shell run the command `ssh username@<hostname>` where `username` is your Tailscale user name, and `hostname` is your Tailscale Hostname or IP address.

Note that no authentication was required, as Tailscale is automatically using your tailnet identity to establish the SSH connection.

### Step 2: Mosh to your Tailscale Node
Now, it is time to upgrade our connection to Mosh. Run the command `mosh --install-static @hostname` where `username` and `hostname` are the same parameters you used before. Blink will automatically request permission to install mosh-server on your host, and set up everything for you.


Going forward after installation, you only need to call `mosh @hostname` as you may be used to.

### Step 3: (Optional) Set up a host within Blink
If you do not want to type `username@hostname` all the time, or you want to access the remote file system of your Tailscale node from the Files.app, you can set up a host within Blink. To do so, follow the steps in [“Create and Access Hosts Using Blink Shell”](/basics/hosts).

## Mosh away
Now that you’ve got Tailscale and Blink working together, you’ve got the power of Mosh to access your VPN anywhere and anytime. You could potentially connect from your home WiFi, drive to the airport, and take a plane to a different country –and stay connected all the way. No dealing with SSH breaking those connections or lagging behind as you type. It’s almost like having your desktop in the palm of your hand.