Skip to content

Commit adec2cc

Browse files
ibrahimkteishmbrandonwstephencelis
authored
Fix Antigravity support (#32)
* Fix Antigravity skills path Update the default install path for Antigravity from: ~/.gemini/antigravity/global_skills to: ~/.gemini/antigravity/skills This aligns with the official Antigravity documentation: https://antigravity.google/docs/skills * Add --copy flag for installing skills without symlinks Some AI tools don't support symbolic links for skills. This adds a --copy flag that creates full copies instead of symlinks. Changes: - Add --copy/-c flag to install command - Add copyItem to FileSystem protocol - Implement copyItem in InMemoryFileSystem for tests - Add test for copy installation - Document when to use --copy in README Usage: pfw install --tool <tool> --copy Note: Using --copy duplicates skills for each tool and requires re-running install after updates. * Remove dead code in InMemoryFileSystem.copyItem The copyItem method had code handling files and symlinks as source, but in practice we always copy directories from ~/.pfw/skills/. Removed unreachable code paths for clarity. * Remove symlink copying in copyItem The source directory (~/.pfw/skills/) never contains symlinks, so there's no need to copy them. * Copy only for cursor. * Update readme. * Remove Cursor, add Antigravity * fix test --------- Co-authored-by: Brandon Williams <mbrandonw@hey.com> Co-authored-by: Stephen Celis <stephen@stephencelis.com>
1 parent e08039b commit adec2cc

File tree

5 files changed

+141
-50
lines changed

5 files changed

+141
-50
lines changed

Package.resolved

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/pfw/Dependencies/FileSystem.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ protocol FileSystem: Sendable {
1212
func data(at url: URL) throws -> Data
1313
func createSymbolicLink(at url: URL, withDestinationURL destURL: URL) throws
1414
func moveItem(at srcURL: URL, to dstURL: URL) throws
15+
func copyItem(at srcURL: URL, to dstURL: URL) throws
1516
func contentsOfDirectory(at url: URL) throws -> [URL]
1617
func unzipItem(at sourceURL: URL, to destinationURL: URL) throws
1718
}

Sources/pfw/Install.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,13 @@ struct Install: AsyncParsableCommand {
225225
let centralSkillDirectories =
226226
(try? fileSystem.contentsOfDirectory(at: centralSkillsURL)) ?? []
227227
for directory in centralSkillDirectories {
228+
try fileSystem.write(Data("*\n".utf8), to: directory.appendingPathComponent(".gitignore"))
228229
let toolDestination = skillsURL.appendingPathComponent("pfw-\(directory.lastPathComponent)")
229-
try fileSystem.createSymbolicLink(at: toolDestination, withDestinationURL: directory)
230+
if target.tool == .antigravity {
231+
try fileSystem.copyItem(at: directory, to: toolDestination)
232+
} else {
233+
try fileSystem.createSymbolicLink(at: toolDestination, withDestinationURL: directory)
234+
}
230235
}
231236
if let tool = target.tool {
232237
print("\(tool.rawValue): \(skillsURL.path)")

0 commit comments

Comments
 (0)