cliex 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,45 @@
1
+ # GitHub Actions — runs when a version tag is mirrored from GitLab to GitHub.
2
+ # Creates a GitHub Release and attaches wheel + sdist for users who install from Releases.
3
+ #
4
+ # Enable: GitHub repo → Settings → Actions → General → Allow all actions.
5
+
6
+ name: Release
7
+
8
+ on:
9
+ push:
10
+ tags:
11
+ - "v*.*.*"
12
+
13
+ permissions:
14
+ contents: write
15
+
16
+ jobs:
17
+ release:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - name: Checkout
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.11"
27
+
28
+ - name: Build package
29
+ run: |
30
+ pip install flit
31
+ python -m flit build
32
+ ls -la dist/
33
+
34
+ - name: Verify package
35
+ run: |
36
+ pip install twine
37
+ twine check dist/*
38
+
39
+ - name: Create GitHub Release
40
+ uses: softprops/action-gh-release@v2
41
+ with:
42
+ files: dist/*
43
+ generate_release_notes: true
44
+ draft: false
45
+ prerelease: false
cliex-0.1.0/.gitignore ADDED
@@ -0,0 +1,92 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # Virtual environments
30
+ .venv/
31
+ venv/
32
+ ENV/
33
+ env/
34
+ test/.venv/
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Type checkers
55
+ .mypy_cache/
56
+ .dmypy.json
57
+ dmypy.json
58
+ .pytype/
59
+
60
+ # Linters / formatters
61
+ .ruff_cache/
62
+
63
+ # Jupyter Notebook
64
+ .ipynb_checkpoints
65
+
66
+ # pyenv
67
+ .python-version
68
+
69
+ # Environments & secrets
70
+ .env
71
+ .env.*
72
+ !.env.example
73
+
74
+ # IDE / editors
75
+ .idea/
76
+ .vscode/
77
+ *.swp
78
+ *.swo
79
+ *~
80
+
81
+ # OS files
82
+ .DS_Store
83
+ Thumbs.db
84
+ Desktop.ini
85
+
86
+ # Logs
87
+ *.log
88
+
89
+ # Local scratch / temp
90
+ tmp/
91
+ temp/
92
+ *.tmp
@@ -0,0 +1,77 @@
1
+ # GitLab CI — test on main branch only; publish to PyPI when a version tag is pushed.
2
+ # Tag format: v0.1.0 (must match version in pyproject.toml)
3
+ #
4
+ # Required CI/CD variable (Settings → CI/CD → Variables):
5
+ # PYPI_API_TOKEN — PyPI API token (scope: entire account or project "cliex")
6
+
7
+ stages:
8
+ - test
9
+ - build
10
+ - release
11
+
12
+ variables:
13
+ PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
14
+ PIP_DISABLE_PIP_VERSION_CHECK: "1"
15
+
16
+ cache:
17
+ key: "${CI_COMMIT_REF_SLUG}"
18
+ paths:
19
+ - .cache/pip
20
+
21
+ .test_template: &test_template
22
+ stage: test
23
+ image: python:3.11
24
+ before_script:
25
+ - python --version
26
+ - pip install flit
27
+ - pip install -e .
28
+ script:
29
+ - python -c "import cliex; print('version:', cliex.__version__)"
30
+ - python -m cliex list
31
+
32
+ test:branch:
33
+ <<: *test_template
34
+ rules:
35
+ - if: $CI_COMMIT_TAG
36
+ when: never
37
+ - if: $CI_COMMIT_BRANCH == "main"
38
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
39
+
40
+ test:tag:
41
+ <<: *test_template
42
+ rules:
43
+ - if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/
44
+
45
+ build:
46
+ stage: build
47
+ image: python:3.11
48
+ script:
49
+ - pip install flit
50
+ - python -m flit build
51
+ - ls -la dist/
52
+ artifacts:
53
+ paths:
54
+ - dist/
55
+ expire_in: 4 weeks
56
+ rules:
57
+ - if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/
58
+
59
+ publish:pypi:
60
+ stage: release
61
+ image: python:3.11
62
+ needs:
63
+ - job: build
64
+ artifacts: true
65
+ script:
66
+ - pip install twine
67
+ - twine check dist/*
68
+ - >
69
+ twine upload dist/*
70
+ --username __token__
71
+ --password "$PYPI_API_TOKEN"
72
+ --non-interactive
73
+ rules:
74
+ - if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/
75
+ environment:
76
+ name: pypi
77
+ url: https://pypi.org/project/cliex/
cliex-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DucHuynhTrung
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
cliex-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,314 @@
1
+ Metadata-Version: 2.4
2
+ Name: cliex
3
+ Version: 0.1.0
4
+ Summary: CLI tool setup project quickly.
5
+ Author-email: DucHuynhTrung <huynhtrungduc.growth@gmail.com>
6
+ Requires-Python: >=3.11
7
+ Description-Content-Type: text/markdown
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Software Development :: Code Generators
18
+ License-File: LICENSE
19
+ Requires-Dist: typer[all]>=0.12.0
20
+ Requires-Dist: rich>=13.0.0
21
+ Requires-Dist: pyyaml>=6.0
22
+ Project-URL: Bug Tracker, https://github.com/DucHuynhTrung/cliex-quick/issues
23
+ Project-URL: Documentation, https://github.com/DucHuynhTrung/cliex-quick#readme
24
+ Project-URL: Homepage, https://github.com/DucHuynhTrung/cliex-quick
25
+ Project-URL: Repository, https://github.com/DucHuynhTrung/cliex-quick.git
26
+
27
+ # Cliex
28
+
29
+ **Cliex** is a Python CLI tool that helps you bootstrap projects quickly using **setup profiles** defined in YAML. Instead of retyping dozens of install commands every time you start a new project, you run one command — Cliex executes the entire setup workflow for you.
30
+
31
+ The source code is **free and open** for the community. You may use, modify, and share it freely under the MIT license.
32
+
33
+ ## Features
34
+
35
+ - Bootstrap a new project with a single command
36
+ - Support for multiple setup profiles (Next.js, FastAPI, Razor, etc.)
37
+ - Create or customize your own profiles via YAML files
38
+ - List and manage available profiles
39
+ - Colorful terminal output for easy progress tracking
40
+ - Automatic checks for required tools before running
41
+
42
+ ## Requirements
43
+
44
+ - Python 3.11+
45
+ - Node.js, npm, npx (for frontend profiles such as Next.js)
46
+ - Git
47
+
48
+ ## Installation
49
+
50
+ ### Option 1 — PyPI (recommended for end users)
51
+
52
+ Requires Python 3.11+.
53
+
54
+ ```bash
55
+ # Recommended: isolated install
56
+ pipx install cliex
57
+
58
+ # Or with pip
59
+ pip install cliex
60
+ ```
61
+
62
+ Verify:
63
+
64
+ ```bash
65
+ cliex list
66
+ ```
67
+
68
+ **Update to the latest version:**
69
+
70
+ ```bash
71
+ pipx upgrade cliex
72
+ # or
73
+ pip install -U cliex
74
+ ```
75
+
76
+ ### Option 2 — GitHub Releases
77
+
78
+ Download a wheel from [Releases](https://github.com/DucHuynhTrung/cliex-quick/releases) or install directly:
79
+
80
+ ```bash
81
+ pip install https://github.com/DucHuynhTrung/cliex-quick/releases/download/v0.1.0/cliex-0.1.0-py3-none-any.whl
82
+ ```
83
+
84
+ Replace `v0.1.0` with the latest tag.
85
+
86
+ ### Option 3 — Install from source (development)
87
+
88
+ ```bash
89
+ git clone https://github.com/DucHuynhTrung/cliex-quick.git
90
+ cd cliex-quick
91
+
92
+ pip install -e .
93
+ ```
94
+
95
+ ### Using uv (optional)
96
+
97
+ ```bash
98
+ uv venv
99
+ # Windows
100
+ .venv\Scripts\activate
101
+ # macOS / Linux
102
+ source .venv/bin/activate
103
+
104
+ uv pip install -e .
105
+ ```
106
+
107
+ After installation, the `cliex` command is available in your terminal.
108
+
109
+ > **Maintainers:** see [docs/RELEASE.md](docs/RELEASE.md) for the full GitLab → GitHub mirror → PyPI + Releases workflow.
110
+
111
+ ## Usage
112
+
113
+ ### Create a new project
114
+
115
+ ```bash
116
+ # Create a project in the "my-app" folder (uses the default profile)
117
+ cliex new my-app
118
+
119
+ # Create a project in the current directory
120
+ cliex new .
121
+
122
+ # No name provided → defaults to the current directory
123
+ cliex new
124
+ ```
125
+
126
+ ### Choose a specific setup profile
127
+
128
+ ```bash
129
+ # Use the Next.js profile
130
+ cliex new my-app --setup nextjs-setup
131
+
132
+ # Short form
133
+ cliex new my-app -s fastapi
134
+
135
+ # Use a custom YAML file directly
136
+ cliex new my-app --setup path/to/my-setup.yaml
137
+ ```
138
+
139
+ ### List available profiles
140
+
141
+ ```bash
142
+ cliex list
143
+ ```
144
+
145
+ This displays all registered profiles, their source (package or user), and which one is the default.
146
+
147
+ ### Create or edit a profile
148
+
149
+ ```bash
150
+ # Create a new profile (or open the file if it already exists)
151
+ cliex registry my-custom-setup
152
+
153
+ # Edit profile metadata
154
+ cliex metadata
155
+ ```
156
+
157
+ When creating a new profile, Cliex will:
158
+
159
+ 1. Create a `my-custom-setup.yaml` file with a sample template
160
+ 2. Automatically register the profile in `cliex-metadata.yaml`
161
+ 3. Open the file in your system's default text editor
162
+
163
+ ### Run without installing
164
+
165
+ ```bash
166
+ python -m cliex new my-app
167
+ python -m cliex list
168
+ ```
169
+
170
+ ## Commands
171
+
172
+ | Command | Description |
173
+ |---------|-------------|
174
+ | `cliex new [PROJECT_NAME]` | Create a new project using a setup profile |
175
+ | `cliex new --setup <profile>` | Select a specific profile or YAML file |
176
+ | `cliex list` | List all setup profiles |
177
+ | `cliex registry <name>` | Create or edit a profile YAML file |
178
+ | `cliex metadata` | Open `cliex-metadata.yaml` to edit metadata |
179
+
180
+ ## Built-in setup profiles
181
+
182
+ | Profile | Description |
183
+ |---------|-------------|
184
+ | `nextjs-setup` *(default)* | Next.js + TypeScript + Tailwind + ESLint + shadcn/ui + Firebase + agent skills |
185
+ | `fastapi` | FastAPI with a virtual environment |
186
+ | `razor` | Razor project setup |
187
+
188
+ Step-by-step details for each profile live in `cliex/templates/setups/`.
189
+
190
+ ### What does the Next.js profile do?
191
+
192
+ When you run `cliex new my-app -s nextjs-setup`, Cliex will:
193
+
194
+ 1. Check for `node`, `npm`, `npx`, and `git`
195
+ 2. Create a Next.js project (TypeScript, Tailwind, ESLint, App Router)
196
+ 3. Install packages: Firebase, Zod, TanStack Query, Zustand, etc.
197
+ 4. Initialize shadcn/ui and add common components
198
+ 5. Install agent skills for Claude
199
+ 6. Initialize git and commit the changes
200
+
201
+ ## Customizing setup profiles
202
+
203
+ Each profile is a YAML file with a list of `steps`. Supported step types:
204
+
205
+ | Type | Description | Example |
206
+ |------|-------------|---------|
207
+ | `run` | Run a shell command | `cmd: npm install` |
208
+ | `copy` | Copy a file | `src`, `dest` |
209
+ | `append` | Append content to a file | `file`, `content` |
210
+ | `git` | Git operations | `add`, `commit_message`, `username`, `email` |
211
+
212
+ Minimal profile example:
213
+
214
+ ```yaml
215
+ steps:
216
+ - type: run
217
+ name: say-hello
218
+ cmd: echo "Hello from Cliex!"
219
+ ```
220
+
221
+ ### Where profiles are stored
222
+
223
+ - **Package** (bundled with Cliex): `cliex/templates/setups/`
224
+ - **User** (your custom profiles):
225
+ - Windows: `%APPDATA%\cliex\setups\`
226
+ - macOS / Linux: `~/.config/cliex/setups/`
227
+
228
+ User-created profiles override package profiles with the same name.
229
+
230
+ ## Project structure
231
+
232
+ ```
233
+ cliex/
234
+ ├── cliex/
235
+ │ ├── main.py # CLI entry point (Typer)
236
+ │ ├── cli/
237
+ │ │ └── new.py # New project creation logic
238
+ │ ├── setup/
239
+ │ │ ├── registry.py # Setup profile registry
240
+ │ │ ├── loader.py # YAML file loader
241
+ │ │ └── executor.py # Step executor
242
+ │ ├── runner/
243
+ │ │ └── runner.py # Subprocess runner
244
+ │ ├── checker/
245
+ │ │ └── checker.py # System requirement checker
246
+ │ └── templates/
247
+ │ └── setups/ # Default profiles + metadata
248
+ ├── pyproject.toml
249
+ ├── LICENSE
250
+ └── README.md
251
+ ```
252
+
253
+ ## Troubleshooting
254
+
255
+ ### Missing required tools
256
+
257
+ ```
258
+ Missing required commands: node, npm
259
+ ```
260
+
261
+ Install the missing tools:
262
+
263
+ - **Node.js / npm**: https://nodejs.org/
264
+ - **Git**: https://git-scm.com/
265
+
266
+ ### Target directory already exists
267
+
268
+ ```
269
+ Target folder already exists
270
+ ```
271
+
272
+ Choose a different folder name or remove the existing directory before running again.
273
+
274
+ ### Git commit failed
275
+
276
+ Configure git first:
277
+
278
+ ```bash
279
+ git config --global user.name "Your Name"
280
+ git config --global user.email "email@example.com"
281
+ ```
282
+
283
+ ### Profile not found
284
+
285
+ Run `cliex list` to see available profiles, or create a new one with `cliex registry <name>`.
286
+
287
+ ## Development
288
+
289
+ ```bash
290
+ # Install in editable mode
291
+ pip install -e .
292
+
293
+ # Run directly
294
+ python -m cliex list
295
+ ```
296
+
297
+ ## Contributing
298
+
299
+ Contributions are welcome! You can:
300
+
301
+ - Report bugs or request features via [Issues](https://github.com/DucHuynhTrung/cliex-quick/issues)
302
+ - Submit Pull Requests with new setup profiles or code improvements
303
+ - Share your YAML profiles with the community
304
+
305
+ ## License
306
+
307
+ This project is released under the **MIT** license — completely **free** and open source for the community.
308
+
309
+ You are free to use, copy, modify, distribute, and use it commercially without permission. See [LICENSE](LICENSE) for details.
310
+
311
+ ## Author
312
+
313
+ **DucHuynhTrung** — [huynhtrungduc.growth@gmail.com](mailto:huynhtrungduc.growth@gmail.com)
314
+