sourcecrop

1.0.7 • Public • Published

SC - spirit catcher

Bring forth towards you all that you seek. Attract the items you desire. Select the code, functions, and more from all your sources. jq, for code.

AKA Source Crop

asciicast

Cat functions from files with autocomplete

Use with | less -R to page output while preserving colors.

$ npm i -g sourcecrop@latest

What is sc?

It's perfect for:

  • Quickly navigating through large projects.
  • Isolating and selecting specific code blocks.
  • Reviewing or refactoring targeted parts of your code with precision.

SC is designed to (eventually) let you traverse code the same way jq slices JSON, with similar flexibility and power. Right now it just supports autcomplete through functions of JavaScript files in latest ECMAScript ESM syntax.

Usage Example

Or target specific functions or blocks:

sc <file.js> [press tab for autocomplete of function names]

Roadmap

  • Add support for languages other than the latest JavaScript ESM syntax.
  • Correct -listCallers, -listCallees, calls- and by- implementations.
  • Add some syntax (?) for other parts like: branches, definitions, but avoid stuff that could be done easily with grep.

Contribs

Yes please!

Readme

Keywords

Package Sidebar

Install

npm i sourcecrop

Weekly Downloads

1

Version

1.0.7

License

AGPL-3.0

Unpacked Size

21.6 kB

Total Files

7

Last publish

Collaborators

  • dosy