This project is a command-line interface (CLI) application developed in Go, leveraging the powerful Cobra library. The primary objective of this application is to facilitate the storage and management of family tree information. Utilizing the sqlite3 database library ensures a reliable foundation for storing and retrieving crucial details. The application features a user-friendly interface, providing a seamless experience for users to organize and access essential information within their family tree.
adds names and roles
Subcommand to add names of family members and roles of them. For example: // adds a person in family family-tree add person john
// adds an role entry e.g father, mother, son, daughter family-tree add role father
family-tree add [flags]
-h, --help help for add
- family-tree - family tree utility CLI app
- family-tree add person - adds person
- family-tree add role - adds role
adds person
Subcommand to add persons (duplicate not allowed). For example: // adds a person in family family-tree add person [person-name]
family-tree add person [flags]
-h, --help help for person
- family-tree add - adds names and roles
adds role
Subcommand to add roles (duplicate not allowed). For example: // adds role of a person // allowed roles [father, mother, son, daughter, brother, sister, wife, husband] family-tree add role [role-name]
family-tree add role [flags]
-h, --help help for role
- family-tree add - adds names and roles
Generate the autocompletion script for bash
Generate the autocompletion script for the bash shell.
This script depends on the 'bash-completion' package. If it is not installed already, you can install it via your OS's package manager.
To load completions in your current shell session:
source <(family-tree completion bash)
To load completions for every new session, execute once:
family-tree completion bash > /etc/bash_completion.d/family-tree
family-tree completion bash > $(brew --prefix)/etc/bash_completion.d/family-tree
You will need to start a new shell for this setup to take effect.
family-tree completion bash
-h, --help help for bash
--no-descriptions disable completion descriptions
- family-tree completion - Generate the autocompletion script for the specified shell
Generate the autocompletion script for fish
Generate the autocompletion script for the fish shell.
To load completions in your current shell session:
family-tree completion fish | source
To load completions for every new session, execute once:
family-tree completion fish > ~/.config/fish/completions/family-tree.fish
You will need to start a new shell for this setup to take effect.
family-tree completion fish [flags]
-h, --help help for fish
--no-descriptions disable completion descriptions
- family-tree completion - Generate the autocompletion script for the specified shell
Generate the autocompletion script for the specified shell
Generate the autocompletion script for family-tree for the specified shell. See each sub-command's help for details on how to use the generated script.
-h, --help help for completion
- family-tree - family tree utility CLI app
- family-tree completion bash - Generate the autocompletion script for bash
- family-tree completion fish - Generate the autocompletion script for fish
- family-tree completion powershell - Generate the autocompletion script for powershell
- family-tree completion zsh - Generate the autocompletion script for zsh
Generate the autocompletion script for powershell
Generate the autocompletion script for powershell.
To load completions in your current shell session:
family-tree completion powershell | Out-String | Invoke-Expression
To load completions for every new session, add the output of the above command to your powershell profile.
family-tree completion powershell [flags]
-h, --help help for powershell
--no-descriptions disable completion descriptions
- family-tree completion - Generate the autocompletion script for the specified shell
Generate the autocompletion script for zsh
Generate the autocompletion script for the zsh shell.
If shell completion is not already enabled in your environment you will need to enable it. You can execute the following once:
echo "autoload -U compinit; compinit" >> ~/.zshrc
To load completions in your current shell session:
source <(family-tree completion zsh)
To load completions for every new session, execute once:
family-tree completion zsh > "${fpath[1]}/_family-tree"
family-tree completion zsh > $(brew --prefix)/share/zsh/site-functions/_family-tree
You will need to start a new shell for this setup to take effect.
family-tree completion zsh [flags]
-h, --help help for zsh
--no-descriptions disable completion descriptions
- family-tree completion - Generate the autocompletion script for the specified shell
connects two person
Subcommand to connect two persons with a relationship. For example: // connects two persons of a family family-tree connect [person1] --as brother --of [person2]
// default gender of person2 is male if it isn't specify it with --person2-gender or -g family-tree connect [person1] --as brother --of [person2] --person2-gender female
family-tree connect [flags]
-a, --as string specifies the role of the person
-h, --help help for connect
-o, --of string specifies the relation with person2
-g, --person2-gender string specifies gender of person2 (default "male")
- family-tree - family tree utility CLI app
counts relatives
Subcommand to count relatives by their roles. For example: // count sons family-tree count sons --of [person]
// count daughters family-tree count daughters --of [person]
family-tree count [flags]
-h, --help help for count
-o, --of string specifies the person
-g, --person-gender string specifies person gender (default "male")
- family-tree - family tree utility CLI app
shows father name
Subcommand to find father name. For example: family-tree father --of [person]
family-tree father [flags]
-h, --help help for father
-o, --of string specifies person name
- family-tree - family tree utility CLI app
family tree utility CLI app
An utility tool to create and view family tree records.
family-tree [flags]
-h, --help help for family-tree
- family-tree add - adds names and roles
- family-tree completion - Generate the autocompletion script for the specified shell
- family-tree connect - connects two person
- family-tree count - counts relatives
- family-tree father - shows father name