https://github.com/rawnly/btt-cli
Like a mix about "mkdir -p" and "touch" but crossplatform.
https://github.com/rawnly/btt-cli
btt-cli commandline crossplatform node nodejs
Last synced: about 1 month ago
JSON representation
Like a mix about "mkdir -p" and "touch" but crossplatform.
- Host: GitHub
- URL: https://github.com/rawnly/btt-cli
- Owner: rawnly
- Created: 2017-05-06T11:59:03.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-06T12:37:55.000Z (about 9 years ago)
- Last Synced: 2025-05-19T11:46:02.348Z (about 1 year ago)
- Topics: btt-cli, commandline, crossplatform, node, nodejs
- Language: JavaScript
- Homepage: https://rawnly.com
- Size: 175 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BTT CLI

> Better "touch" command.
## Installation
To install **btt-cli** be sure to have installed **npm** or **yarn**.
```bash
$ node --version
```
If no errors let's install **btt-cli** with the following comand:
```bash
$ npm install btt-cli --global
# or "shorter flags"
$ npm i -g btt-cli
# or with YARN
$ yarn global add btt-cli
```
## How
```bash
$ btt [path]/ [...content]
```
## Why ?
> Why use **btt-cli** instead the traditional `touch filename` or the classic `echo > filename`?
Because **btt** provides to create the path if it doesn't exitst yet and it **doesn't overwrite** files.
**Example**:
```bash
$ touch myCoolProject/www/index.html
# Now if the path 'myCoolProject/www' doesn't exists "touch" will return error.
$ echo >> myCoolProject/www/index.html "
Title
"
# This will return the same error
```
But here comes _this commandline_, **btt** will create the path and with btt you can also write into files as like `echo`, is like a mix of `echo` and `mdkir -p` commands.
**Example with btt:**
```bash
$ btt myCoolProject/www/index.html "
Title
"
# You can also write without “”
$ btt Note/myFirstNote.txt Hey, this is my note!
# This will write a file with
# the phrase "Hey, this is my note!".
```
## Platforms
This `commandline` should work over all platforms but unfortunately right now i can't test it over all them.
### Tested on
- [x] macOS Sierra [10.12.13]
- [ ] Linux systems
- [ ] Windows systems
Written in ❤️ with NodeJS & Atom Text Editor by @Rawnly