A simple CLI tool to create project structures from YAML templates
Project description
Python Project (pypo)
A simple CLI tool to create project structures from YAML templates.
Installation
# Install from PyPI (when published)
pip install pypo
# Install from source (development)
git clone <repo-url>
cd pypo
pip install -e ".[dev]"
Quick Start
1. Create a Template
Create a YAML file describing your project structure:
# my-web-project.yaml
name: "web-project"
description: "A simple web project structure"
version: "1.0"
structure:
- name: "src"
type: "directory"
children:
- name: "index.html"
type: "file"
content: |
<!DOCTYPE html>
<html>
<head><title>Hello World</title></head>
<body><h1>Welcome!</h1></body>
</html>
- name: "styles"
type: "directory"
children:
- name: "main.css"
type: "file"
- name: "scripts"
type: "directory"
children:
- name: "app.js"
type: "file"
- name: "README.md"
type: "file"
content: "# My Web Project"
2. Save the Template
pypo create web-project --path ./my-web-project.yaml
3. Initialize a New Project
pypo init web-project --output ./my-new-site
Commands
| Command | Description |
|---|---|
pypo create <name> --path <yaml> |
Import a YAML template |
pypo init <name> [--output <dir>] |
Scaffold a project |
pypo list [--archived] |
List all templates |
pypo source <name> |
Display template YAML |
pypo edit <name> |
Open template in editor |
pypo export <name> --output <path> |
Export template to file |
pypo duplicate <name> <new_name> |
Clone a template |
pypo delete <name> |
Remove a template |
pypo archive <name> |
Archive a template |
Template YAML Format
name: "template-name" # Required: unique identifier
description: "Description" # Optional: what this template creates
version: "1.0" # Optional: template version
structure: # Required: list of files/directories
- name: "folder-name"
type: "directory"
children: # Nested items for directories
- name: "file.txt"
type: "file"
content: "File content" # Optional: initial file content
Configuration
Templates are stored in ~/.pypo/templates/
Storage Structure
~/.pypo/
├── config.json # Global settings
├── templates/ # Active templates
│ ├── template1.yaml
│ └── template2.yaml
└── archive/ # Archived templates
└── old-template.yaml
Development
# Clone and install
git clone <repo-url>
cd pypo
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/
ruff check src/ --fix
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 pypo_cli-0.1.2.tar.gz.
File metadata
- Download URL: pypo_cli-0.1.2.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b72d1b36b3e18852a2035b472d2042af5317b92ae1189977a65f973e2560d3db
|
|
| MD5 |
d435538e47d45f516534d13a6d93eab6
|
|
| BLAKE2b-256 |
8ad0b9e73a85cdab6da49b80282d7f0edac07a7732c1b41e3eb710e97e12a909
|
Provenance
The following attestation bundles were made for pypo_cli-0.1.2.tar.gz:
Publisher:
publish.yml on sai1027/pypo-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypo_cli-0.1.2.tar.gz -
Subject digest:
b72d1b36b3e18852a2035b472d2042af5317b92ae1189977a65f973e2560d3db - Sigstore transparency entry: 908477379
- Sigstore integration time:
-
Permalink:
sai1027/pypo-cli@fc42f7b2dbd92b2780702f7c40b02a0399224c44 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/sai1027
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fc42f7b2dbd92b2780702f7c40b02a0399224c44 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pypo_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pypo_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 18.9 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 |
0018f92bc02bc8e89654fcb853c2a7f92739942b58f3cee0ab3662451dbe3313
|
|
| MD5 |
96df1b9236e42cb01211eb2e52c36edb
|
|
| BLAKE2b-256 |
9e079290f7a0a2f8159d0f8627a3019f4a21f477f4c256474f466813ac69e0d7
|
Provenance
The following attestation bundles were made for pypo_cli-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on sai1027/pypo-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypo_cli-0.1.2-py3-none-any.whl -
Subject digest:
0018f92bc02bc8e89654fcb853c2a7f92739942b58f3cee0ab3662451dbe3313 - Sigstore transparency entry: 908477383
- Sigstore integration time:
-
Permalink:
sai1027/pypo-cli@fc42f7b2dbd92b2780702f7c40b02a0399224c44 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/sai1027
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fc42f7b2dbd92b2780702f7c40b02a0399224c44 -
Trigger Event:
push
-
Statement type: