- Notifications
You must be signed in to change notification settings - Fork0
fn-go/fn
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Introduction •Getting Started •Contributing •Roadmap
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.
An example to get you started:
fnfile.yml
version:'0.1'fns:hello:echo "Hello, World!"
❯ fn helloHello, World
go install github.com/go-fn/fn
Feature | Explanation |
---|---|
ui | An interactive UI that makes runningfn 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 remotefnfile.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 withviddy to watch afn |
fwatch | Integration withfsnotify to provide "rerun" functionality when files change |
src/gen | Fingerprint files between runs, useful to skip expensive steps |
Keyword | Description |
---|---|
fn | A series of steps (aka function) |
step | An abstract behavior |
sh | Astep that runs ashell command |
do | Astep that runs other steps in sequence |
parallel | Astep that runs other steps in parallel |
defer | Astep that is run when the surroundfn completes (success or failure) |
matrix | Dynamically defined steps |
return | Astep that triggers the parent step to end early (such as when part of ado ) |
var | Alazily evaluated (then optionally memoized/cached) value |
ctx | A collection of values that are available at different points in anfnfile |
ns | A namespace forfn 's |
serialgroup | Control concurrency ofstep 's orfn 's through labelling |
TBD
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 |