Skip to content

Conversation

@mauriciopolvora
Copy link

Pull Request

Fix macOS CLI installation permission error by using user-writable directory

Description

This PR fixes the "Permission denied (OS error 13)" error that occurs when installing the CLI command on macOS. The issue was caused by attempting to write to /usr/local/bin, which requires administrator privileges.

  • Changed CLI installation path from /usr/local/bin to ~/.local/bin for Unix systems (macOS/Linux)
  • Replaced hardcoded path constant with a dynamic get_cli_script_path() function
  • Updated success message to inform users about adding ~/.local/bin to their PATH if needed
  • Maintains backward compatibility with Windows installation (no changes to Windows path)

Screenshots/Videos

Before (Error):
The installation would fail with a permission denied error requiring sudo access.

After (Success):
The CLI installs successfully to ~/.local/bin/athas without requiring elevated privileges. Users receive clear instructions about adding the directory to their PATH if needed.

Related Issues

Closes #373


Note: This change follows modern best practices for user-installed CLI tools. Users may need to add ~/.local/bin to their PATH by adding export PATH="$HOME/.local/bin:$PATH" to their ~/.zshrc or ~/.bashrc file.

@mehmetozguldev mehmetozguldev self-requested a review November 14, 2025 16:01
@mauriciopolvora
Copy link
Author

Bear in mind this solely opens the editor, to feed it directory support we need to add file opened event listener in backend and listener for cli event in front end

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.

Error when trying to install athas cli command on macOS.

2 participants