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
45 changes: 45 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy mdBook Documentation

on:
push:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: 'latest'

- name: Build book
run: mdbook build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./book/build

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ $RECYCLE.BIN/
!PULL_REQUEST_TEMPLATE.md
!CHANGELOG.md
!CONTRIBUTING.md
!docs/*
!book/**
book/build/
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,39 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.1] - 2025-11-17

### Added

- **Package Management Commands**: Integrated package management with environment activation
- `uvup add <packages>` - Add packages to active environment (supports `--group`)
- `uvup remove <packages>` - Remove packages from active environment (supports `--group`)
- `uvup lock` - Update lockfile of active environment (supports `--upgrade`)
- `uvup tree` - Display dependency tree of active environment (supports `--depth`)
- All package commands use `uv --project` internally, allowing management from any directory

### Changed

- **Breaking**: Renamed `uvup remove <name>` to `uvup delete <name>` for environment deletion
- This clarifies the distinction between deleting environments vs removing packages
- `remove` is now exclusively for package removal

### Documentation

- Updated README.md with integrated package management examples
- Updated COMMANDS.md with complete package management command reference
- Updated USE_CASES.md replacing all `uv add`/`uv remove` with `uvup` equivalents
- Added design philosophy explanation for command organization

### Technical

- Added `commands/add.rs` for package addition
- Renamed `commands/remove.rs` to `commands/delete.rs` for environment deletion
- Created new `commands/remove.rs` for package removal
- Added `commands/lock.rs` for lockfile management
- Added `commands/tree.rs` for dependency tree display
- Added `NoActiveEnvironment` error type for better error messages

## [0.2.0] - 2025-11-17

### Added
Expand Down Expand Up @@ -133,6 +166,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- clap 4.5 - CLI framework
- dirs 6.0 - Cross-platform directory paths

[0.2.1]: https://github.com/KercyDing/uvup/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/KercyDing/uvup/compare/v0.1.3...v0.2.0
[0.1.3]: https://github.com/KercyDing/uvup/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/KercyDing/uvup/compare/v0.1.1...v0.1.2
Expand Down
199 changes: 36 additions & 163 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# uvup

[![DeepWiki](https://img.shields.io/badge/DeepWiki-blue)](https://deepwiki.com/KercyDing/uvup) [![uv](https://img.shields.io/badge/uv-black?logo=github)](https://github.com/astral-sh/uv)
[![Docs](https://img.shields.io/badge/Docs-blue)](https://kercyding.github.io/uvup/) [![DeepWiki](https://img.shields.io/badge/DeepWiki-orange)](https://deepwiki.com/KercyDing/uvup) [![uv](https://img.shields.io/badge/uv-black?logo=github)](https://github.com/astral-sh/uv)

A conda-like environment manager for [uv](https://github.com/astral-sh/uv).

Expand All @@ -27,198 +27,71 @@ curl -fsSL https://raw.githubusercontent.com/KercyDing/uvup/main/scripts/install
Invoke-RestMethod https://raw.githubusercontent.com/KercyDing/uvup/main/scripts/install.ps1 | Invoke-Expression
```

For detailed installation instructions, manual installation, and developer setup, see [Installation Guide](docs/INSTALL.md).
See the [Installation Guide](https://kercyding.github.io/uvup/installation.html) for more details.

## Uninstallation
## Quick Start

**Linux and macOS:**
```bash
curl -fsSL -O https://raw.githubusercontent.com/KercyDing/uvup/main/scripts/uninstall.sh
chmod +x uninstall.sh
./uninstall.sh
```

**Windows (PowerShell):**
```powershell
Invoke-WebRequest -Uri https://raw.githubusercontent.com/KercyDing/uvup/main/scripts/uninstall.ps1 -OutFile uninstall.ps1
.\uninstall.ps1
```

For detailed uninstallation instructions and manual removal, see [Uninstallation Guide](docs/UNINSTALL.md).

## Planned Features

### v0.2.0 - Completed

- [x] `uvup clone <source> <target>` - Clone environments (1:1 exact copy)
- [x] `uvup new <name> --template <template>` - Create projects from templates
- [x] `uvup sync --template <template>` - Sync current project with template
- [x] Template modification support (--python, --exclude, --include)
- [x] Dry-run preview mode for all template operations
- [x] pyproject.toml-based dependency management
- [x] optional-dependencies support

### Future Versions

- Official template repository with curated project templates
- `uvup template list` - Browse available official templates
- Auto-download templates on first use
- `uvup default <name>` - Set default environment
- Package manager support (Homebrew, Scoop, Winget)

## Usage

### Quick Start

```bash
# Create a new environment
# Create and activate environment
uvup create myproject

# Create with specific Python version
uvup create myproject --python 3.12

# List all environments
uvup list

# Activate an environment
uvup activate myproject

# Install packages (using uv)
uv add numpy pandas
# Add packages
uvup add numpy pandas

# Work with your code
python script.py

# Deactivate
uvup deactivate

# Remove an environment
uvup remove myproject
```

### Environment Cloning
📖 **[Read the full documentation](https://kercyding.github.io/uvup/)** for complete usage guide.

Clone an existing environment to create an exact 1:1 copy:
## Key Features

### Environment Management
```bash
# Clone an environment
uvup clone myproject myproject-backup

# The cloned environment will have identical:
# - Python version
# - All dependencies (from pyproject.toml)
# - Lock file (uv.lock)
uvup create myenv # Create environment
uvup list # List all environments
uvup activate myenv # Activate environment
uvup delete myenv # Delete environment
```

### Template-based Project Creation

Create new projects from template environments with modification support:

### Template System
```bash
# Preview changes before creating
uvup new myapp --template web-template --dry-run

# Create a project from a template
uvup new myapp --template web-template

# Create with custom Python version
uvup new myapp --template web-template --python 3.11

# Create with package filtering
uvup new myapp --template web-template --exclude pytest,black
uvup new myapp --template web-template --include numpy,pandas,requests

# Create in a custom directory
uvup new myapp --template web-template --path ~/projects
```
# Clone existing environment
uvup clone source target

### Template Synchronization

Sync an existing project with a template environment:

```bash
# Preview changes before syncing
uvup sync --template web-template --dry-run
# Create from template with modifications
uvup new myapp --template web-template --exclude dev-tools

# Sync current project with template
cd myproject
uvup sync --template web-template

# Sync with Python version override
uvup sync --template web-template --python 3.11

# Sync with package filtering
uvup sync --template web-template --exclude dev-packages
uvup sync --template web-template --include numpy,pandas
uvup sync --template web-template --dry-run
```

### Command Categories

uvup provides four distinct command categories:

1. **Create** - Create empty environments
```bash
uvup create myenv --python 3.12
```

2. **Clone** - 1:1 exact copy (no modifications)
```bash
uvup clone source-env target-env
```

3. **New** - Create projects from templates (with modifications)
```bash
uvup new myproject --template base-template --exclude pytest
```

4. **Sync** - Update current project from template (with modifications)
```bash
uvup sync --template base-template --python 3.11
```

For complete command reference with all options and examples, see [COMMANDS.md](docs/COMMANDS.md).

## Documentation

### Quick Help

Use the built-in help system for command-specific usage:

### Package Management
```bash
# General help
uvup --help

# Command-specific help
uvup new --help
uvup sync --help
uvup clone --help
# After activation, manage packages from anywhere
uvup add requests numpy pandas
uvup remove pandas
uvup lock --upgrade
uvup tree
```

### Complete Documentation

- **[COMMANDS.md](docs/COMMANDS.md)** - Complete command reference with all options and examples
- **[USE_CASES.md](docs/USE_CASES.md)** - Real-world usage scenarios and workflows
- **[CHANGELOG.md](CHANGELOG.md)** - Version history and release notes

## Scope

uvup focuses on **environment management and template-based workflows**. For package management, use uv directly:
## Documentation

```bash
# Environment management with uvup
uvup create myproject
uvup activate myproject
📖 **[Full Documentation](https://kercyding.github.io/uvup/)** - Complete user guide

# Package management with uv
uv add numpy pandas
uv remove pandas
uv lock
uv sync
```
- [Installation](https://kercyding.github.io/uvup/installation.html) - Detailed setup instructions
- [Quick Start](https://kercyding.github.io/uvup/quick-start.html) - Get started in minutes
- [Command Reference](https://kercyding.github.io/uvup/commands/) - All commands with examples
- [Use Cases](https://kercyding.github.io/uvup/use-cases/) - Real-world workflows
- [Core Concepts](https://kercyding.github.io/uvup/core-concepts.html) - Design philosophy

## IDE Integration

### VSCode

Add to your `settings.json` to find your venv:

**VSCode** - Add to your `settings.json`:
```json
{
"python.venvPath": "~/.uvup"
Expand Down
28 changes: 28 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[book]
title = "uvup Documentation"
authors = ["KercyDing"]
language = "en"
multilingual = false
src = "book/src"
description = "A conda-like environment manager for uv"

[build]
build-dir = "book/build"

[output.html]
default-theme = "light"
preferred-dark-theme = "navy"
git-repository-url = "https://github.com/KercyDing/uvup"
git-repository-icon = "fa-github"
edit-url-template = "https://github.com/KercyDing/uvup/edit/main/{path}"

[output.html.fold]
enable = false

[output.html.search]
enable = true
limit-results = 30
use-boolean-and = true

[output.html.print]
enable = true
Loading