Skip to content

feat: Add Integrated CLI Tab for Windows and Linux#60

Merged
lacerbi merged 30 commits into
mainfrom
cli-tab
Jun 30, 2025
Merged

feat: Add Integrated CLI Tab for Windows and Linux#60
lacerbi merged 30 commits into
mainfrom
cli-tab

Conversation

@lacerbi

@lacerbi lacerbi commented Jun 30, 2025

Copy link
Copy Markdown
Owner

feat: Add Integrated CLI Tab for Windows and Linux

Summary

This pull request introduces a new CLI (Command-Line Interface) Tab to Athanor. This feature provides an integrated shell within the application, allowing users to run commands directly in the context of their currently open project. In particular, this supports launching AI agents such as Claude Code and Gemini CLI, for which we plan further future integration.

The implementation relies on node-pty for a robust, platform-native terminal experience. After significant effort to ensure cross-platform compatibility, the CLI tab is fully supported on Windows and Linux. Due to persistent compilation and signing issues with native dependencies, this feature is currently unsupported on macOS.

Additionally, this PR includes:

  • A new TROUBLESHOOTING.md document.
  • Robust error handling for the shell process and external link opening on Linux.
  • Documentation explaining the node-pty challenges and the decision to defer macOS support.

Changes Made

Feature

  • Integrated CLI Tab: A new tab is added to the main interface, providing a persistent terminal session that opens in the project's root directory.
  • Shell Persistence: The CLI session remains active as the user navigates through the app.
  • Error Handling: The CLI tab will gracefully close itself if the underlying shell process fails to start.

Fixes

  • Build & Packaging: Resolved numerous issues with webpack and electron-forge to correctly package the node-pty native dependency, ensuring it works in a packaged application. This includes adjustments to asarUnpack settings and webpack plugins.
  • Platform Stability: Implemented multiple fixes to stabilize the CLI functionality on Windows and Linux.
  • External Links: Added robust error handling for opening external links, particularly for Linux systems.

Documentation

  • TROUBLESHOOTING.md: Created a new document to help users resolve common issues, including a new entry for ApiKeyStorageError.
  • macOS CLI Support: Added a guide (docs/guides/cli-macos-failure.md) detailing the attempts to get the CLI working on macOS and officially documenting it as an unsupported feature for now.
  • WSL Notes: Added a note regarding potential keyring issues when running on Windows Subsystem for Linux (WSL).

Testing Done

  • Windows & Linux:
    • Open a project.
    • Navigate to the new "CLI" tab.
    • Verify that a shell prompt appears and is running in the project's root directory.
    • Run a few commands (e.g., ls, git status).
    • Close and reopen the project to ensure the CLI tab state is handled correctly.
  • macOS:
    • Verify that the CLI tab either does not appear or fails gracefully without crashing the application, as per its unsupported status.

lacerbi added 30 commits June 28, 2025 20:36
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
…ng link for ApiKeyStorageError

Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
… CLI works on Win and Linux, unsupported on macOS

Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
Signed-off-by: Luigi Acerbi <luigi.acerbi@gmail.com>
@lacerbi lacerbi merged commit 8fef832 into main Jun 30, 2025
11 checks passed
@lacerbi lacerbi deleted the cli-tab branch June 30, 2025 15:16
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.

1 participant