azsh

command module
v0.0.0-...-9d2fc4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2026 License: MIT Imports: 3 Imported by: 0

README

azsh

A lightweight CLI tool to access Azure Cloud Shell directly from your terminal.

Features

  • Azure Authentication - Seamless OAuth2 authentication via device code flow
  • Cloud Shell Access - Connect to Azure Cloud Shell without leaving your terminal
  • Terminal Emulation - Full terminal support with resize handling
  • Token Caching - Automatic token caching for faster subsequent connections

Prerequisites

  • Go (for building)
  • Azure account with Cloud Shell enabled
  • Linux, macOS, or WSL environment

Installation

From Source
go install github.com/ayanrajpoot10/azsh@latest

Usage

azsh

First run will prompt for Azure authentication via device code flow. Subsequent runs will use cached credentials.

How It Works

  1. Authentication - Acquires OAuth2 token using Azure AD device code flow
  2. Settings - Fetches your Cloud Shell preferences (OS type, location)
  3. Provisioning - Creates a Cloud Shell console instance
  4. Terminal Setup - Negotiates WebSocket connection for terminal I/O
  5. Connection - Establishes interactive terminal session with proper TTY handling

Authentication

  • Uses Azure AD OAuth2 with device code flow
  • Tokens are cached in ~/.azsh/token.json
  • Tenant information cached in ~/.azsh/tenant.json
  • Automatic token refresh for subsequent sessions

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL