You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

loctok

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loctok - npm Package Compare versions

Comparing version
0.1.4
to
0.2.0
+1
-1
package.json
{
"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",

@@ -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 @@