Giter VIP home page Giter VIP logo

clunk's Introduction

Clunk

Clunk

clunk is a command line application for interacting generically with APIs in a data centric manner while still embracing command line ergonomics. Clunk seeks equal ergonomics for humans and robots alike.

Principals

For humans, Clunk provides very discoverable completions. Not sure what the name is for an entity in an API? Press tab and Clunk will present options to your shell.

For robots, Clunk provides the same discoverable completions programatically, as well as pipe-able data forms.

Clunk favors a noun + verb approach. The entities for things in a given data ecosystem rarely have aliased names, but the operations performed on them tend to vary wildly. For example, you can “run” a program, but there is also “launch”, “open”, “execute”, “start”, and others. In Clunk’s vernacular, you would use something like clunk program run.

Why the name Clunk?

Clunk stands for Command Line Universal Names Are Hard.

It also didn’t seem to be taken as of [2024-05-18 Sat].

Why not use existing CLI tools?

By existing CLI tools, we mean just about any <name-of-api>-api tool. But this can also refer to other sources that aren’t just wrappers around HTTP APIs.

Clunk can potentially harness these tools, but more importantly it seeks a standard means of utilizing them, both via its interface but also via data centric operations. In other words, Clunk provides both a better and more consistent means of interacting with data sets.

In doing so, Clunk becomes universal automation glue.

Usage

Installing

Unfortunately this project is in its infancy. To install it, clone the repository and use cargo run to execute Clunk. Instructions for producing a binary that can be utilized on your system are forthcoming, but can also be found with your favorite search tool by qualifying the search with rust.

Roadmap

1. Elementary Particle [0/6]

This is the earliest, usable state of Clunk. It’s expected to only be usable by the author in the narrowest of circumstances.

At this stage, we simply seek to add one HTTP API that the author frequently uses, to start leveraging its usefulness. This will be the Stash / Bitbucket Server / Bitbucket Datacenter API. It will only approve pull requests, and list open pull requests.

Parse arguments

Read API Token

Use the same trick in jj to evaluate a token. Use a yaml file for configuration. TOML has been found to be too rigid for many configuration uses.

Provide JSON output

Condensed, single line form is to be used. Pretty form can come later.

Provide human (tabular) output

Get Stash pull requests

Get Stash users

2. Atom [0/2]

This is where Clunk should begin to show some promise to the earliest of adopters, but adopters are not expected.

Allow completions based on the number of arguments already provided

The rough form should look like this:

$ clunk stash <tab>
pr
user

And then further still:

$ clunk stash pr <tab>
n: author
n: approval
v: approve
v: show

And then the final command would look like:

$ clunk stash pr show

Or a more sophisticated version:

$ clunk stash pr author <tab>
v: list
v: show

Further developing to:

$ clunk stash pr author list
| username       | display-name   | <other fields> |
|----------------+----------------+----------------|
| alice.aliceton | Alice Aliceton | ...            |
| bob.bobson     | Bob Bobson     | ...            |

Use repeatable -v argument to increase logging verbosity

3. Molecule

Roughly:

  1. Expand uses for Stash.
  2. Possibly include other APIs.

4. Speck

  1. Break out data sources into their own plugins.
  2. Create a standardized mechanism to consume plugins. This will use stdin and stdout pipes / sockets to communicate, allowing any ecosystem to provide plugins for Clunk, and not just something that happens to be able to link to this Rust program today. a. Send commands to plugins to gather data. b. Receive data from plugins. c. Receive errors from plugins. d. Query plugin for capabilities. e. Define registration configuration for plugins. f. Provide plugin with configuration.

5. Mote

Add lots of plugins.

COMMENT

clunk's People

Contributors

loganbarnett avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.