npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tendr-cli

v0.0.12

Published

cli tools for markdown-based digital gardening

Downloads

23

Readme

🪴 tendr-cli 🎍

A WikiBonsai Project NPM package

⚠️ 🌱 This project is newly sprouted! So please consider it a beta: Remember to backup all data and please use version control.

CLI tooling to edit [[wikirefs]] and semantic trees in a collection of markdown files. Commands will feel familiar to typical cli commands to inspect files and directories.

🧑‍🌾 🚰 ✂️ Tend your 🎋 WikiBonsai digital garden with minimalist tooling.

Install

Install with npm:

npm install -g tendr-cli

Use

Example:

$ tendr stat <filename>

Manual:

usage: tendr <command>

cli tools for markdown-based digital gardening.

Commands:
  tendr tree                             print full knowledge bonsai.
  tendr status <filename>                show status of file relationships.
                                                                 [aliases: stat]
  tendr rename <old-fname> <new-fname>   rename a file and all of its references
                                         .                         [aliases: rn]
  tendr retypedoc <old-type> <new-type>  rename document type and update all occ
                                         urrences.         [aliases: rtdoc, rtd]
  tendr retyperef <old-type> <new-type>  rename reference type and all its occur
                                         rences.           [aliases: rtref, rtr]
  tendr mkdntowiki [glob]                convert from "[markdown](style)" to "[[
                                         wiki-style]]" internal links.
                                                                 [aliases: mtow]
  tendr wikitomkdn [glob]                convert from "[[wiki-style]]" to "[mark
                                         down](style)" internal links.
                                                                 [aliases: wtom]
  tendr camltoyaml [glob]                convert from "caml" to "yaml" style att
                                         ributes.                [aliases: ctoy]
  tendr yamltocaml [glob]                convert from "yaml" to "caml" style att
                                         ributes.                [aliases: ytoc]

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

Commands

Note:

  • Commands expect markdown files using the .md extension.
  • Commands that perform anything other than read operations will display a confirmation prompt before executing. This may typically be skipped with the force flag (-f).

lint (⚠️ todo)

Example:

$ tendr lint

Sample output:

todo

Manual:

todo

list, ls (⚠️ todo)

List garden information. Runs on all files in current directory and all subdirectories.

Example:

$ tendr list

Sample output:

todo

Manual:

todo

tree

Example:

$ tendr tree

Sample output:

i.bonsai
└── fname-a
    ├── fname-b
    |   └── fname-f
    ├── fname-c
    |   ├── fname-g
    |   ├── fname-h
    |   └── fname-i
    ├── fname-d
    ├── fname-e
    └── i.branch
        └── fname-j

Manual:

tendr tree

print full knowledge bonsai/semantic tree

Options:
      --version  Show version number                                   [boolean]
      --help     Show help                                             [boolean]
  -c, --config   relative path to config file, including filename; defaults to "
                 ./config.toml"              [string] [default: "./config.toml"]
  -d, --doctype  relative path to doctype file, including filename; defaults to
                 "t.doc.toml"                 [string] [default: "./t.doc.toml"]
  -r, --root     filename for root of tree                              [string]
  -g, --glob     glob to index files                                    [string]

status, stat

Example:

$ tendr status <filename>

Sample output:

┌────────────────────────────────────┐
│ 📄 RELs for...                     │
├──────┬─────────┬─────────┬─────────┤
│ FILE │ fname-a │ DOCTYPE │ default │
└──────┴─────────┴─────────┴─────────┘
┌───────────────────────┐
│ 🌳 FAM                │
├───────────┬───────────┤
│ ANCESTORS │ i.bonsai  │
├───────────┼───────────┤
│ CHILDREN  │ • fname-b │
│           │ • fname-c │
│           │ • fname-d │
│           │ • fname-e │
└───────────┴───────────┘
┌─────────────────────────────────────────────────────┐
│ 🕸️ REF                                              │
├───────┬──────────────────────┬──────────────────────┤
│       │ BACK                 │ FORE                 │
├───────┼──────────────────────┼──────────────────────┤
│ ATTR  │ ◦ attrtype           │ ◦ reftype            │
│       │   • fname-b          │   • fname-b          │
│       │                      │ ◦ attrtype           │
│       │                      │   • fname-c          │
├───────┼──────────────────────┼──────────────────────┤
│ LINK  │ • fname-b (attrtype) │ • fname-d (linktype) │
│       │ • fname-c (linktype) │ • fname-e            │
│       │ • fname-d            │ • no-doc             │
│       │ • i.bonsai           │                      │
├───────┼──────────────────────┼──────────────────────┤
│ EMBED │ • fname-f            │ --                   │
└───────┴──────────────────────┴──────────────────────┘

Manual:

tendr status <filename>

show status of file relationships

Options:
      --version  Show version number                                   [boolean]
      --help     Show help                                             [boolean]
  -k, --kind     kind of relationships to list
                 (kinds: rel, fam, ancestor, child
                 , ref, attr, link, embed, fore, foreref, foreattr, forelink, fo
                 reembed, back, backref, backattr, backlink, backembed; default
                 is "rel")                             [string] [default: "rel"]

rename, rn

Example:

$ tendr rename <old-fname> <new-fname>

Manual:

tendr rename <old-fname> <new-fname>

rename a file and all of its references.

Options:
      --version  Show version number                                   [boolean]
      --help     Show help                                             [boolean]
  -r, --regex    usage: rename <regex> <replace-string>; use regex replacement i
                 nstead of string replacement -- this will rename all filenames
                 containing matches to the regex pattern; the regex argument wil
                 l be replaced by the string argument. (use quotes around regex
                 if the terminal is preemptively executing it)
                                                      [boolean] [default: false]
  -f, --force    skip verification prompt and perform operation
                                                      [boolean] [default: false]

retyperef, rtref, rtr

note: keep in mind this will not retype caml primitive properties! this is for wikirefs only.

Example:

$ tendr retyperef <old-type> <new-type>

Manual:

tendr retyperef <old-type> <new-type>

rename reference type and all its occurrences.

Options:
      --version  Show version number                                   [boolean]
      --help     Show help                                             [boolean]
  -k, --kind     kind of entity to rename (kinds: "reftype", "attrtype", "linkty
                 pe"; default is "reftype")        [string] [default: "reftype"]

mkdntowiki, mtow

Example:

$ tendr mkdntowiki

Manual:

tendr mkdntowiki [glob]

convert from "[markdown](style)" to "[[wiki-style]]" internal links.

Options:
      --version  Show version number                                   [boolean]
      --help     Show help                                             [boolean]
  -F, --format   how to parse markdown links -- "filename", "relative" urls, or
                 "absolute" urls                  [string] [default: "filename"]
  -k, --kind     kind of references to convert
                 (kinds: rel, fam, ancestor, child
                 , ref, attr, link, embed, fore, foreref, foreattr, forelink, fo
                 reembed, back, backref, backattr, backlink, backembed; default
                 is "rel")                             [string] [default: "ref"]

wikitomkdn, wtom

Example:

$ tendr wikitomkdn

Manual:

tendr wikitomkdn [glob]

convert from "[[wiki-style]]" to "[markdown](style)" internal links.

Options:
      --version  Show version number                                   [boolean]
      --help     Show help                                             [boolean]
  -F, --format   how to format the resulting markdown links -- "filename", "rela
                 tive" urls, or "absolute" urls   [string] [default: "filename"]
  -k, --kind     kind of references to convert
                 (kinds: rel, fam, ancestor, child
                 , ref, attr, link, embed, fore, foreref, foreattr, forelink, fo
                 reembed, back, backref, backattr, backlink, backembed; default
                 is "rel")                             [string] [default: "ref"]

camltoyaml, ctoy

Example:

$ tendr camltoyaml [glob]

Manual:

tendr camltoyaml [glob]

convert from "caml" to "yaml" style attributes.

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

yamltocaml, ytoc

Example:

$ tendr yamltocaml [glob]

Manual:

tendr yamltocaml [glob]

convert from "yaml" to "caml" style attributes.

Options:
      --version      Show version number                               [boolean]
      --help         Show help                                         [boolean]
  -f, --format       how to format caml output (kinds: "none", "pretty", or "pad
                     "; default is "none")          [string] [default: "pretty"]
  -l, --list-format  how to format caml output lists (kinds: "mkdn" or "comma";
                     default is "mkdn")               [string] [default: "mkdn"]
  -p, --no-prefix    do not use colon prefix in caml output
                                                       [boolean] [default: true]