fla.sh 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
fla.sh 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
fla.sh 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 MIT License
开发语言 SHELL
操作系统 跨平台
软件类型 开源软件
地区 不详
投 递 者 首席测试
适用人群 未知
收录时间 2021-11-17


Flashcards in your terminal!

This script was inspired by a basic script that I had seen in a youtube video by a user named nixcasts. I like the Anki flashcard system, hence I'm working to replicate it in a simple manner using plain text documents and a shell script to aid my ability to study with active recall and spaced repetition.

Preview of fla.sh

This script is an expanded version of the one featured in This nixcasts Video

This expanded version will create a flash directory in .local/share/ and create an example deck.csv file for you.

You can have as many 'decks' in the flash directory as you want, and having directories and nested directories filled with .csv 'decks' will all work with this system. There is also no practical limit on the amount of 'cards' a 'deck' can hold.


This script uses:

  • fzf
  • bat (optional if you use flash -p cat to use the core utility instead of bat)
  • (if on macOS the GNU core utilities are a dependency (namely the shuf utility))

Install these prior to running the script.



Untested, not sure if this script and its dependencies will work with WSL or not.


Will need to have brew to install dependencies listed below and also brew install coreutils to get the GNU core utilities as shuf is not in macOS by default.

You will need to put the script itself somewhere in your $PATH and execute it to initialize the setup.

Confirmed to work on macOS 10.14.6 more recent version welcome to test and file an issue/pull request to update README if other versions run the script as it should.


To utilize this script copy/move it to your ~/.local/bin/ folder or any place in your $PATH


Common issues will be added here as they arise during the stability stage of this script.


  • Is your system supported? see above
  • Are all necessary dependencies installed?
  • what version of bash do you have installed? or do you have bash installed?


The deck.csv file should have colon : separated values in 4 columns

Organized like this:


First Field: The category of the flashcard

Second Field: The Question being asked

Third Field: The Hidden Answer

Fourth Field: The Score*

* The score determines how often and which cards are shown to you. A good idea is to start all your cards out at 0 so that all are served to you equally. As you study, review, and mark the more familiar cards as 'Mild' or 'Easy', more points will be added. The lower point cards are sorted to the top and the top 10 are taken, shuffled, and then drawn from. This way as you learn the material and the items you are less familiar with bubble up into the shuffled pool for drawing and those that go up in points due to increased familiarity go down because you're rating the material as easier.


If you would like to browse through a collection of decks readily available in your subject matter that are comaptible with fla.sh then you should check out Flash Decks.

Media (accepting contributions)


This is free, open-source software. If you'd like to support the development of future projects, or say thanks for this one, you can donate to me through paypal or buy me a coffee:

Buy Me A Coffee



评论 (0)

0 评论
0 收藏