Rename screens in MIT App Inventor 2 (.aia) projects
Project description
ai2-screen-renamer
A command-line tool to rename screens in MIT App Inventor 2 projects (.aia files).
App Inventor does not provide a built-in way to rename screens. This tool automates the process by editing the .aia file directly, updating all internal references consistently.
What it does
For a given screen rename (OldName → NewName), the tool updates:
OldName.scm→NewName.scm(Designer components file)OldName.bky→NewName.bky(Blocks file)$Namefield inside the.scmfilemain=andlastopened=entries inyoungandroidproject/project.properties- Any
open another screenblock references in other screens'.bkyfiles
Installation
Requires Python 3.10+.
pipx install ai2-screen-renamer
Or with pip:
pip install ai2-screen-renamer
Or install from source:
git clone https://github.com/fgimenez/ai2-screen-renamer.git
cd ai2-screen-renamer
pip install -e .
Usage
# Rename Screen2 to AgendaContactos, output to MyApp_AgendaContactos.aia
ai2-screen-renamer MyApp.aia Screen2 AgendaContactos
# Specify output file explicitly
ai2-screen-renamer MyApp.aia Screen2 AgendaContactos MyApp_renamed.aia
Or as a Python module:
python -m ai2_renamer MyApp.aia Screen2 AgendaContactos
Limitations
Screen1 cannot be renamed. App Inventor requires Screen1 to exist as the launch screen — renaming it would produce a project that fails to build.
Errors
The tool raises a descriptive error if:
- The input file is not a valid
.aiafile - The screen to rename does not exist in the project
- A screen with the new name already exists in the project
- The screen to rename is
Screen1
Development
pip install -e ".[dev]"
pytest -v
License
Apache 2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai2_screen_renamer-0.3.1.tar.gz.
File metadata
- Download URL: ai2_screen_renamer-0.3.1.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcbd29f851eb7c177f752679132589d0575622d1c4b6a653c534f0b8738322af
|
|
| MD5 |
95a8e2de5a0a5bd80f0d0f0c6cb63c0d
|
|
| BLAKE2b-256 |
e3ea759c59cdb2e3f580fcff098d09ae432b0192adaf2ff66d2b93e05caff0a3
|
Provenance
The following attestation bundles were made for ai2_screen_renamer-0.3.1.tar.gz:
Publisher:
publish.yml on fgimenez/ai2-screen-renamer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai2_screen_renamer-0.3.1.tar.gz -
Subject digest:
bcbd29f851eb7c177f752679132589d0575622d1c4b6a653c534f0b8738322af - Sigstore transparency entry: 1110035209
- Sigstore integration time:
-
Permalink:
fgimenez/ai2-screen-renamer@60292544cf4e92773771bcf473fd2c0033257658 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/fgimenez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@60292544cf4e92773771bcf473fd2c0033257658 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ai2_screen_renamer-0.3.1-py3-none-any.whl.
File metadata
- Download URL: ai2_screen_renamer-0.3.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eeaebe6d96c2efe87b3170cbdade28ad93ef8c525b73d46946dbc5e8fc804954
|
|
| MD5 |
5a4f2a09ef8c35005478bf8bfb9c3f5a
|
|
| BLAKE2b-256 |
fe27ac2d34a026b4f9047efa24d97195f1ba6bdddc9253405823987d34b508ac
|
Provenance
The following attestation bundles were made for ai2_screen_renamer-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on fgimenez/ai2-screen-renamer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai2_screen_renamer-0.3.1-py3-none-any.whl -
Subject digest:
eeaebe6d96c2efe87b3170cbdade28ad93ef8c525b73d46946dbc5e8fc804954 - Sigstore transparency entry: 1110035214
- Sigstore integration time:
-
Permalink:
fgimenez/ai2-screen-renamer@60292544cf4e92773771bcf473fd2c0033257658 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/fgimenez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@60292544cf4e92773771bcf473fd2c0033257658 -
Trigger Event:
release
-
Statement type: