Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/fnPublic

The fn CLI

License

NotificationsYou must be signed in to change notification settings

fn-go/fn

Repository files navigation


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 helloHello, World

Getting Started

go install github.com/go-fn/fn

Features

✨ Functionality

FeatureExplanation
uiAn interactive UI that makes runningfn easy, fun, and informative
cliPOSIX compliant cli for use with automation
templatingLeverage Go Templates as an alternative to shell commands
includeInclude content from local or remotefnfile.yml files.
outputsTired 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.
watchIntegration withviddy to watch afn
fwatchIntegration withfsnotify to provide "rerun" functionality when files change
src/genFingerprint files between runs, useful to skip expensive steps

🔑 Keywords

KeywordDescription
fnA series of steps (aka function)
stepAn abstract behavior
shAstep that runs ashell command
doAstep that runs other steps in sequence
parallelAstep that runs other steps in parallel
deferAstep that is run when the surroundfn completes (success or failure)
matrixDynamically defined steps
returnAstep that triggers the parent step to end early (such as when part of ado)
varAlazily evaluated (then optionally memoized/cached) value
ctxA collection of values that are available at different points in anfnfile
nsA namespace forfn's
serialgroupControl concurrency ofstep's orfn's through labelling

Contributing

TBD

Roadmap

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

Attribution

Function icons created by Freepik - Flaticon


[8]ページ先頭

©2009-2025 Movatter.jp