beeware / beeware/briefcase

Alias for Executing CLI Apps

Open
#1,949 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
3.3k
Forks
549
Avg merge
1d 4h
Merged PRs (30d)
40

Description

### What is the problem or limitation you are having?

To execute command line apps I have to write the name of folder that contains my __main__.py as is with underscores

Normally for CLI apps you'd have an enter script or alias to execute the main function.
for example:
```toml
[project.scripts]
markdown-checker = "markdown_checker:main"
```

then you'd execute it using `markdown-checker` not `markdown_checker`

### Describe the solution you'd like

Add alias just like the project.scripts

### Describe alternatives you've considered

I changed the names of everything to not use underscores but it seems that you are detecting this from the folder name and it wouldn't seem right for me to change the folder name to use dashes instead of underscores

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

The issue names no source files or tests. Start by tracing how CLI apps derive their executable name from a package containing __main__.py, then compare that behavior with the [project.scripts] example. Done means a configured dash-separated alias runs the app without requiring the package directory to be renamed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.