GithubHelp home page GithubHelp logo

fn-go / fn Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 164 KB

The fn CLI

Home Page: https://fngo.dev

License: Apache License 2.0

Go 100.00%
devops devops-tools fn functions go golang make task task-runner fnfile

fn's Introduction


github.com/go-fn/fn
Fn

IntroductionGetting StartedContributingRoadmap

Introduction

Fn is a "function-oriented" general purpose automation tool that aims to be simpler and more flexible than similar tools such as Make, Task, and Rake.

Fn aims to have a human-centered design, with emphasis on usability and aesthetics.

Even the smartest among us can feel inept as we fail to figure out which light switch or oven burner to turn on, or whether to push, pull, or slide a door. The fault lies not in ourselves, but in product design that ignores the needs of users and the principles of cognitive psychology.

The problems range from ambiguous and hidden controls to arbitrary relationships between controls and functions, coupled with a lack of feedback or other assistance and unreasonable demands on memorization.

The rules are simple: make things visible, exploit natural relationships that couple function and control, and make intelligent use of constraints.

The goal: guide the user effortlessly to the right action on the right control at the right time.

-- The Design of Everyday Things

An example to get you started:

fnfile.yml

version: '0.1'
fns:
  hello: echo "Hello, World!"
❯ fn hello
Hello, World

Getting Started

go install github.com/go-fn/fn

Features

✨ Functionality

Feature Explanation
ui An interactive UI that makes running fn easy, fun, and informative
cli POSIX compliant cli for use with automation
templating Leverage Go Templates as an alternative to shell commands
include Include content from local or remote fnfile.yml files.
outputs Tired of reading walls of log output? Fn supports a wide range of options for how output is presented, so you can find what you need, and move on.
watch Integration with viddy to watch a fn
fwatch Integration with fsnotify to provide "rerun" functionality when files change
src/gen Fingerprint files between runs, useful to skip expensive steps

🔑 Keywords

Keyword Description
fn A series of steps (aka function)
step An abstract behavior
sh A step that runs a shell command
do A step that runs other steps in sequence
parallel A step that runs other steps in parallel
defer A step that is run when the surround fn completes (success or failure)
matrix Dynamically defined steps
return A step that triggers the parent step to end early (such as when part of a do)
var A lazily evaluated (then optionally memoized/cached) value
ctx A collection of values that are available at different points in an fnfile
ns A namespace for fn's
serialgroup Control concurrency of step's or fn's through labelling

Contributing

TBD

Roadmap

Status Goal Labels
Create RoadMap
🚧 Implement Basic Step Types alpha
- Sh (shell out) alpha
- Do (serial steps) alpha
- Parallel (parallel steps) alpha
- Defer (end of parent) alpha
🚧 - Fn (call another function) alpha
🚧 Vars Support alpha
🚧 Env Support alpha
🚧 Ctx Support alpha
🚧 Templating Support alpha
- CLI Args Support alpha
- Linear Output (log-like) alpha
- Progress/Spinner Output alpha
- Robust Documentation (follows the code) alpha
- BubbleTea based UI beta
- Viddy/Watch Integration beta
- FSNotify Integration beta
- Implement Advanced Step Types beta
- - Matrix (dynamic steps based on combination matrix) beta
- - Return (end early) beta
- Other Advanced Features beta
- - Ns (namespaces/includes) beta
- - SerialGroups (for use with parallel) beta
- - Inputs/Outputs (for functions) beta

Attribution

Function icons created by Freepik - Flaticon

fn's People

Contributors

ghostsquad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.