Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/winebarrel/kasa
CLI for esa.io.
https://github.com/winebarrel/kasa
esa-io golang
Last synced: 21 days ago
JSON representation
CLI for esa.io.
- Host: GitHub
- URL: https://github.com/winebarrel/kasa
- Owner: winebarrel
- License: mit
- Created: 2021-11-30T18:34:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-16T16:36:52.000Z (about 2 months ago)
- Last Synced: 2024-10-08T10:20:37.364Z (about 1 month ago)
- Topics: esa-io, golang
- Language: Go
- Homepage:
- Size: 257 KB
- Stars: 15
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# kasa ☂️
[![CI](https://github.com/winebarrel/kasa/actions/workflows/ci.yml/badge.svg)](https://github.com/winebarrel/kasa/actions/workflows/ci.yml)
CLI for [esa.io](https://esa.io/).
![](https://user-images.githubusercontent.com/117768/149801227-d64d4895-50a4-4dde-bc9e-b27950a99b81.gif)
## Usage
```
Usage: kasa --team=STRING --token=STRINGFlags:
-h, --help Show context-sensitive help.
--version
--team=STRING esa team ($ESA_TEAM)
--token=STRING esa access token ($ESA_TOKEN)
--debug Debug flag.Commands:
append --team=STRING --token=STRING --body=STRING
Append text to a post.cat --team=STRING --token=STRING
Print a post.comment --team=STRING --token=STRING --body=STRING
Comment on a post.cp --team=STRING --token=STRING
Copy posts.edit --team=STRING --token=STRING --editor=STRING
Edit a post.import --team=STRING --token=STRING
Import a file or directory.info --team=STRING --token=STRING
Show a post info.ls --team=STRING --token=STRING []
List posts.mv --team=STRING --token=STRING
Move posts.mvcat --team=STRING --token=STRING
Rename a category.open --team=STRING --token=STRING
Open a post in the browser.post --team=STRING --token=STRING []
Create/Update a post.rm --team=STRING --token=STRING
Delete posts.rmi --team=STRING --token=STRING
Delete a post by number.search --team=STRING --token=STRING
Search posts.stats --team=STRING --token=STRING
Print team statistics.tag --team=STRING --token=STRING
Tagging posts.tags --team=STRING --token=STRING
Print tags.touch --team=STRING --token=STRING
Create an empty post.unwip --team=STRING --token=STRING
Unwip posts.wip --team=STRING --token=STRING
Make posts WIP.install-completions --team=STRING --token=STRING
Install shell completionsRun "kasa --help" for more information on a command.
```### Example
```sh
$ export ESA_TEAM=winebarel
$ export ESA_TOKEN=...$ kasa ls
2021-09-07 11:07:44 - https://winebarrel.esa.io/posts/1 README$ echo hello | kasa post -b - -n title -c foo/bar
https://winebarrel.esa.io/posts/38$ kasa cat foo/bar/title
hello$ echo world | kasa post 38 -b -
https://winebarrel.esa.io/posts/38$ kasa cat foo/bar/title
world$ kasa mv foo/bar/ zoo/
mv 'foo/bar/title' 'zoo/'
Do you want to move posts? (y/n) [n]: y$ kasa ls
2021-09-07 11:07:44 - https://winebarrel.esa.io/posts/1 README
2022-01-09 09:47:24 WIP https://winebarrel.esa.io/posts/38 zoo/title$ kasa ls zoo/
2022-01-09 09:47:24 WIP https://winebarrel.esa.io/posts/38 zoo/title$ kasa post foo/bar/title -t tagA
https://winebarrel.esa.io/posts/38$ kasa ls '#tagA'
2022-01-09 09:47:24 WIP https://winebarrel.esa.io/posts/38 zoo/title [#tagA]$ kasa mv '#tagA' baz/
mv 'zoo/title' 'baz/'
Do you want to move posts? (y/n) [n]: y$ kasa ls
2021-09-07 11:07:44 - https://winebarrel.esa.io/posts/1 README
2022-01-09 09:47:24 WIP https://winebarrel.esa.io/posts/38 baz/title [#tagA]$ kasa rm baz/
rm 'baz/title'
Do you want to delete posts? (y/n) [n]: y$ kasa ls
2021-09-07 11:07:44 - https://winebarrel.esa.io/posts/1 README$ kasa edit any/new/post
https://winebarrel.esa.io/posts/39$ echo hello | kasa import - any/import/post
https://winebarrel.esa.io/posts/40$ date > hello
$ kasa import hello any/import/
https://winebarrel.esa.io/posts/41$ kasa ls any/import/
2023-08-18 10:12:00 - https://winebarrel.esa.io/posts/40 any/import/post
2023-08-18 10:12:30 - https://winebarrel.esa.io/posts/41 any/import/hello$ mkdir foo/
$ touch foo/bar.txt
$ mkdir foo/zoo
$ touch foo/zoo/baz.txt$ kasa import ./foo/ any/import2/
https://winebarrel.esa.io/posts/42 any/import2/bar.txt
https://winebarrel.esa.io/posts/43 any/import2/zoo/baz.txt$ kasa ls any/import2/
2023-08-18 10:32:00 - https://winebarrel.esa.io/posts/42 any/import2/bar.txt
2023-08-18 10:22:30 - https://winebarrel.esa.io/posts/43 any/import2/zoo/baz.txt
```## Installation
```sh
# OSX or Linux
brew install winebarrel/kasa/kasa
```## Install shell completions
```sh
kasa install-completions >> ~/.zshrc
```