Skip to content

Instantly share code, notes, and snippets.

@korzio
Last active June 30, 2019 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korzio/37366a6d77025d0eff0822e65b5fc26a to your computer and use it in GitHub Desktop.
Save korzio/37366a6d77025d0eff0822e65b5fc26a to your computer and use it in GitHub Desktop.
Educational Open Source CLI Project

Educational Open Source CLI Project

Moved to Repository

Goal

Write a Command Line Interface application to create, edit, delete, and manage notes. Notes are structured in a user defined folders structure as a Git repo. Each note is saved with the git commit command. The tool is and easily extendable with plugins.

Technologies

  • TypeScript
  • oclif
  • Git

Organizational Structure

with mermaid syntax

graph TD
  CLI --> CLI:G(GitHub)
  CLI --> CLI:A(Architecture)
  CLI:A --> CLI:Lang(TypeScript)
  CLI:A --> CLI:Git(Git)
  CLI:A --> CLI:MD(Markdown)
  CLI:A --> CLI:Overview(Frameworks Overview)
  CLI:Overview --> 
    CLI:Overview:Article1>Basic CLI in Node.js]
  CLI:Overview:Article1 -->
    CLI:Overview:Article2>CLI Tools Overview]
  CLI:Overview:Article2 -->
    CLI:Overview:Article3>CLI in TypeScrpipt]

Features

Glossary

note - single commit with text data
notebook - a collection of notes inside a folder

Overview

  • Add, edit, delete note and notebook
  • List note with user interaction (add an item)
  • Print a note to PDF

Examples

note notebook ideas "Store all ideas" 
# add folder *ideas* with a file *README.md* title *Store all ideas*
# ideas
# ├── README.md
note ideas list "A list of ideas" idea
# add a list *idea* inside *ideas/README.md* 
note ideas/idea "Write a CLI for notes"
# add an *idea* list item inside *ideas/README.md* 

Where a content of a ideas/README.md file will be

# About

Store all ideas

# Table Of Contents

- [A list of ideas](#idea)

# <a href="#idea">Idea</a>

- Write a CLI for notes

Originally, a user can commit with an empty git repository modification

git commit --allow-empty -m "My Note"

Links

Articles

Books

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment