Skip to content

ycmds/ycmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ YCMD – CLI Framework for Distributed Commands

LSK.js NPM version NPM downloads Package size Ask us in Telegram

⚑️ Framework for distributed commands on Yargs ⚑️

πŸš€ Production Ready: Battle-tested framework used in production environments
πŸ’Ž TypeScript: Full TypeScript support with strict type checking
⚑ Fast: Optimized for performance with minimal overhead
πŸ”§ Modular: Use only what you need, tree-shakeable packages
πŸ“¦ Well Documented: Comprehensive documentation and examples
🎯 Focused: Essential functionality without bloat

πŸ“¦ Packages

Package Version Size Description
ycmd npm size CLI framework for distributed commands on Yargs
@ycmd/commands npm size CLI commands for Ycmd framework (build, test, release, etc.)
@ycmd/creds npm size CLI tool for managing GitHub / GitLab secrets and credentials
@ycmd/spreadsheet npm size Download and convert Google Spreadsheets to various formats
@ycmd/run npm size Command execution utilities for Ycmd framework
@ycmd/spawn npm size Enhanced child process spawning with logging and error handling
@ycmd/helpers npm size Helper utilities for creating CLI applications with Ycmd framework
@ycmd/utils npm size Utility functions for Ycmd framework

πŸš€ Quick Start

Installation

# pnpm
pnpm add -g ycmd

# yarn
yarn global add ycmd

# npm
npm i -g ycmd

Basic Usage

Ycmd automatically discovers commands from multiple locations:

  • ./scripts directory
  • ./node_modules/ycmd/scripts directory
  • Custom script directories configured in ycmd.config.ts or package.json
# Run any discovered command
ycmd build
ycmd test
ycmd dev

Using Custom Configuration

You can use ycmd with file configurations or in a property inside your package.json, and you can even use TypeScript and have type-safety while you are using it.

INFO: Most of these options can be overwritten using the CLI options

You can use any of these files:

  • ycmd.config.ts
  • ycmd.config.js
  • ycmd.config.cjs
  • ycmd.config.json
  • ycmd property in your package.json

INFO: In all the custom files you can export the options either as ycmd, default or module.exports =

You can also specify a custom filename using the --config flag, or passing --no-config to disable config files.

Package.json

{
  "ycmd": {
    "concurrency": 20,
    "scripts": [
      "./scripts",
      "./node_modules/ycmd/scripts"
    ]
  }
}

TypeScript / JavaScript

export default {
  concurrency: 20,
  scripts: [
    "./scripts",
    "./node_modules/ycmd/scripts"
  ]
}

✨ Features

🎯 Ycmd Core

  • Command Discovery - Automatically discovers commands from multiple directories
  • Type-safe - Full TypeScript support with type checking
  • Flexible - Works with JavaScript, TypeScript, and shell scripts
  • Configurable - Multiple configuration options (file-based, package.json, CLI flags)

πŸ“ Commands

  • Build Commands - TypeScript, Babel, SWC, Docker, NestJS, and more
  • Development Commands - Watch mode, hot reload, development server
  • Testing Commands - Jest, ESLint, Uvu, Size Limit
  • Release Commands - Version bumping, changelog generation, publishing

πŸ” Creds

  • GitHub Integration - Manage GitHub secrets and variables
  • GitLab Integration - Manage GitLab secrets and variables
  • Encryption - Secure credential storage with libsodium
  • Recursive Mode - Manage credentials across monorepo packages

πŸ“Š Spreadsheet

  • Google Sheets - Download and convert Google Spreadsheets
  • Multiple Formats - CSV, JSON, YAML, and more
  • Data Transformation - Transform data with custom schemas
  • Type Safety - Full TypeScript support with Zod validation

πŸƒ Run

  • Command Execution - Execute commands with proper error handling
  • Monorepo Support - Run commands across monorepo packages
  • Parallel Execution - Run multiple commands in parallel
  • Shell Integration - Execute shell commands with proper logging

πŸ”§ Spawn

  • Enhanced Spawning - Improved child process spawning
  • Logging - Built-in logging for stdout and stderr
  • Error Handling - Proper error handling and reporting
  • Silent Mode - Support for silent execution

πŸ›  Helpers

  • CLI Creation - Utilities for creating CLI applications
  • Option Loading - Load and parse CLI options
  • Error Handling - Standardized error handling
  • Info Printing - Print formatted information and logos

πŸ“¦ Utils

  • Path Utilities - File and directory path utilities
  • File System - File system operations
  • Project Information - Get project metadata and information
  • Configuration - Load and parse configuration files
  • Environment - Environment variable utilities
  • Logging - Logging utilities

πŸ›  Development

# Install dependencies
pnpm install

# Build all packages
pnpm run build

# Run tests
pnpm run test

# Start development mode
pnpm run dev

# Release packages
pnpm run release

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork it (https://github.com/ycmds/ycmd/fork)
  2. Create your feature branch (git checkout -b features/fooBar)
  3. Commit your changes (git commit -am 'feat: Add some fooBar')
  4. Push to the branch (git push origin features/fooBar)
  5. Create a new Pull Request

πŸ“ License

MIT Β© Igor Suvorov

πŸ”— Links


@ycmd – Framework for distributed commands on Yargs 🎯

About

CLI Framework for Distributed Commands

Resources

License

Stars

Watchers

Forks

Packages

No packages published