Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04

# use this Dockerfile to install additional tools you might need, e.g.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// The Dev Container format allows you to configure your environment. At the heart of it
// is a Docker image or Dockerfile which controls the tools available in your environment.
//
// See https://aka.ms/devcontainer.json for more information.
{
"name": "Ona",
// Use "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
// instead of the build to use a pre-built image.
"build": {
"context": ".",
"dockerfile": "Dockerfile"
}
// Features add additional features to your environment. See https://containers.dev/features
// Beware: features are not supported on all platforms and may have unintended side-effects.
// "features": {
// "ghcr.io/devcontainers/features/docker-in-docker": {
// "moby": false
// }
// }
}
86 changes: 86 additions & 0 deletions content/docs/en/cli-tui/CLI.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
title: CLI
navigation: CLI
icon: Terminal
---

# PasarGuard CLI

Modern command-line tools for managing PasarGuard with efficiency and style.

---

## CLI - Command-Line Interface

A modern, type-safe command-line interface for managing PasarGuard, built with Typer.

### Features

- 🎯 **Type-safe CLI** with rich output formatting
- 📊 **Beautiful tables and panels** for data visualization
- 🔒 **Secure admin management** with interactive prompts
- 📈 **System status monitoring** and diagnostics
- ⌨️ **Interactive prompts** with confirmations for safety

### Installation

The CLI is included with PasarGuard and can be used directly:

```bash
pasarguard cli --help

# Or from the project root
uv run pasarguard-cli.py --help
```

### Usage

#### General Commands

```bash
# Show version
pasarguard cli version

# Show help
pasarguard cli --help
```

#### Admin Management

```bash
# List all admins
pasarguard cli admins --list

# Create new admin
pasarguard cli admins --create username

# Delete admin
pasarguard cli admins --delete username

# Modify admin (password and sudo status)
pasarguard cli admins --modify username

# Reset admin usage statistics
pasarguard cli admins --reset-usage username
```

#### System Information

```bash
# Show system status
pasarguard cli system
```

### Examples

**Creating a new admin:**
```bash
pasarguard cli admins --create john_admin
# You'll be prompted to enter password and sudo permissions
```

**Listing all admins with formatted output:**
```bash
pasarguard cli admins --list
# Displays a beautiful table with admin details
```
69 changes: 69 additions & 0 deletions content/docs/en/cli-tui/TUI.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: TUI
navigation: TUI
icon: Terminal
---

# PasarGuard TUI

Modern text-based user interface tools for managing PasarGuard with efficiency and style.

---

## TUI - Text User Interface

A modern, interactive command-line interface for managing PasarGuard, built with Textual.

### Features

- 🎯 **Interactive TUI** with mouse and keyboard support
- 📱 **Responsive design** with dark mode support
- ⌨️ **Keyboard shortcuts** for quick navigation
- 🔄 **Real-time updates** and live data refresh
- 📊 **Rich data visualization** with colors and formatting
- 🔒 **Secure admin management** with visual feedback

### Starting the TUI

```bash
pasarguard tui
```

Once launched, you'll see a beautiful interactive interface with navigation panels, data tables, and action buttons.

### Keyboard Shortcuts

#### Global Commands

- `q` - Quit the application
- `?` - Show help and keyboard shortcuts
- `Tab` - Navigate between panels
- `Shift+Tab` - Navigate backwards
- `Escape` - Cancel current action

#### Admin Section

- `c` - Create new admin
- `m` - Modify admin
- `r` - Reset admin usage statistics
- `d` - Delete admin
- `i` - Import admins from environment variables

### Admin Management

The TUI provides a visual interface for all admin operations:

- **Create** - Interactive forms for new admin accounts
- **Modify** - Edit admin passwords and permissions
- **Delete** - Safe deletion with confirmation prompts
- **Reset Usage** - Clear usage statistics for admins
- **Import** - Bulk import admins from environment variables
- **View Details** - Detailed admin information and status

### Navigation Tips

1. Use **arrow keys** or **mouse** to navigate
2. Press **Enter** to select items or confirm actions
3. Use **Tab** to move between input fields
4. Press **Escape** to cancel dialogs
5. Press **?** anytime to see available shortcuts
155 changes: 0 additions & 155 deletions content/docs/en/cli-tui/index.mdx

This file was deleted.

10 changes: 10 additions & 0 deletions content/docs/en/learn/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"title": "Learn",
"description": "Step-by-step guides for advanced configurations",
"pages": [
"ssl-certificate",
"ssl-activation",
"warp"
],
"icon": "BookOpen"
}
Loading