https://github.com/pr0ngledev/commands
A crystal shard for simple, skiddie friendly UNIX command execution
https://github.com/pr0ngledev/commands
commands crystal crystal-lang
Last synced: about 1 year ago
JSON representation
A crystal shard for simple, skiddie friendly UNIX command execution
- Host: GitHub
- URL: https://github.com/pr0ngledev/commands
- Owner: Pr0ngleDev
- License: mit
- Created: 2025-03-05T18:45:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-05T18:48:13.000Z (about 1 year ago)
- Last Synced: 2025-03-05T19:37:21.495Z (about 1 year ago)
- Topics: commands, crystal, crystal-lang
- Language: Crystal
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# commands
commands is a Skiddie-friendly Crystal Shard to make it easier to execute commands.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
commands:
github: Pr0ngleDev/commands
```
2. Run `shards install`
## Usage
```crystal
require "commands"
```
execCommand can be used to execute a bash command and receive its output
```crystal
.execCommand("Hello World") # Returns Hello World
```
execProscess can be used to execute a bash command and recieve its error code
``` crystal
.execProcess("echo Hello World") # Returns 0
```
## Examples
``` crystal
foo = .executeCommand("echo foo")
puts foo
```
This would print foo to the stdout
```crystal
foo = .executeCommand("echo haha")
puts foo.reverse
```
This would print ahah to the stdout
## Contributors
- [Prongle](https://github.com/Pr0ngleDev) - creator and maintainer