[GH-ISSUE #52] CLI Launch Focus Issue #48

Open
opened 2026-03-03 16:43:27 +03:00 by kerem · 7 comments
Owner

Originally created by @AB-boi on GitHub (Feb 24, 2026).
Original GitHub issue: https://github.com/nickustinov/itsypad-macos/issues/52

Is it possible to launch and open a text file from the CLI with itsypad?
For example, CotEditor lets you use the cot command.

Originally created by @AB-boi on GitHub (Feb 24, 2026). Original GitHub issue: https://github.com/nickustinov/itsypad-macos/issues/52 Is it possible to launch and open a text file from the CLI with itsypad? For example, CotEditor lets you use the `cot` command.
Author
Owner

@nickustinov commented on GitHub (Feb 24, 2026):

Itsypad already supports opening files from the terminal using macOS's built-in open command:

open -a Itsypad file.txt
open -a Itsypad *.md

You can create a shell alias for convenience:

alias itsypad='open -a Itsypad'

Then simply:

itsypad file.txt

A dedicated CLI tool like cot isn't planned at the moment, but the open -a approach should cover the same use case. Let me know if this works for you!

<!-- gh-comment-id:3952811031 --> @nickustinov commented on GitHub (Feb 24, 2026): Itsypad already supports opening files from the terminal using macOS's built-in `open` command: ```bash open -a Itsypad file.txt open -a Itsypad *.md ``` You can create a shell alias for convenience: ```bash alias itsypad='open -a Itsypad' ``` Then simply: ```bash itsypad file.txt ``` A dedicated CLI tool like `cot` isn't planned at the moment, but the `open -a` approach should cover the same use case. Let me know if this works for you!
Author
Owner

@AB-boi commented on GitHub (Feb 24, 2026):

This is more than enough. Excellent!

<!-- gh-comment-id:3952942576 --> @AB-boi commented on GitHub (Feb 24, 2026): This is more than enough. Excellent!
Author
Owner

@AB-boi commented on GitHub (Feb 24, 2026):

I appreciate the quality and simplicity of the app btw. Thank you for making it!!

<!-- gh-comment-id:3953022440 --> @AB-boi commented on GitHub (Feb 24, 2026): I appreciate the quality and simplicity of the app btw. Thank you for making it!!
Author
Owner

@AB-boi commented on GitHub (Feb 24, 2026):

A dedicated CLI tool like cot isn't planned at the moment, but the open -a approach should cover the same use case. Let me know if this works for you!

Hey @nickustinov, it works but there's a slight issue: When I run open -a Itsypad file.txt or itsypad file.txt, it launches itsypad and loads file.txt but the itsypad window doesn't come into focus. It stays behind by one window:

Image
<!-- gh-comment-id:3953268477 --> @AB-boi commented on GitHub (Feb 24, 2026): > A dedicated CLI tool like `cot` isn't planned at the moment, but the `open -a` approach should cover the same use case. Let me know if this works for you! Hey @nickustinov, it works but there's a slight issue: When I run `open -a Itsypad file.txt` or `itsypad file.txt`, it launches itsypad and loads `file.txt` but the itsypad window doesn't come into focus. It stays behind by one window: <img width="1001" height="883" alt="Image" src="https://github.com/user-attachments/assets/24d3f172-f526-48e3-bece-e5d5cf848113" />
Author
Owner

@nickustinov commented on GitHub (Feb 25, 2026):

Thanks for reporting this! I found and fixed a bug where opening a file via open -a Itsypad file.txt when Itsypad wasn't running would silently fail to open the file. That fix will be in 1.9.6.

However, I'm unable to reproduce the window focus issue you're seeing – on my machine, Itsypad always comes to the front. Could you share a few details?

  • What macOS version are you on?
  • Are you using Stage Manager or any third-party window manager?
  • Does the focus issue happen every time, or only sometimes?

That would help narrow it down. Thanks!

<!-- gh-comment-id:3958541575 --> @nickustinov commented on GitHub (Feb 25, 2026): Thanks for reporting this! I found and fixed a bug where opening a file via `open -a Itsypad file.txt` when Itsypad wasn't running would silently fail to open the file. That fix will be in 1.9.6. However, I'm unable to reproduce the window focus issue you're seeing – on my machine, Itsypad always comes to the front. Could you share a few details? - What macOS version are you on? - Are you using Stage Manager or any third-party window manager? - Does the focus issue happen every time, or only sometimes? That would help narrow it down. Thanks!
Author
Owner

@AB-boi commented on GitHub (Feb 25, 2026):

  1. MacOS Sequoia 15.7.4
  2. I use Loop for window management. I don’t use Stage Manager.
  3. It happens every time.
<!-- gh-comment-id:3959445023 --> @AB-boi commented on GitHub (Feb 25, 2026): 1. MacOS Sequoia 15.7.4 2. I use Loop for window management. I don’t use Stage Manager. 3. It happens every time.
Author
Owner

@AB-boi commented on GitHub (Feb 25, 2026):

@nickustinov I tried to replicate this issue again by quitting Loop first. It still happens.

<!-- gh-comment-id:3960016430 --> @AB-boi commented on GitHub (Feb 25, 2026): @nickustinov I tried to replicate this issue again by quitting Loop first. It still happens.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/itsypad-macos#48
No description provided.