A terminal-based spaced repetition flashcard tool.
Theme: material default-community
Goki is an intelligent flashcard management tool inspired by Anki built in the terminal!
Launch by running goki
:
https://github.com/abeleinin/goki/assets/95333017/91d46c80-6580-4550-b6c2-405342a48290
Goki features a Spaced Repetion Algorithm which uses user feedback on card difficulty to effectively space out practice sessions.
Using go
:
go install github.com/abeleinin/goki@latest
Build from source (go 1.13+)
git clone https://github.com/abeleinin/goki.git
cd goki
go build
https://github.com/abeleinin/goki/assets/95333017/96234116-ef6f-4238-959a-b972e9adf0b3
Supports:
stdin
<prompt>
in CLI and TUIGoki uses gpt-4-turbo-preview
. Set the OPENAI_API_KEY
environment variable to a valid OpenAI key. You can generate one here.
There are two ways to generate decks using the API. First, you can use stdin
to generate a deck from your notes:
goki --gpt < my_notes.txt
goki --gpt "my prompt"
Or from the TUI, you can use the G
key to be prompted to type some content on the bottom of the screen relating to the deck you want to generate. Testing has been limited, so please report any bugs or errors that occur.
Using the pipe operator <
to feed flashcard data in as stdin
. Apply
a custom name with the -n
flag, or a default name will be assigned.
-t
flag assigns the data seperation character, comma ,
separation
is the default.
goki < flashcards.csv # default sep=','
goki -t < flashcards.txt # use -t to set sep='\t'
goki -n "My Deck Name" < flashcards.csv
goki -n "My Deck Name" -t < flashcards.txt
Here is an example of data formatting. Only rows with 2 elements will be parsed, the first as the question and second as answer.
"Question","Answer"
Question Answer
Export as Notes in Plain Text (.txt)
in Anki, which generates a tab \t
separated text file. Run the follow on the exported file.
goki -n "My Anki Cards" -t < anki.txt
Press r
on the selected deck you want to review on the home page. Or
use the command goki review <deck index>
to review from the CLI.
Review from CLI:
Review from TUI:
Press N
in the home page. Use e
to edit the currently selected deck.
Press o
to view the cards in a deck. Press n
to create a new card.
Usage:
goki - tui mode
goki list - view deck index
goki review <deck index> - review deck from cli
Import:
opt: - optional flags
-n "deck name" - assigned deck name to imported cards
-t - assigns tab sep (default sep=',')
goki opt < deck.txt - import deck in using stdin
Generate:
goki --gpt "my prompt" - generate a deck from a text prompt
goki --gpt < my_notes.txt - generate a deck from text or markdown files