All Projects → infinitered → Gluegun

infinitered / Gluegun

Licence: mit
A delightful toolkit for building TypeScript-powered command-line apps.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
EJS
674 projects

Projects that are alternatives of or similar to Gluegun

Creater
create file with config
Stars: ✭ 12 (-99.45%)
Mutual labels:  cli, toolkit
Swiggy Analytics
Analyse your swiggy orders 🍔
Stars: ✭ 163 (-92.53%)
Mutual labels:  cli
Ttab
macOS and Linux CLI for opening a new terminal tab/window, optionally with a command to execute and/or display settings
Stars: ✭ 160 (-92.67%)
Mutual labels:  cli
Paris
Logger in Rust for pretty colors and text in the terminal. Aiming for a relatively simple API
Stars: ✭ 162 (-92.58%)
Mutual labels:  cli
Cistern
A terminal UI for Unix to monitor Continuous Integration pipelines from the command line. Current integrations include GitLab, Azure DevOps, Travis CI, AppVeyor and CircleCI.
Stars: ✭ 161 (-92.62%)
Mutual labels:  cli
Prettier Stylelint
code > prettier > stylelint > formatted code
Stars: ✭ 162 (-92.58%)
Mutual labels:  cli
Webtau
Webtau (short for web test automation) is a testing API, command line tool and a framework to write unit, integration and end-to-end tests. Test across REST-API, Graph QL, Browser, Database, CLI and Business Logic with consistent set of matchers and concepts. REPL mode speeds-up tests development. Rich reporting cuts down investigation time.
Stars: ✭ 156 (-92.85%)
Mutual labels:  cli
Netctl
Profile based systemd network management
Stars: ✭ 163 (-92.53%)
Mutual labels:  cli
Mqtt Sn Tools
Command line tools written in C for the MQTT-SN (MQTT for Sensor Networks) protocol
Stars: ✭ 162 (-92.58%)
Mutual labels:  cli
Tty Table
A flexible and intuitive table generator
Stars: ✭ 161 (-92.62%)
Mutual labels:  cli
Table rex
An Elixir app which generates text-based tables for display
Stars: ✭ 161 (-92.62%)
Mutual labels:  cli
Domain Cli
Search domain names if registered or not in terminal
Stars: ✭ 161 (-92.62%)
Mutual labels:  cli
Serverless Secrets
An opinionated tool for safely managing and deploying Serverless projects and their secrets.
Stars: ✭ 162 (-92.58%)
Mutual labels:  cli
Erppeek
A versatile tool for Odoo / OpenERP. *** Forked as Odooly ⟶
Stars: ✭ 160 (-92.67%)
Mutual labels:  cli
Knctl
Knative CLI
Stars: ✭ 163 (-92.53%)
Mutual labels:  cli
Git Machete
Probably the sharpest git repository organizer & rebase/merge workflow automation tool you've ever seen ;)
Stars: ✭ 158 (-92.76%)
Mutual labels:  cli
Mobile Toolkit
📱 Shell scripts for Android and iOS device management
Stars: ✭ 161 (-92.62%)
Mutual labels:  toolkit
Hugo Academic Cli
📚 Import academic publications from Bibtex to Hugo
Stars: ✭ 158 (-92.76%)
Mutual labels:  cli
Ionic Cli
The Ionic command-line interface
Stars: ✭ 1,967 (-9.89%)
Mutual labels:  cli
Vue Multiple Page
vue + webpack 多页/单页 脚手架
Stars: ✭ 163 (-92.53%)
Mutual labels:  cli

npm module CircleCI code style: prettier

Gluegun

gluegun

Gluegun is a delightful toolkit for building Node-based command-line interfaces (CLIs) in TypeScript or modern JavaScript, with support for:

🌯 parameters - command-line arguments and options
🎛 template - generating files from templates
🗄 patching - manipulating file contents
💾 filesystem - moving files and directories around
system - executing other command-line scripts
🎅 http - interacting with API servers
🛎 prompt - auto-complete prompts
💃 print - printing pretty colors and tables
👩‍✈️ semver - working with semantic versioning
🎻 strings - manipulating strings & template data
📦 packageManager - installing NPM packages with Yarn or NPM

In addition, gluegun supports expanding your CLI's ecosystem with a robust set of easy-to-write plugins and extensions.

Why use Gluegun?

You might want to use Gluegun if:

  • You need to build a CLI app
  • You want to have powerful tools at your fingertips
  • And you don't want to give up flexibility at the same time

If so ... welcome!

Quick Start

Just run the gluegun CLI like this:

# spin up your new CLI
npx gluegun new movies

# choose TypeScript or Modern JavaScript
# now jump into the source
cd movies

# and link your new executable
yarn link

# and run it!
movies help

You should see your new CLI help. Open the folder in your favorite editor and start building your CLI!

Code

Let's start with what a gluegun CLI looks like.

// in movie/src/cli.[js|ts]...

// ready
const { build } = require('gluegun')

// aim
const movieCLI = build('movie')
  .src(`${__dirname}/core-plugins`)
  .plugins('node_modules', { matching: 'movie-*' })
  .help()
  .version()
  .defaultCommand()
  .create()

// fire!
movieCLI.run()

Commands

Commands are simple objects that provide a name, optional aliases, and a function to run.

// in movie/src/commands/foo.js
module.exports = {
  name: 'foo',
  alias: 'f',
  run: async function(toolbox) {
    // gluegun provides all these features and more!
    const { system, print, filesystem, strings } = toolbox

    // ...and be the CLI you wish to see in the world
    const awesome = strings.trim(await system.run('whoami'))
    const moreAwesome = strings.kebabCase(`${awesome} and a keyboard`)
    const contents = `🚨 Warning! ${moreAwesome} coming thru! 🚨`
    const home = process.env['HOME']
    filesystem.write(`${home}/realtalk.json`, { contents })

    print.info(`${print.checkmark} Citius`)
    print.warning(`${print.checkmark} Altius`)
    print.success(`${print.checkmark} Fortius`)
  }
}

See the toolbox api docs for more details on what you can do.

See the runtime docs for more details on building your own CLI and join us in the #gluegun channel of the Infinite Red Community Slack (community.infinite.red) to get friendly help!

Who Is Using This?

What's under the hood?

We've assembled an all-star cast of libraries to help you build your CLI.

⭐️ ejs for templating
⭐️ semver for version investigations
⭐️ fs-jetpack for the filesystem
⭐️ yargs-parser, enquirer, colors, ora and cli-table3 for the command line
⭐️ axios & apisauce for web & apis
⭐️ cosmiconfig for flexible configuration
⭐️ cross-spawn for running sub-commands
⭐️ execa for running more sub-commands
⭐️ node-which for finding executables
⭐️ pluralize for manipulating strings

Node.js 8.0+ is required. If you need to support Node 7.6, use Gluegun 3.x.

Community CLIs and Plugins

Here are a few community CLIs based on Gluegun plus some plugins you can use. Is yours missing? Send a PR to add it!

Sponsors

Gluegun is sponsored by Infinite Red, a premium custom mobile app and web design and development agency. We are a team of designers and developers distributed across the USA and based near Portland, Oregon. Our specialties are UI/UX design, React and React Native, Node, and more. Email [email protected] if you'd like to talk about your project!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].