Skip to content

Commit f47aea5

Browse files
committed
refactor: rename mpt-tool to mpt-service-cli!
1 parent f41e0b6 commit f47aea5

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

docs/PROJECT_DESCRIPTION.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ mpt-tool is a command-line utility to scaffold, run, and audit migrations for MP
99
```
1010
2. **Initialize the migration tool:**
1111
```bash
12-
mpt-tool migrate --init
12+
mpt-service-cli migrate --init
1313
```
1414
3. **Create your first migration:**
1515
```bash
16-
mpt-tool migrate --new-data sync_users
16+
mpt-service-cli migrate --new-data sync_users
1717
```
1818
4. **Edit the generated file in the migrations/ folder**
1919
5. **Run all pending data migrations**
2020
```bash
21-
mpt-tool migrate --data
21+
mpt-service-cli migrate --data
2222
```
2323

2424
## Installation
@@ -89,7 +89,7 @@ Your Airtable table must have the following columns:
8989
Before using the migration tool for the first time, you should initialize it. This creates the necessary resources:
9090

9191
```bash
92-
mpt-tool migrate --init
92+
mpt-service-cli migrate --init
9393
```
9494

9595
This command creates:
@@ -114,11 +114,11 @@ This command creates:
114114
2. Run the appropriate command:
115115
```bash
116116
# Data migration
117-
mpt-tool migrate --new-data "migration_name"
117+
mpt-service-cli migrate --new-data "migration_name"
118118
```
119119
```bash
120120
# Schema migration
121-
mpt-tool migrate --new-schema "migration_name"
121+
mpt-service-cli migrate --new-schema "migration_name"
122122
```
123123
124124
A new file is created in `migrations/` with a timestamped prefix (e.g., `20260113180013_migration_name.py`) and a prefilled `Command` class.
@@ -164,7 +164,7 @@ class Migration(DataBaseMigration, MPTAPIClientMixin, AirtableAPIClientMixin):
164164
Before running migrations, you can validate your migration folder for issues:
165165
166166
```bash
167-
mpt-tool migrate --check
167+
mpt-service-cli migrate --check
168168
```
169169
170170
This command:
@@ -185,11 +185,11 @@ Error running check command: Duplicate migration_id found in migrations: 2026011
185185
### Running Migrations
186186
- **Run all pending data migrations:**
187187
```bash
188-
mpt-tool migrate --data
188+
mpt-service-cli migrate --data
189189
```
190190
- **Run all pending schema migrations:**
191191
```bash
192-
mpt-tool migrate --schema
192+
mpt-service-cli migrate --schema
193193
```
194194
195195
Migrations are executed in order based on their order_id (timestamp). The tool automatically:
@@ -241,7 +241,7 @@ If a migration fails during execution:
241241
To mark a migration as applied without running it:
242242
243243
```bash
244-
mpt-tool migrate --fake MIGRATION_ID
244+
mpt-service-cli migrate --fake MIGRATION_ID
245245
```
246246
247247
Where `MIGRATION_ID` is the filename without `order_id` and `.py` (e.g., `test1`).
@@ -262,7 +262,7 @@ If the migration exists:
262262
To see all migrations and their status:
263263
264264
```bash
265-
mpt-tool migrate --list
265+
mpt-service-cli migrate --list
266266
```
267267
268268
The output shows execution order, status, and timestamps.
@@ -278,17 +278,17 @@ The status column is derived from the persisted timestamps:
278278
| not applied | No state entry exists for the migration file |
279279
280280
### Getting Help
281-
Run `mpt-tool --help` to see all available commands and params:
281+
Run `mpt-service-cli --help` to see all available commands and params:
282282
```bash
283-
mpt-tool --help
284-
mpt-tool migrate --help
283+
mpt-service-cli --help
284+
mpt-service-cli migrate --help
285285
```
286286
287287
288288
## Best Practices
289289
290290
### Migration Validation
291-
- Run `mpt-tool migrate --check` before committing migration files
291+
- Run `mpt-service-cli migrate --check` before committing migration files
292292
- Include `--check` in your CI/CD pipeline to catch issues early
293293
- Verify there are no duplicate migration_id values before deployment
294294

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ review:
3838
coderabbit review --prompt-only
3939

4040
run:
41-
$(DC) run --rm -it app bash -c "mpt-tool migrate --help && exec bash"
41+
$(DC) run --rm -it app bash -c "mpt-service-cli migrate --help && exec bash"
4242

4343
test:
4444
$(DC) run --rm app pytest $(if $(args),$(args),.)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies = [
1414
]
1515

1616
[project.scripts]
17-
mpt-tool = "mpt_tool.cli:main"
17+
mpt-service-cli = "mpt_tool.cli:main"
1818

1919
[dependency-groups]
2020
dev = [

0 commit comments

Comments
 (0)