Skip to content

Commit 8a97595

Browse files
committed
fix: improve README clarity and formatting
1 parent fd96949 commit 8a97595

1 file changed

Lines changed: 34 additions & 27 deletions

File tree

README.md

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,26 @@
1010
<a href="LICENSE"><img src="https://img.shields.io/github/license/gitmobkab/copia?style=for-the-badge" alt="License"></a>
1111
<a href="https://gitmobkab.github.io/copia/"><img src="https://img.shields.io/badge/docs-material-4caf6e?style=for-the-badge" alt="Docs"></a>
1212
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=for-the-badge" alt="Ruff"></a>
13-
<a href="https://pypi.org/project/copia-seed/"><img src="https://img.shields.io/pypi/pyversions/copia-seed?style=for-the-badge&" alt="Python"></a>
13+
<a href="https://pypi.org/project/copia-seed/"><img src="https://img.shields.io/pypi/pyversions/copia-seed?style=for-the-badge" alt="Python"></a>
1414
</p>
1515

16+
<p align="center"><strong>Seed your database without the hassle.</strong></p>
17+
1618
---
19+
1720
<p align="center">
1821
<a href="https://gitmobkab.github.io/copia/">
19-
<img src="https://raw.githubusercontent.com/gitmobkab/copia/main/docs/assets/tui_layout.png" alt="Copia preview" width="800">
22+
<img src="https://raw.githubusercontent.com/gitmobkab/copia/main/docs/assets/tui_layout.png" alt="Copia TUI preview" width="800">
2023
</a>
2124
</p>
2225

23-
<p align="center"><em>Copia's TUI, showing the editor, preview, and log panels.</em></p>
26+
<p align="center"><em>Editor, preview, and log panels — all in your terminal.</em></p>
2427

2528
---
26-
<p align="center">
27-
<strong>Seed your database without the hassle.</strong>
28-
</p>
2929

30-
Most frameworks either ship a seeder that’s hard to use—or dont ship one at all.
30+
Seeding a database with realistic data is tedious. Most frameworks ship a seeder with questionable decisions, or don't ship one at all.
3131

32-
Copia is a TUI-based database seeder with its own declarative language:
33-
describe your data once, and let Copia generate and insert it for you.
34-
35-
---
32+
Copia gives you a declarative language and a TUI to describe, preview, and insert data — without boilerplate, without framework dependency.
3633

3734
## Why Copia
3835

@@ -49,20 +46,20 @@ CREATE TABLE users (
4946
);
5047
```
5148

52-
Without copia, seeding it looks like this:
49+
Without Copia:
5350

5451
```sql
5552
INSERT INTO users (id, username, email, password, role, created_at)
5653
VALUES
57-
('a1b2c3d4-...', 'john_doe', 'john@example.com', '$2b$12$...', 'admin', '2023-04-12'),
58-
('e5f6g7h8-...', 'jane_smith', 'jane@example.com', '$2b$12$...', 'editor', '2024-01-05'),
59-
('i9j0k1l2-...', 'bob_99', 'bob@example.com', '$2b$12$...', 'viewer', '2022-11-30'),
60-
('m3n4o5p6-...', 'alice_w', 'alice@example.com', '$2b$12$...', 'admin', '2023-08-19'),
61-
('q7r8s9t0-...', 'charlie_k', 'charlie@example.com','$2b$12$...','editor', '2024-03-02');
54+
('a1b2c3d4-...', 'john_doe', 'john@example.com', '$2b$12$...', 'admin', '2023-04-12'),
55+
('e5f6g7h8-...', 'jane_smith', 'jane@example.com', '$2b$12$...', 'editor', '2024-01-05'),
56+
('i9j0k1l2-...', 'bob_99', 'bob@example.com', '$2b$12$...', 'viewer', '2022-11-30'),
57+
('m3n4o5p6-...', 'alice_w', 'alice@example.com', '$2b$12$...', 'admin', '2023-08-19'),
58+
('q7r8s9t0-...', 'charlie_k', 'charlie@example.com','$2b$12$...', 'editor', '2024-03-02');
6259
-- ... 55 more rows. good luck with that.
6360
```
6461

65-
With copia:
62+
With Copia:
6663

6764
```
6865
id: uuid()
@@ -73,36 +70,46 @@ role: enum('admin', 'editor', 'viewer')
7370
created_at: past_date()
7471
```
7572

76-
---
73+
```bash
74+
copia run --table users users.copia --rows 60
75+
```
76+
77+
Done.
7778

7879
## Features
7980

8081
- **Simple language** — if you know what a function call looks like, you know the Copia DSL
8182
- **Realistic data** — built on [Faker](https://faker.readthedocs.io/), 25+ generators out of the box
82-
- **Relational-aware**[`fetch('table.column')`](https://gitmobkab.github.io/copia/generators/fetch) samples from existing rows, so foreign keys just work
83+
- **Relational-aware**`fetch('table.column')` samples from existing rows, so foreign keys just work
8384
- **Interactive TUI** — write, preview, and insert without leaving your terminal
85+
- **Scriptable** — pipe input, dump to JSON/CSV/SQL, skip confirmation prompts
8486

8587
## Installation
8688

8789
```bash
8890
pip install copia-seed
8991
```
9092

91-
Requires Python 3.13+. MySQL and MariaDB are supported.
93+
Requires Python 3.13+. MySQL and MariaDB included. PostgreSQL available as an optional dependency.
9294

9395
## Quickstart
9496

9597
```bash
96-
copia init # generate a config template
97-
copia # launch the TUI
98+
copia init # create a config file
99+
copia tui # launch the interactive TUI
100+
```
101+
102+
Or run directly from the CLI:
103+
104+
```bash
105+
copia run --dumps json users.copia --skip-config
106+
echo "id:uuid() name:username()" | copia run --dumps json --skip-config
98107
```
99108

100109
## Documentation
101110

102-
**[Read the documentation](https://gitmobkab.github.io/copia/)**
111+
**[gitmobkab.github.io/copia](https://gitmobkab.github.io/copia/)**
103112

104113
---
105114

106-
## License
107-
108-
MIT
115+
MIT License

0 commit comments

Comments
 (0)