Skip to content

Add dwell import command — import dotfiles from any GitHub repo - #28

Open
grave0x wants to merge 1 commit into
mainfrom
dwell-import
Open

Add dwell import command — import dotfiles from any GitHub repo#28
grave0x wants to merge 1 commit into
mainfrom
dwell-import

Conversation

@grave0x

@grave0x grave0x commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the dwell import command — clone any dotfiles repo and import its configs into the dwell source directory with correct naming.

Closes #24

Usage

dwell import https://github.com/zepyxunderscore/hyprzepyx.git          # Clone and import
dwell import https://github.com/user/dotfiles.git --dry-run             # Preview only
dwell import https://github.com/user/dotfiles.git --all                 # Overwrite existing
dwell import gh:user/repo --verbose                                     # Verbose import

Auto-detected repo structures

Structure Example repo Detection
Direct config/ dirs garuda-hyprdots hypr/, waybar/, kitty/ at root → dot_config/hypr/
Home-configs dir hyprzepyx home-configs/ with .zshrc → dot_zshrc
Dotfiles subdir Hyprland-Simple-Setup dotfiles/ subdirectory
Home root retrilzzy/dotfiles .zshrc, .bashrc at repo root

Features

  • Flattens doubled directories (hypr/hypr/ → hypr/)
  • Home-relative dotfiles get proper dwell prefixes (.zshrc → dot_zshrc)
  • Skips wallpapers, backgrounds, and media directories
  • Clones with --depth 1 for speed, cleans up after
  • Commits and stages imported files in git

Summary by Sourcery

Add a new CLI command to import dotfiles from a remote GitHub repository into the dwell source directory, auto-detecting common repo layouts and committing the imported files.

New Features:

  • Introduce a dwell import subcommand that clones a specified dotfiles repository and imports its configuration files into the local dwell source tree.
  • Support dry-run mode for previewing which files would be imported without copying them.
  • Allow force-overwriting existing files during import via a dedicated flag.

Enhancements:

  • Automatically detect common dotfiles repository structures (config directories, home-configs, dotfiles subdirectory, home-root files) to map them into dwell paths.
  • Normalize imported paths, including mapping known config directories under dot_config/ and converting home-relative dotfiles (e.g. .zshrc) to dwell-style names.
  • Skip non-config directories such as wallpapers, media, and VCS metadata during import, and clean up the temporary clone after completion.
  • Automatically stage and commit imported files in the dwell git repository with an import summary message.

- dwell import <url>: clone and import dotfiles from arbitrary repos
- Auto-detects repo structure: direct config/, home-configs/, dotfiles/
- Flattens doubled directories (hypr/hypr/ → hypr/)
- Maps .zshrc → dot_zshrc convention
- Supports --dry-run and -v preview
- Handles garuda-hyprdots, hyprzepyx, and similar themed repos
Copilot AI review requested due to automatic review settings July 26, 2026 22:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sourcery-ai

sourcery-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown

🧙 Sourcery is reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Import dotfiles from arbitrary repos (Hyprland/themed dotfiles)

2 participants