Skip to content
/ tfb Public

Terminal Fret Board: A CLI tool that display guitar chords and scales in the terminal

Notifications You must be signed in to change notification settings

SachaCR/tfb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Fret Board

A CLI tool that display guitar chords and scales in the terminal. It is built to supports any kind of instrument that has strings with frets.

It's one more reason to stay in your terminal.

TFB command

By default the tfb command is interactive, allowing you to search for a given mode and root note.

  • use up and down to browse the list.
  • use left and right to change the root note.
  • use / to fuzzy search a mode name.
  • use esc to reset the UI.
  • use g, u, b to switch instrument (Guitar, Ukulele, Bass)

Tips: hjkl are supported too.

tfb demo gif

But you can also pass argument like this

tfb ionian -r D : This will directly render the diagram to the standard output.

Custom Tuning

You can represent any tuning and neck by using the --tuning, -t flag:

  • tfb --tuning D-A-D-G-B-E: This would render a neck in Drop D.

You can also add or remove strings:

  • tfb -t B-E-A-D-G-B-E: 7 strings guitar tuning

Chords

$ tfb chord 0-2-2-0-0-0 

Will display:

E 0╓────┬────┬────┬─
B 0╟────┼────┼────┼─
G 0╟────┼────┼────┼─
D  ╟────┼─⬤─┼────┼─
A  ╟────┼─⬤─┼────┼─
E 0╙────┴────┴────┴─

Print chords that you pass in argument. Example: 0-2-2-0-0-0

Use x to mute strings. Example x-x-0-2-3-2

E  ╓────┬─⬤─┬────┬─
B  ╟────┼────┼─🔴─┼─
G  ╟────┼─⬤─┼────┼─
D 0╟────┼────┼────┼─
A x╟────┼────┼────┼─
E x╙────┴────┴────┴─

Usage: tfb chord [flags]

Flags:

-h, --help help for chord

-n, --name string Give a chord name like Major7 or m7b5

-r, --root string Set the root of your chord. Example: C, D#, Bb...

Scales

$ ./tfb scale C-D-E-F-G-A-B

Will display:

E  ╓─⬤─┬────┬─⬤─┬────┬─⬤─┬────┬─⬤─┬─🔴─┬────┬─⬤─┬────┬─⬤─┬─
B  ╟─🔴─┼────┼─⬤─┼────┼─⬤─┼─⬤─┼────┼─⬤─┼────┼─⬤─┼────┼─⬤─┼─
G  ╟────┼─⬤─┼────┼─⬤─┼─🔴─┼────┼─⬤─┼────┼─⬤─┼─⬤─┼────┼─⬤─┼─
D  ╟────┼─⬤─┼─⬤─┼────┼─⬤─┼────┼─⬤─┼────┼─⬤─┼─🔴─┼────┼─⬤─┼─
A  ╟────┼─⬤─┼─🔴─┼────┼─⬤─┼────┼─⬤─┼─⬤─┼────┼─⬤─┼────┼─⬤─┼─
E  ╙─⬤─┴────┴─⬤─┴────┴─⬤─┴────┴─⬤─┴─🔴─┴────┴─⬤─┴────┴─⬤─┴─
               •         •         •         •              ••

Print scale that you pass in argument. Example: C-D-E-F-G-A-B

Takes the first note of the scale as root note.

Usage: tfb scale [flags]

Flags:

  • -h, --help help for scale

  • -n, --name string Set the scale name. Example: Major

  • -f, --from int Render from that fret number (default 1)

  • --to int Last fret number to render (default 12)

  • -m, --mode string Select the display mode either circle or note. Default to circle

  • -i, --inst string Set the instrument type, G for guitar, B for Bass, U for Ukulele (default G)

  • -t, --tuning string Set a custom instrument tuning ex: B-E-A-D-G-B-E for a 7 string guitar. Default to E-A-D-G-B-E

TODO

  • Customize list item styling to take less space
  • Bug: conflict on key h and l that changes the root and the pagination in interactive mode
  • Rename fretString into neckString and move it under the neck package
  • Add a pkg directory at the root of the repository. Verify what is internal or not.
  • s, --style options to choose the renderng style: utf8, ascii, etc...
  • An options to display note names instead of circles. Maybe --mode, m
  • Verify everything works with # and b note with
  • Add a quiz subcommand that randomly display a fret on the screen and wait for you to type the note's name.
  • Make the base command tfb displaying the fretboard with all the notes.
  • -i, --instrument option to choose between Guitar, Bass, Ukulele
  • -t, --tuning option to choose the tuning
  • Add tests
  • Make tfb root command interactive. Allow to select a mode and a root and then render the neck
  • Refactor root command to separate concerns

About

Terminal Fret Board: A CLI tool that display guitar chords and scales in the terminal

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published