@git.zone/cli
A CLI toolbelt to streamline local development cycles by utilizing various gitzone utilities.
Install
To begin using @git.zone/cli
, ensure that Node.js and npm are installed on your system. Once they are set up, install the CLI tool globally with the following command:
npm install -g @git.zone/cli
This command makes gitzone
or gzone
accessible from any directory on your system.
Usage
The gitzone
CLI provides a comprehensive set of utilities to optimize and manage the development lifecycle of projects, ranging from project initialization to version control, code formatting, and deployment processes. This usage guide will walk you through the available commands, their use cases, and provide detailed examples.
Initializing a New Project
To bootstrap a new project aligned with modern TypeScript practices, use gitzone's template command. Choose from a range of templates tailored for different project types:
gitzone template [templatename]
Replace [templatename]
with any of the following:
npm
: Starts an npm module with TypeScript, complete with test and CI/CD integration.website
: Initializes a LitElement-based frontend application with features such as e2e testing and service worker setup.element
: Prepares a new standard setup for creating reusable web components with LitElement.
Example: Starting a New npm Project
- Navigate to your desired directory in the terminal.
- Execute:
gitzone template npm
- Respond to the prompts to customize the project settings. This includes setting up essential metadata such as name and repository information.
Committing Changes
Standardizing commit messages and versionning with gitzone:
gitzone commit
This command provides an interactive prompt to create a conventional commit message, which will be automatically versioned based on the significance of the changes like fix
, feat
, or BREAKING CHANGE
.
Handling Package Deprecation
Replace an outdated package with a new one for your team and users:
gitzone deprecate
The utility collects information about old and new package names through interactive prompts, and proceeds with deprecation notices in npm, guiding users towards the updated package.
CI/CD Utilities
Access your project’s CI/CD settings instantly:
gitzone open ci
This command opens the settings page of the repository’s CI/CD configuration directly from your CLI, thus swiftly transitioning from local tasks to cloud configurations.
Maintaining Project Cleanliness
For consistent code formatting across your project:
gitzone format
This command applies uniform formatting styles using Prettier, ensuring your JS/TS and markdown files align with the project's style guide.
Lifecycle Management Commands
Clean Builds
Remove generated files and prepare for a fresh build:
gitzone clean
This utility cleans up build artifacts from your project directory so that you can run a fresh build without residual clutter affecting outcomes.
Sync and meta Configuration
To manage metadata that guides your project configurations and module syncing:
gitzone meta init
This initialization sets the groundwork for supporting gitzone projects by helping you create a .meta.json
file that tracks subprojects.
Advanced Operations
Cloud and Docker Integrations
For projects integrating cloud deployment or containerization:
gitzone docker prune
This utility manages Docker resources by cleaning stale volumes, containers, and images, ensuring efficient resource use.
Detailed Use Cases
Project Setup and Template Management
Whether creating an npm module or a web component, the command gitzone template [templatename]
invokes smart scaffolding processes that automatically set up a robust project environment equipped with modern tooling like TypeScript, Prettier configurations, and testing frameworks.
Commit Management
The gitzone commit
command assures that your commit messages complement semantic versioning practices. It proposes version bumps based on detected changes and helps maintain an accurate project change log.
- Interactive Commit: Users engage in dialogues to define commit type (
fix
,feat
,BREAKING CHANGE
), scope, and description, resulting in uniform and meaningful commit logs. - Automatic Versioning: After message crafting, the versioning is attended by bumps similar to npm’s
npm version
with stages such asmajor
,minor
, andpatch
.
Formatting and Configurations
A consistent format yields a professional and readable codebase:
gitzone format
- Prettier Integration: Formats not only TypeScript and JavaScript files but also documents such as
readme.md
, maintaining consistency in both code and documentation style.
Synced Meta Projects
Effectively supervise interconnected repositories or module collections:
- Meta Initialization (
meta init
): Lay down a foundation for a meta repository that orchestrates multiple projects by overseeing them through a centralized metadata file. - Subproject Operations: Commands such as
meta update
,meta add
,meta remove
enable dynamic management of subprojects, ensuring they remain updated with current features and aligned to the meta repository's standards.
CI/CD Integration
Directly linking your local development processes to continuous integration settings with gitzone open ci
provides seamless switches between code and configuration in cloud-based environments.
Real-time Docker Management
For developers employing Docker for service deployments, gitzone docker prune
offers a quick remedy to residual services, optimizing local/docker-storage for a more streamlined experience in container management.
Leveraging gitzone
By mastering the gitzone
CLI commands, you gain unparalleled efficiency in managing your projects from conception to deployment. Encompassing a wide gamut of functionalities, from initial project scaffolding to synchronization of modularized repositories and beyond, gitzone
serves as a linchpin for developers intent on optimizing their workflow. Understanding and utilizing its full potential catalyzes development cycles, granting the freedom to focus on innovation, collaboration, and delivering outstanding software products.
License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the license file within this repository.
Please note: The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.