Skip to content

Add dotfile subcommand and --local install option#1

Merged
molayab merged 12 commits into
mainfrom
feature/dot-files
Apr 25, 2026
Merged

Add dotfile subcommand and --local install option#1
molayab merged 12 commits into
mainfrom
feature/dot-files

Conversation

@molayab
Copy link
Copy Markdown
Owner

@molayab molayab commented Apr 3, 2026

This pull request introduces comprehensive support for managing dotfiles in the agent-manager project, including a new CLI command group, a data model, and several subcommands for dotfile operations. It also updates documentation and makes minor improvements to installation and package configuration.

Dotfile Management Feature:

  • Added a new dotfile CLI command group with subcommands for listing, linking, unlinking, creating, checking status, and toggling privacy of dotfiles (Dotfiles.swift, DotfileList.swift, DotfileLink.swift, DotfileUnlink.swift, DotfileNew.swift, DotfileStatus.swift, DotfilePrivate.swift). [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Implemented the DotfileModel struct to represent and load dotfiles, encapsulating metadata and utility methods for symlink status and file resolution (DotfileModel.swift).
  • Added dotfilesDir as a global and updated helpers to support dotfile paths (FileManager+Helpers.swift).
  • Exposed expandingTilde for path expansion in dotfile linking logic (FileManager+Helpers.swift).

Documentation Updates:

  • Added AGENTS.md with a detailed overview of the project, architecture, command structure, and code conventions.
  • Referenced AGENTS.md from CLAUDE.md.

Build and Installation Improvements:

  • Updated Package.swift to require Swift tools version 6.2 and pin swift-argument-parser to version 1.7.1 for improved reproducibility.
  • Added a --local install option to install.py to mirror the default behavior of quickinstall.py. [1] [2]

CLI Structure and Miscellaneous:

  • Registered the new Dotfiles command group in the main CLI definition (App.swift).
  • Minor code style and helper improvements for consistency and maintainability. (scattered)

These changes collectively provide first-class, flexible management of dotfiles alongside skills and commands in the agent-manager tool.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds first-class dotfile management to agent-manager, expands CLI import capabilities, and updates install/build tooling and documentation to support the new workflows.

Changes:

  • Introduces a new dotfile command group with subcommands (list/link/unlink/new/import/status/private) plus a DotfileModel loader.
  • Adds new import functionality for skills (and improves command import handling for symlinks).
  • Updates repo/git tooling (repo --init/--use, GitRunner.runIn) and installer behavior (install.py --local, version stamping), along with docs and CI tweaks.

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
Sources/AgentManager/Library/Models/DotfileModel.swift New dotfile model (load/resolve/link-status) backing the dotfile CLI.
Sources/AgentManager/Library/GitRunner.swift Adds runIn(directory, ...) to run git commands from arbitrary working dirs.
Sources/AgentManager/Library/FileManager+Helpers.swift Exposes expandingTilde and adds dotfilesDir global path.
Sources/AgentManager/CLI/Skill/Skills.swift Registers new skill import subcommand.
Sources/AgentManager/CLI/Skill/SkillImport.swift New command to copy skills from agent dirs into the repo.
Sources/AgentManager/CLI/Dotfile/DotfileUnlink.swift New command to remove dotfile symlinks (with safety checks).
Sources/AgentManager/CLI/Dotfile/DotfileStatus.swift New command showing dotfile link status.
Sources/AgentManager/CLI/Dotfile/Dotfiles.swift New dotfile command group wiring subcommands.
Sources/AgentManager/CLI/Dotfile/DotfilePrivate.swift New command to toggle dotfile privacy by renaming directories.
Sources/AgentManager/CLI/Dotfile/DotfileNew.swift New command scaffolding a dotfile entry + placeholder file.
Sources/AgentManager/CLI/Dotfile/DotfileList.swift New command listing dotfiles + metadata.
Sources/AgentManager/CLI/Dotfile/DotfileLink.swift New command to create dotfile symlinks at target locations.
Sources/AgentManager/CLI/Dotfile/DotfileImport.swift New command to scan/import common dotfiles from home directory (optional link).
Sources/AgentManager/CLI/Core/Git/Repo.swift Changes repo command to support --init <path> and --use <path>.
Sources/AgentManager/CLI/Command/CommandImport.swift Improves import to handle symlinked command files safely.
Sources/AgentManager/App.swift Registers Dotfiles in the top-level CLI and prints repo path on bare invocation.
quickinstall.sh Removes legacy shell quick installer script.
Package.swift Updates tools version and pins swift-argument-parser.
install.sh Removes legacy shell installer script.
install.py Adds --local install option and stamps build date into version during source builds.
AGENTS.md New repository guidance doc for agents and project conventions.
.gitignore Adds ignore rule for private dotfiles.
.github/workflows/release.yml Switches runner to macos-latest.
.github/workflows/ci.yml Switches CI/lint runner to macos-latest.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Sources/CLIManager/Library/Models/DotfileModel.swift Outdated
Comment thread Sources/CLIManager/CLI/Dotfile/DotfileUnlink.swift
Comment thread Sources/CLIManager/CLI/Dotfile/DotfileLink.swift
Comment thread AGENTS.md Outdated
Comment thread install.py Outdated
Comment thread Sources/CLIManager/CLI/Dotfile/DotfileImport.swift Outdated
Comment thread Sources/CLIManager/Library/Models/DotfileModel.swift
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 34 out of 60 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (2)

quickinstall.py:42

  • GITIGNORE_CONTENT used by the quick installer doesn't include the new private dotfiles pattern, so dotfiles/*.private/ will be committed by default in freshly created repos. Update the template to match the repository .gitignore (include private dotfiles).
    install.py:77
  • --local and --global can both be provided, but the script silently prioritizes --global. Consider making them mutually exclusive (argparse mutually exclusive group) or emitting a clear error when both are set.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread Package.swift
Comment thread Sources/README.md
Comment thread Sources/README.md
@molayab molayab merged commit 86fa0de into main Apr 25, 2026
2 checks passed
@molayab molayab deleted the feature/dot-files branch April 25, 2026 00:52
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.

2 participants