Skip to main content

cg

Simple yet powerful code generator. Make use of your shell as possiable as cg can.

Pity, the name cg is taken by others. use cgr in cmdline. maybe you should alias cg=coge

Compare to hygen, yo.

  • yo is way too slow and complicated.
  • hygen pollutes all template files, and only support ejs.

What I only need:

  1. template is runable as normal prj. No more $placehold$ stuff.
  2. instinct command follows the folder path.
  3. respect .gitignore.
  4. quick project to template and vice versa.
  5. prompt available.

API design

which one you prefer?

# no slash
cg js react oldkey:newkey :newkey2 @:destname 

# with slash
cg js/react oldkey:newkey :newkey2 @:destname 

Scenario

1

cg js react oldkey:newkey :newkey0 :newkey1 @:destname 
  • copy $CG_TMPLS/js/react to $PWD/destname
  • change all names from oldkey to newkey, from CG_ARG__0 to newkey0 ,from CG_ARG__1 to newkey1

2

cg js react
  • Just copy $CG_TMPLS/js/react to $PWD/app

Metadata

Release files for cgr 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for cgr 0.0.2
File Interpreter ABI Platform Actions
cgr-0.0.2-py2.py3-none-any.whl Python 3, Python 2 none any Details for cgr-0.0.2-py2.py3-none-any.whl

Release files / cgr-0.0.2-py2.py3-none-any.whl

Download URL cgr-0.0.2-py2.py3-none-any.whl
Size 5.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
eb782c71fae549dc86f7e8977508e2192732a3695bfea1805801a1cbb75ffbdf
BLAKE2b-256 checksum
How to use checksums
2c7dc37c737d3f6bab47993783abde67150ff61c8b3de7a7a29620ca6d23a17a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.4.2 requests/2.23.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.2

Security for cgr 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page