Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Symfony Console Form | 360 | 22 | 7 | a year ago | 33 | August 19, 2022 | 4 | mit | PHP | |
Use Symfony forms for Console command input | ||||||||||
Fui | 272 | 1 | a year ago | 9 | June 10, 2022 | 1 | mit | Rust | ||
Add CLI & form interface to your program. Docs: https://docs.rs/fui | ||||||||||
Agda Mode Vscode | 154 | a month ago | 44 | mit | ReScript | |||||
agda-mode on VS Code | ||||||||||
Uibooster | 95 | a month ago | 5 | gpl-3.0 | Java | |||||
🚀 Creates fast and easy dialogs for utility tools | ||||||||||
Angular Reactive Forms Validate Submit | 84 | 4 years ago | 10 | TypeScript | ||||||
React Progress Form | 77 | 6 years ago | 1 | JavaScript | ||||||
Progress Form Example with React | ||||||||||
Angular Forms Example | 75 | 5 years ago | 2 | TypeScript | ||||||
Real world reactive form example | ||||||||||
Ember Cli Form Data | 61 | 20 | 2 years ago | 19 | November 30, 2021 | 25 | mit | JavaScript | ||
Ember CLI addon that adds FormData file uploads to Ember Data | ||||||||||
Rff Cli Example | 44 | 4 years ago | 2 | May 03, 2019 | 1 | JavaScript | ||||
An example of how to use 🏁 React Final Form in a CLI application with Ink | ||||||||||
Nba Team App | 41 | 5 years ago | 2 | TypeScript | ||||||
Demo app to show how to use nested reactive forms in Angular |
Add CLI & form interface to your program.
[dependencies]
fui = "2.1"
clap
(experimental)extern crate clap;
extern crate fui;
use clap::{App, Arg};
use fui::Fui;
use std::env;
// regular clap code
let app = App::new("some-app").arg(
Arg::with_name("some-switch")
.long("arg-long")
.help("arg-help"),
);
// extra fui code
let mut _arg_vec: Vec<String> = env::args().collect();
if _arg_vec.len() <= 1 {
_arg_vec = Fui::from(&app).get_cli_input();
}
// regular clap code
let matches = app.get_matches_from(_arg_vec);
clap
// Example showing imagined CLI app. with two actions
#[macro_use]
extern crate clap;
extern crate fui;
use fui::{Fui, Value};
use fui::form::FormView;
use fui::fields::Text;
fn hdlr(v: Value) {
println!("user input (from fn) {:?}", v);
}
fn main() {
Fui::new(crate_name!())
.action(
"action1",
"help for action1",
FormView::new().field(Text::new("action1-data").help("help for action1 data")),
|v| {
println!("user input (from closure) {:?}", v);
},
)
.action(
"action2",
"help for action2",
FormView::new().field(Text::new("action2-data").help("help for action2 data")),
hdlr,
)
.version(crate_version!())
.about(crate_description!())
.author(crate_authors!())
.run();
}
This will make the program automatically working in 2 modes:
Ready for parsing CLI arguments, like here:
$ ./app_basic -h
app_basic 1.0.0
xliiv <[email protected]>
An Example program which has CLI & form interface (TUI)
USAGE:
app_basic [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
action1 help for action1
action2 help for action2
help Prints this message or the help of the given subcommand(s)
Ready for getting user input from easy and discoverable TUI interface, like image below:
.validator(OneOf || Regex::new("v\d+\.\d+\.\d+")).unwrap()
?views::Autocomplete
& views::Multiselect
with a new implementation of
Autocomplete
# create a new branch with updated files, similarly to the following
# https://github.com/xliiv/fui/commit/b44577541ee9b965b0b1e67169cac46222317901
git checkout -b vx.x.x # where vx.x.x is e.g. v1.0.0
git commit -m "Bump version to vx.x.x"
# login as here https://doc.rust-lang.org/cargo/reference/publishing.html
cargo login
# check if branch is correct
cargo publish --dry-run
# if OK, then publish
cargo publish
# push the branch
git push origin vx.x.x
# merge the vx.x.x branch created a few steps before
# tag branch
git tag -a "vx.x.x" -m "Tag vx.x.x"