> Getting Started
From zero to activated environment in under 5 minutes.
_prerequisites
Ghost-Env works on any Unix-like system. You'll need:
- + curl - For downloading and running the activation script
- + bash or zsh - Your shell (most systems have one)
- + A web browser - For authentication and the dashboard
curl --version && echo "Ready!"Create Your Account
Head to gh-env.sh/auth and create your account. You'll need:
- - A valid email address
- - A username (lowercase, alphanumeric)
- - A strong password (8+ characters)
Create Your First Profile
After logging in, go to your Dashboard and create a new profile. A profile contains:
Environment Variables
Export variables like PATH additions, API keys, or custom settings.
export PROJECT_ENV=dev
Aliases
Shortcuts for frequently used commands.
alias gs='git status'
Functions
Complex shell functions for advanced workflows.
mkdir -p "$1" && cd "$1"
}
Custom Prompt
Style your shell prompt with colors and info.
Don't worry about getting it perfect. You can always edit your profile later from the dashboard.
Activate Your Environment
Open a terminal on any machine and run:
curl -sL gh-env.sh | shThis downloads and runs the Ghost-Env activation script. Here's what happens:
- 1. CLI Installation
The script installs the
gh-envCLI tool to~/.ghostenv/bin/ - 2. Device Code Display
A QR code and a short code (like
XKCD-1337) appear in your terminal. - 3. Browser Authorization
Scan the QR code or visit
gh-env.sh/authand enter the code. - 4. Profile Activation
Once authorized, your profile scripts are downloaded, verified, and applied to your shell.
_device_authorization_flow
Ghost-Env uses a secure device code flow for authentication. This means you never type your password in the terminal.
┌─────────────────────────────────────────────────────┐
│ │
│ Scan QR code or visit the URL to authenticate │
│ │
│ URL: gh-env.sh/auth │
│ Code: XKCD-1337 │
│ │
└─────────────────────────────────────────────────────┘
[👻~] Waiting for authorization...
Option A: QR Code
- 1. Open your phone's camera
- 2. Point at the QR code
- 3. Tap the link that appears
- 4. Log in and approve
Option B: Manual Entry
- 1. Open
gh-env.sh/auth - 2. Click "Device Authorization"
- 3. Enter the code from terminal
- 4. Click "Authorize"
Once authorized, the terminal will automatically continue and activate your environment. Your device is now registered and will appear in your Dashboard under "Devices".
_activation_modes
Ghost-Env offers three activation modes to suit different scenarios:
Normal Mode
curl -sL gh-env.sh | shFull installation with persistent storage. Best for personal machines and servers you control.
- + CLI installed to
~/.ghostenv/ - + Tokens persist between sessions
- + Auto-activation available via shell rc files
Zero-Trace Mode
curl -sL gh-env.sh/0 | shEverything runs from /tmp and is securely deleted on exit. Perfect for shared or untrusted machines.
- + All files stored in temporary directory
- + Device automatically unregistered on exit
- + Secure shredding of sensitive data
Read-Only Mode
curl -sL gh-env.sh/r | shNo files written to disk at all. Everything runs in memory. Ideal for immutable systems.
- + Zero disk writes
- + Tokens stored only in shell variables
- + Works on read-only filesystems