Simple NPM package to create code snippets in different languages
⚠️ This package is in very early development! DO NOT USE
.go
: GoLang.js|ts
: JavaScript/TypeScript (NodeJS).php
: PHP.py
: Python.rb
: Ruby.rs
: Rust.sh
: Bash
┌──(root㉿cowboy)-[~/cowboy]
└─# cowboy fiddle.all
GoLang (go1.18.2): Hello World!
Node (v18.2.0): Hello World!
PHP (8.1.5): Hello World!
Python (v3.10.4): Hello World!
Ruby (3.0.3): Hello World!
Rust (v0.1.0): Hello World!
Bash (5.1.16(1)-release): Hello World!
Node (v18.2.0): Hello World!
./restart.sh
Make the command global
Link
cd /path/to/this/repo
npm link
Unlink
npm unlink cowboy
cowboy <command>
: Run a command (or create)cowboy list
: List all available commandscowboy open <command>
: Open the command in code editorcowboy new <command>
: Create a new commandcowboy clone <public-repo-url>
: Clone a public repositorycowboy fiddle(.[all, *])
: Sample fiddle based on language extension (optional)cowboy tinker(.[py,sh])
: Tinker based on the language extension (optional)
Some rough notes while shaping the project
- Dockerize (partially implemented)
- Protect against potential vulnerabilities
- Add tests for core modules
- ...
- Git integration: Enable easy integration with open source git repos. For example)
cowboy clone git@github.com:org/repo.git
- Cross-platform OS support, consider core overrides per OS
- Convert core/local packages to pull requests for main repo. For example)
cowboy publish <command>
- Integration with https://github.com/charmbracelet/charm
- ...