+1
-1
| { | ||
| "name": "loctok", | ||
| "version": "0.1.4", | ||
| "version": "0.2.0", | ||
| "description": "Count LOC (lines of code) & TOK (LLM tokens), fast", | ||
@@ -5,0 +5,0 @@ "license": "MIT OR Apache-2.0", |
+33
-0
@@ -59,2 +59,9 @@ # loctok (npm) | ||
| loctok --help | ||
| # Concatenate filtered files and copy to clipboard | ||
| loctok copy # from current directory | ||
| loctok copy path/to/dir # from a given path | ||
| # Copy with filters and also print the content | ||
| loctok --ext rs,md --hidden copy --show | ||
| ``` | ||
@@ -122,3 +129,29 @@ | ||
| - Token counts use the chosen encoding; `token_number` and `models` are informative mapping hints. | ||
| - Copy mode requires a platform clipboard tool: | ||
| - macOS: `pbcopy` | ||
| - Windows: `clip` | ||
| - Linux: `xclip` or `xsel` | ||
| ## Copy Mode | ||
| Use copy to bundle filtered files into a single, structured payload that is copied to your clipboard. Optionally print it with `--show`. | ||
| ``` | ||
| loctok copy [PATH] [--show] [--ext rs,md] [--hidden] | ||
| ``` | ||
| Format snippet: | ||
| ``` | ||
| ├── src | ||
| │ ├── lib.rs | ||
| │ └── main.rs | ||
| └── README.md | ||
| /src/lib.rs: | ||
| -------------------------------------------------------------------------------- | ||
| 1 | use anyhow::{Context, Result}; | ||
| 2 | // ... | ||
| ``` | ||
| ## Supported Platforms | ||
@@ -125,0 +158,0 @@ |
Network access
Supply chain riskThis module accesses the network.
Found 4 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 4 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
11162
7.95%174
23.4%